SurgSim::Graphics::Texture3d Class Referenceabstract

Base class defining the interface for a 3D Graphics Texture. More...

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

Inheritance diagram for SurgSim::Graphics::Texture3d:

## Public Member Functions

virtual void | setSize (int width, int height, int depth)=0
| Sets the size of the texture. More...
virtual void | getSize (int *width, int *height, int *depth) const =0
| Gets the size of the texture. More...
virtual bool | loadImageSlices (const std::vector< std::string > &filePaths)=0
| Loads images slices from files into the 3D texture. More...
Public Member Functions inherited from SurgSim::Graphics::Texture
| Texture ()
virtual | ~Texture ()
| Destructor. More...
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. More...
void | setIsPointSprite (bool value)
| Set point sprite flag on/off. More...
bool | isPointSprite () const
| Get point sprite flag state. More...

## Detailed Description

Base class defining the interface for a 3D Graphics Texture.

A 3D Texture has width, height, and depth.

Note
  Normalized texture coordinates are used to access this texture.

## Member Function Documentation

## getSize()

virtual void SurgSim::Graphics::Texture3d::getSize | ( | int * | width,
|  | int * | height,
|  | int * | depth
| ) |  | const

pure virtual

Gets the size of the texture.

Parameters

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

Implemented in SurgSim::Graphics::OsgTexture3d.

## loadImageSlices()

virtual bool SurgSim::Graphics::Texture3d::loadImageSlices | ( | const std::vector< std::string > & | filePaths | ) |

pure virtual

Loads images slices from files into the 3D texture.

Parameters

  filePaths | Paths to the image files

Returns
  True if the image is successfully loaded, otherwise false

Note
  The slices are stacked in the order provided to create the depth of the 3D texture.

Implemented in SurgSim::Graphics::OsgTexture3d.

## setSize()

virtual void SurgSim::Graphics::Texture3d::setSize | ( | int | width,
|  | int | height,
|  | int | depth
| ) |  |

pure virtual

Sets the size of the texture.

Parameters

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

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

Implemented in SurgSim::Graphics::OsgTexture3d.

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

- SurgSim/Graphics/Texture3d.h