MeVisLabToolboxReference
|
Abstract base class for sampler nodes that handle ML images. More...
#include <SoMLSampler.h>
Public Member Functions | |
virtual void | GLRender (SoGLRenderAction *action) |
Set ML image properties in state. | |
virtual void | updateParameter (SoUniformParameterBase *uniformBase, SoState *state) |
Assigns or updates the parameter's value. | |
Static Public Member Functions | |
static void | initClass () |
Initialize class with runtime type system. | |
Public Attributes | |
SoSFMLImage | image |
ML image connector. | |
SoSFUInt32 | startT |
Origin of the image in T dimension. Default is 0. | |
SoSFUInt32 | startU |
Origin of the image in U dimension. Default is 0. | |
Protected Member Functions | |
SoMLSampler () | |
Constructor. | |
virtual | ~SoMLSampler () |
Destructor. | |
GLenum | MLToGLDataType (const MLDataType &dType) |
Return OpenGL data type for given ML data type. Returns GL_NONE for unknown ML data types. | |
MLuint8 * | loadAndReformatSubImg (XVImageSize pos, XVImageSize size) |
load ML image and reformat memory to be suitable for OpenGL texturing. | |
virtual void | texConfigChanged (SoSensor *sensor) |
Called when texture configuration (e.g. filter mode) has changed. | |
virtual void | imageChanged () |
Called when the ML images has changed. | |
virtual void | getSubimageProperties (XVImageSize inputSize, XVImageSize &subimageSize, XVImageSize &subimagePosition)=0 |
Get position and size of used sub image. | |
virtual void | getTextureDataFromImage (XVImageSize size, XVImageSize pos) |
Extract the texture data from the input ML image and store it in the textureData buffer. | |
void | clampIntFieldValue (SoSFUInt32 &field, int minValue, int maxValue) |
Clamp field value based on min and max value. | |
Static Protected Member Functions | |
static void | imageChangedCB (void *data, SoSensor *sensor) |
Protected Attributes | |
SbSamplerInfo::TextureType | _internTexFormat |
Value points to internal texture format. | |
SbMLImageProperties | _imgProps |
ML image properties. |
Abstract base class for sampler nodes that handle ML images.
Definition at line 21 of file SoMLSampler.h.
SoMLSampler::SoMLSampler | ( | ) | [protected] |
Constructor.
virtual SoMLSampler::~SoMLSampler | ( | ) | [protected, virtual] |
Destructor.
void SoMLSampler::clampIntFieldValue | ( | SoSFUInt32 & | field, |
int | minValue, | ||
int | maxValue | ||
) | [protected] |
Clamp field value based on min and max value.
virtual void SoMLSampler::getSubimageProperties | ( | XVImageSize | inputSize, |
XVImageSize & | subimageSize, | ||
XVImageSize & | subimagePosition | ||
) | [protected, pure virtual] |
Get position and size of used sub image.
Implemented in SoMLSampler1D, SoMLSampler2D, SoMLSampler3D, and SoMLSamplerCubeMap.
virtual void SoMLSampler::getTextureDataFromImage | ( | XVImageSize | size, |
XVImageSize | pos | ||
) | [protected, virtual] |
Extract the texture data from the input ML image and store it in the textureData buffer.
Reimplemented in SoMLSamplerCubeMap.
virtual void SoMLSampler::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Set ML image properties in state.
Reimplemented from SoUniformShaderParameter.
virtual void SoMLSampler::imageChanged | ( | ) | [protected, virtual] |
Called when the ML images has changed.
Implements SoImageSampler.
static void SoMLSampler::imageChangedCB | ( | void * | data, |
SoSensor * | sensor | ||
) | [static, protected] |
static void SoMLSampler::initClass | ( | ) | [static] |
Initialize class with runtime type system.
Reimplemented from SoImageSampler.
Reimplemented in SoMLSampler1D, SoMLSampler2D, SoMLSampler3D, and SoMLSamplerCubeMap.
MLuint8* SoMLSampler::loadAndReformatSubImg | ( | XVImageSize | pos, |
XVImageSize | size | ||
) | [protected] |
load ML image and reformat memory to be suitable for OpenGL texturing.
Returns NULL on error, otherwise a pointer to the allocated memory is given.
GLenum SoMLSampler::MLToGLDataType | ( | const MLDataType & | dType | ) | [protected] |
Return OpenGL data type for given ML data type. Returns GL_NONE for unknown ML data types.
virtual void SoMLSampler::texConfigChanged | ( | SoSensor * | sensor | ) | [protected, virtual] |
Called when texture configuration (e.g. filter mode) has changed.
Reimplemented from SoSampler.
virtual void SoMLSampler::updateParameter | ( | SoUniformParameterBase * | uniformBase, |
SoState * | state | ||
) | [virtual] |
Assigns or updates the parameter's value.
Reimplemented from SoImageSampler.
SbMLImageProperties SoMLSampler::_imgProps [protected] |
ML image properties.
Definition at line 58 of file SoMLSampler.h.
Value points to internal texture format.
Reimplemented from SoImageSampler.
Definition at line 54 of file SoMLSampler.h.
ML image connector.
Definition at line 30 of file SoMLSampler.h.
SoSFUInt32 SoMLSampler::startT |
Origin of the image in T dimension. Default is 0.
Definition at line 33 of file SoMLSampler.h.
SoSFUInt32 SoMLSampler::startU |
Origin of the image in U dimension. Default is 0.
Definition at line 36 of file SoMLSampler.h.