opensurgsim
Public Member Functions | List of all members
SurgSim::Graphics::TextureCubeMap Class Referenceabstract

Base class defining the interface for a Cube Map Graphics Texture. More...

#include <TextureCubeMap.h>

Inheritance diagram for SurgSim::Graphics::TextureCubeMap:
SurgSim::Graphics::Texture SurgSim::Graphics::OsgTextureCubeMap

Public Member Functions

virtual void setSize (int width, int height)=0
 Sets the size of the texture, which is the same for each face of the cube. More...
 
virtual void getSize (int *width, int *height) const =0
 Gets the size of the texture, which is the same for each face of the cube. More...
 
virtual bool loadImageFaces (const std::string &negativeX, const std::string &positiveX, const std::string &negativeY, const std::string &positiveY, const std::string &negativeZ, const std::string &positiveZ)=0
 Loads images from files into the faces of the cube map. More...
 
- Public Member Functions inherited from SurgSim::Graphics::Texture
virtual ~Texture ()
 Destructor.
 
virtual bool loadImage (const std::string &filePath)=0
 Loads an image into the texture from a file. More...
 
virtual void clearImage ()=0
 Removes the image from the texture.
 
void setIsPointSprite (bool value)
 Set point sprite flag on/off.
 
bool isPointSprite () const
 Get point sprite flag state.
 

Detailed Description

Base class defining the interface for a Cube Map Graphics Texture.

A Cube Map Texture has a width and height, which is the same for each face of the cube.

Member Function Documentation

§ getSize()

virtual void SurgSim::Graphics::TextureCubeMap::getSize ( int *  width,
int *  height 
) const
pure virtual

Gets the size of the texture, which is the same for each face of the cube.

Parameters
[out]widthWidth of the texture
[out]heightHeight of the texture

Implemented in SurgSim::Graphics::OsgTextureCubeMap.

§ loadImageFaces()

virtual bool SurgSim::Graphics::TextureCubeMap::loadImageFaces ( const std::string &  negativeX,
const std::string &  positiveX,
const std::string &  negativeY,
const std::string &  positiveY,
const std::string &  negativeZ,
const std::string &  positiveZ 
)
pure virtual

Loads images from files into the faces of the cube map.

Parameters
negativeXPath to the image for the (-X) face
positiveXPath to the image for the (+X) face
negativeYPath to the image for the (-Y) face
positiveYPath to the image for the (+Y) face
negativeZPath to the image for the (-Z) face
positiveZPath to the image for the (+Z) face
Returns
True if the image is successfully loaded, otherwise false

Implemented in SurgSim::Graphics::OsgTextureCubeMap.

§ setSize()

virtual void SurgSim::Graphics::TextureCubeMap::setSize ( int  width,
int  height 
)
pure virtual

Sets the size of the texture, which is the same for each face of the cube.

Parameters
widthWidth of the texture
heightHeight of the texture
Note
Use this to setup a texture as a render target rather than loading from file.

Implemented in SurgSim::Graphics::OsgTextureCubeMap.


The documentation for this class was generated from the following file: