OsgTextureRectangle.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_GRAPHICS_OSGTEXTURERECTANGLE_H
#define SURGSIM_GRAPHICS_OSGTEXTURERECTANGLE_H
#include "SurgSim/Graphics/OsgTexture.h"
#include "SurgSim/Graphics/TextureRectangle.h"
#include <osg/TextureRectangle>
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#endif
namespace SurgSim
{
namespace Graphics
{
class OsgTextureRectangle : public OsgTexture, public TextureRectangle
{
public:
OsgTextureRectangle();
virtual void setSize(int width, int height);
virtual void getSize(int* width, int* height) const;
osg::ref_ptr<osg::TextureRectangle> getOsgTextureRectangle() const
{
return static_cast<osg::TextureRectangle*>(getOsgTexture().get());
}
};
}; // namespace Graphics
}; // namespace SurgSim
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif // SURGSIM_GRAPHICS_OSGTEXTURERECTANGLE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Graphics::OsgTexture::getOsgTexture
osg::ref_ptr< osg::Texture > getOsgTexture() const
Returns the osg::Texture1D.
Definition: OsgTexture.h:44
SurgSim::Graphics::OsgTextureRectangle::OsgTextureRectangle
OsgTextureRectangle()
Constructor.
Definition: OsgTextureRectangle.cpp:20
SurgSim::Graphics::OsgTextureRectangle::getOsgTextureRectangle
osg::ref_ptr< osg::TextureRectangle > getOsgTextureRectangle() const
Returns the osg::TextureRectangle.
Definition: OsgTextureRectangle.h:59
SurgSim::Graphics::OsgTextureRectangle::getSize
virtual void getSize(int *width, int *height) const
Gets the size of the texture.
Definition: OsgTextureRectangle.cpp:29
SurgSim::Graphics::OsgTexture
Base class for OSG implementations of Graphics Textures.
Definition: OsgTexture.h:32
SurgSim::Graphics::OsgTextureRectangle::setSize
virtual void setSize(int width, int height)
Sets the size of the texture.
Definition: OsgTextureRectangle.cpp:24
TextureRectangle.h
SurgSim::Graphics::OsgTextureRectangle
OSG implementation of a Rectangle Texture.
Definition: OsgTextureRectangle.h:40
OsgTexture.h
SurgSim::Graphics::TextureRectangle
Base class defining the interface for a Rectangle Graphics Texture.
Definition: TextureRectangle.h:30