MeVisLab Toolbox Reference
SoMLSamplerCubeMap Class Reference

Sampler node that uses 6 2D ML subimages to define a Cubemap sampler. More...

#include <SoMLSamplerCubeMap.h>

Inheritance diagram for SoMLSamplerCubeMap:
SoMLSampler SoImageSampler SoSampler SoUniformShaderParameter SoShaderParameter

Public Member Functions

 SoMLSamplerCubeMap ()
 Constructor.
 
- Public Member Functions inherited from SoMLSampler
void GLRender (SoGLRenderAction *action) override
 Set ML image properties in state.
 
void updateParameter (SoUniformParameterBase *uniformBase, SoState *state) override
 Assigns or updates the parameter's value.
 
- Public Member Functions inherited from SoSampler
void updateParameter (SoUniformParameterBase *uniformBase, SoState *state) override
 Assigns or updates the parameter's value.
 
- Public Member Functions inherited from SoUniformShaderParameter
void GLRender (SoGLRenderAction *action) override
 Add this node to element in state.
 
virtual void updatePreparation (SoState *)
 Hook for internal preparation steps.
 
- Public Member Functions inherited from SoShaderParameter
void callback (SoCallbackAction *) override
 Shut down handling of these actions for children.
 
void GLRender (SoGLRenderAction *) override
 
void getBoundingBox (SoGetBoundingBoxAction *) override
 
void getMatrix (SoGetMatrixAction *) override
 
void handleEvent (SoHandleEventAction *) override
 
void pick (SoPickAction *) override
 

Static Public Member Functions

static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoMLSampler
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoImageSampler
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoSampler
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoUniformShaderParameter
static void initClass ()
 Initialize class with runtime type system.
 
- Static Public Member Functions inherited from SoShaderParameter
static void initClass ()
 Initialize class with runtime type system.
 

Public Attributes

SoSFEnum wrapT
 Wrapping mode. Default is REPEAT.
 
SoSFUInt32 startZ
 Origin of the 2d slice in Z dimension. Default is 0.
 
SoSFEnum texGenMode
 
- Public Attributes inherited from SoMLSampler
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.
 
- Public Attributes inherited from SoSampler
SoSFEnum wrapS
 Wrapping mode. Default is REPEAT.
 
SoSFBool enableBorder
 Enable border to be part of the texture. Default is FALSE.
 
SoSFVec4f borderColor
 Border color used to for border texture filtering. Only used if 'enableBorder' is FALSE. Default is (0, 0, 0, 0).
 
SoSFEnum minFilter
 Minification filter mode. Default is LINEAR.
 
SoSFEnum magFilter
 Magnification filter mode. Default is LINEAR.
 
SoSFBool use16BitFloat
 Use 16 Bit floating point for the texture format.
 
SoSFBool needsTextureCoordinates
 Enable this if the sampler needs the standard inventor texture coordinates.
 
- Public Attributes inherited from SoUniformShaderParameter
std::set< SbStringauxUniformParameters
 Auxiliary uniform shader parameters which are maintained by this node.
 
- Public Attributes inherited from SoShaderParameter
SoSFString name
 Name given to parameter in high level languages.
 

Protected Member Functions

 ~SoMLSamplerCubeMap () override
 Destructor.
 
void freeTextureBuffer () override
 Delete the texture buffer(s)
 
void updateTextureBuffer () override
 Calls imageChanged() if _textureBuffer is empty.
 
void uploadTextureBuffer () override
 Uploads data stored in _textureDataCube.
 
void setGLTexImage (GLenum target, const XVImageSize &textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid *textureData) override
 Set the OpenGL texture.
 
void getTextureDataFromImage (const XVImageSize &pos, const XVImageSize &size) override
 Extract the texture data from the input ML image and store it in the textureData buffer.
 
void calcSubImgProps (XVImageSize &subImgPosition, XVImageSize &subImgSize) override
 Calculate position and size of used sub image by evaluation of fields.
 
- Protected Member Functions inherited from SoMLSampler
 SoMLSampler ()
 Constructor.
 
 ~SoMLSampler () override
 Destructor.
 
GLenum MLToGLDataType (const MLDataType &dType)
 Return OpenGL data type for given ML data type. Returns GL_NONE for unknown ML data types.
 
MLuint8loadAndReformatSubImg (const XVImageSize &pos, const XVImageSize &size)
 Load ML image and reformat memory to be suitable for OpenGL texturing.
 
void texConfigChanged (SoField *field) override
 Called when texture configuration (e.g. filter mode) has changed.
 
void imageChanged () override
 Called when the ML images has changed.
 
void imageChangedCB (SoField *field)
 
- Protected Member Functions inherited from SoImageSampler
 SoImageSampler ()
 Constructor.
 
 ~SoImageSampler () override
 Destructor.
 
virtual void updateTextureHandle ()
 Creates texture handle and binds it.
 
virtual void updateTextureFilteringParameters ()
 Sets parameters for texture filtering.
 
virtual void updateTextureWrappingParameters ()
 Sets parameters for texture wrapping in OpenGL.
 
virtual void uploadDummyTexture (GLenum target)
 Upload a dummy texture consisting of one black voxel using setGLTexImage.
 
virtual void generateMipmap ()
 Generates mipmap.
 
virtual void updateSamplerInfo (SoUniformParameterBase *uniformBase, SoState *state)
 Set info about the purpose of the uniform parameter and add info about sampler to state.
 
- Protected Member Functions inherited from SoSampler
 ~SoSampler () override
 
 SoSampler ()
 Constructor.
 
GLint getInternalFormat (GLenum glDataType)
 Return specialized texture format for GL data type.
 
const chargetTextureFormatName (GLenum internalFormat)
 Return texture format name.
 
SbSamplerInfo::TextureType getTextureTypeFromGLFormat (GLenum internalFormat)
 
void postTextureFormatInfo (GLenum target, GLint format)
 Prints channel depths for given target and format.
 
void postTextureSizeInfo (GLenum target)
 Prints the size of the bound texture.
 
virtual void nameChanged (SoField *field)
 Called when sampler name has changed.
 
- Protected Member Functions inherited from SoUniformShaderParameter
 SoUniformShaderParameter ()
 Constructor.
 
- Protected Member Functions inherited from SoShaderParameter
 SoShaderParameter ()
 Constructor.
 

Additional Inherited Members

- Public Types inherited from SoSampler
enum  TexGenMode { NORMAL_MAP = GL_NORMAL_MAP_EXT , REFLECTION_MAP = GL_REFLECTION_MAP_EXT }
 Texture gen mode. More...
 
enum  Wrap {
  REPEAT = GL_REPEAT , CLAMP = GL_CLAMP , CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE , CLAMP_TO_BORDER = GL_CLAMP_TO_BORDER ,
  MIRRORED_REPEAT = GL_MIRRORED_REPEAT
}
 Texture wrap type. More...
 
enum  Filter {
  NEAREST = GL_NEAREST , LINEAR = GL_LINEAR , NEAREST_MIPMAP_NEAREST = GL_NEAREST_MIPMAP_NEAREST , NEAREST_MIPMAP_LINEAR = GL_NEAREST_MIPMAP_LINEAR ,
  LINEAR_MIPMAP_NEAREST = GL_LINEAR_MIPMAP_NEAREST , LINEAR_MIPMAP_LINEAR = GL_LINEAR_MIPMAP_LINEAR
}
 Filter methods for minification and magnification. More...
 
- Protected Attributes inherited from SoMLSampler
SbSamplerInfo::TextureType _internTexFormat
 Value points to internal texture format.
 
SbMLImageProperties _imgProps
 ML image properties.
 
- Protected Attributes inherited from SoImageSampler
ml::GLTexture _textureRes
 
MLuint8_textureBuffer
 Buffered texture that is uploaded.
 
SbBool _isTextureModified
 Indicates changes in the internal texture.
 
SbSamplerInfo::TextureType _internTexFormat
 Value points to internal texture format.
 
XVImageSize _textureSize
 size of the internal texture
 
GLenum _target
 Specifies the target to which the texture is bound.
 
SoUniformParameterBase::SamplerType _samplerType
 Specifies the sampler type. Must be either SAMPLER_1D, SAMPLER_2D, SAMPLER_3D or SAMPLER_CUBEMAP.
 
- Protected Attributes inherited from SoSampler
SbBool _hasTextureFloat
 TRUE if GL_xxx_texture_float extension is present.
 
SbString _sizeUniformName
 name of the uniform ?_size parameter
 
unsigned int _textureComponents
 
GLenum _textureDataType
 

Detailed Description

Sampler node that uses 6 2D ML subimages to define a Cubemap sampler.

Sampler node that uses 6 2D ML subimages to define a Cubemap sampler

Definition at line 25 of file SoMLSamplerCubeMap.h.

Constructor & Destructor Documentation

◆ SoMLSamplerCubeMap()

SoMLSamplerCubeMap::SoMLSamplerCubeMap ( )

Constructor.

◆ ~SoMLSamplerCubeMap()

SoMLSamplerCubeMap::~SoMLSamplerCubeMap ( )
overrideprotected

Destructor.

Member Function Documentation

◆ calcSubImgProps()

void SoMLSamplerCubeMap::calcSubImgProps ( XVImageSize & subImgPosition,
XVImageSize & subImgSize )
overrideprotectedvirtual

Calculate position and size of used sub image by evaluation of fields.

Implements SoMLSampler.

◆ freeTextureBuffer()

void SoMLSamplerCubeMap::freeTextureBuffer ( )
overrideprotectedvirtual

Delete the texture buffer(s)

Reimplemented from SoImageSampler.

◆ getTextureDataFromImage()

void SoMLSamplerCubeMap::getTextureDataFromImage ( const XVImageSize & pos,
const XVImageSize & size )
overrideprotectedvirtual

Extract the texture data from the input ML image and store it in the textureData buffer.

Reimplemented from SoMLSampler.

◆ initClass()

static void SoMLSamplerCubeMap::initClass ( )
static

Initialize class with runtime type system.

◆ setGLTexImage()

void SoMLSamplerCubeMap::setGLTexImage ( GLenum target,
const XVImageSize & textureSize,
GLint internalFormat,
GLint format,
GLenum textureDataType,
const GLvoid * textureData )
overrideprotectedvirtual

Set the OpenGL texture.

Implements SoImageSampler.

◆ updateTextureBuffer()

void SoMLSamplerCubeMap::updateTextureBuffer ( )
overrideprotectedvirtual

Calls imageChanged() if _textureBuffer is empty.

Reimplemented from SoImageSampler.

◆ uploadTextureBuffer()

void SoMLSamplerCubeMap::uploadTextureBuffer ( )
overrideprotectedvirtual

Uploads data stored in _textureDataCube.

Reimplemented from SoImageSampler.

Member Data Documentation

◆ startZ

SoSFUInt32 SoMLSamplerCubeMap::startZ

Origin of the 2d slice in Z dimension. Default is 0.

Definition at line 37 of file SoMLSamplerCubeMap.h.

◆ texGenMode

SoSFEnum SoMLSamplerCubeMap::texGenMode

Definition at line 40 of file SoMLSamplerCubeMap.h.

◆ wrapT

SoSFEnum SoMLSamplerCubeMap::wrapT

Wrapping mode. Default is REPEAT.

Definition at line 34 of file SoMLSamplerCubeMap.h.


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