SurgSim::Graphics::OsgTexture Class Reference

Base class for OSG implementations of Graphics Textures. More...

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

Inheritance diagram for SurgSim::Graphics::OsgTexture:

## Public Member Functions

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...

## Protected Member Functions

| OsgTexture (osg::Texture *texture)
| Constructor. More...

## Private Attributes

osg::ref_ptr< osg::Texture > | m_texture
| OSG texture. More...

## Detailed Description

Base class for OSG implementations of Graphics Textures.

Wraps an osg::Texture.

## Constructor & Destructor Documentation

## OsgTexture()

OsgTexture::OsgTexture | ( | osg::Texture * | texture | ) |

explicit protected

Constructor.

Parameters

  texture | OSG texture

## Member Function Documentation

## clearImage()

void OsgTexture::clearImage | ( |  | ) |

virtual

Removes the image from the texture.

Implements SurgSim::Graphics::Texture.

## getOsgTexture()

osg::ref_ptr<osg::Texture> SurgSim::Graphics::OsgTexture::getOsgTexture | ( |  | ) | const

inline

Returns the osg::Texture1D.

## loadImage()

bool OsgTexture::loadImage | ( | const std::string & | filePath | ) |

virtual

Loads an image into the texture from a file.

Parameters

  filePath | Path to the image file

Returns
  True if the image is successfully loaded, otherwise false

Implements SurgSim::Graphics::Texture.

Reimplemented in SurgSim::Graphics::OsgTextureCubeMap.

## Member Data Documentation

## m_texture

osg::ref_ptr<osg::Texture> SurgSim::Graphics::OsgTexture::m_texture

private

OSG texture.

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

- SurgSim/Graphics/OsgTexture.h
- SurgSim/Graphics/OsgTexture.cpp