SurgSim::Graphics::OsgTexture2d Class Reference

OSG implementation of a 2D Texture. More...

`#include <SurgSim/Graphics/OsgTexture2d.h>`

Inheritance diagram for SurgSim::Graphics::OsgTexture2d:

## Public Member Functions

| OsgTexture2d ()
| Constructor. More...
virtual void | setSize (int width, int height)
| Sets the size of the texture. More...
virtual void | getSize (int *width, int *height) const
| Gets the size of the texture. More...
osg::ref_ptr< osg::Texture2D > | getOsgTexture2d () const
| Returns the osg::Texture2D. More...
Public Member Functions inherited from SurgSim::Graphics::OsgTexture
virtual bool | loadImage (const std::string &filePath)
| Loads an image into the texture from a file. More...
virtual void | clearImage ()
| Removes the image from the texture. More...
osg::ref_ptr< osg::Texture > | getOsgTexture () const
| Returns the osg::Texture1D. More...
Public Member Functions inherited from SurgSim::Graphics::Texture
| Texture ()
virtual | ~Texture ()
| Destructor. More...
void | setIsPointSprite (bool value)
| Set point sprite flag on/off. More...
bool | isPointSprite () const
| Get point sprite flag state. More...

## Additional Inherited Members

Protected Member Functions inherited from SurgSim::Graphics::OsgTexture
| OsgTexture (osg::Texture *texture)
| Constructor. More...

## Detailed Description

OSG implementation of a 2D Texture.

Wraps an osg::Texture2d

## Constructor & Destructor Documentation

## OsgTexture2d()

OsgTexture2d::OsgTexture2d | ( |  | ) |

Constructor.

Postcondition
  No image is loaded in the texture.

## Member Function Documentation

## getOsgTexture2d()

osg::ref_ptr<osg::Texture2D> SurgSim::Graphics::OsgTexture2d::getOsgTexture2d | ( |  | ) | const

inline

Returns the osg::Texture2D.

## getSize()

void OsgTexture2d::getSize | ( | int * | width,
|  | int * | height
| ) |  | const

virtual

Gets the size of the texture.

Parameters

  [out] | width | Width of the texture
  [out] | height | Height of the texture

Implements SurgSim::Graphics::Texture2d.

## setSize()

void OsgTexture2d::setSize | ( | int | width,
|  | int | height
| ) |  |

virtual

Sets the size of the texture.

Parameters

  width | Width of the texture
  height | Height of the texture

Note
  Use this to setup a texture as a render target rather than loading from file.

Implements SurgSim::Graphics::Texture2d.

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

- SurgSim/Graphics/OsgTexture2d.h
- SurgSim/Graphics/OsgTexture2d.cpp