MeVisLab Toolbox Reference
SoMLSamplerCubeMap.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_MLSAMPLER_CUBE_MAP_H
14#define SO_MLSAMPLER_CUBE_MAP_H
15
16
18
19#include "SoShaderSystem.h"
21#include <Inventor/SbLinear.h>
22#include <mlGLResources.h>
23
26{
27 typedef SoMLSampler inherited;
28
29 SO_NODE_HEADER(SoMLSamplerCubeMap);
30
31 public:
32
35
38
41
44
45 SoINTERNAL public:
46
48 static void initClass();
49
50 protected:
51
54
56 void freeTextureBuffer() override;
57
59 void updateTextureBuffer() override;
60
62 void uploadTextureBuffer() override;
63
66
68 void getTextureDataFromImage(const XVImageSize &pos, const XVImageSize &size) override;
69
72
73 private:
74
75 MLuint8 *_textureDataCube[6];
76};
77
78#endif // _SO_ML_SAMPLER_CUBEMAP_
Sampler node that uses 6 2D ML subimages to define a Cubemap sampler.
SoSFUInt32 startZ
Origin of the 2d slice in Z dimension. Default is 0.
void updateTextureBuffer() override
Calls imageChanged() if _textureBuffer is empty.
void calcSubImgProps(XVImageSize &subImgPosition, XVImageSize &subImgSize) override
Calculate position and size of used sub image by evaluation of fields.
~SoMLSamplerCubeMap() override
Destructor.
void freeTextureBuffer() override
Delete the texture buffer(s)
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.
SoMLSamplerCubeMap()
Constructor.
SoSFEnum wrapT
Wrapping mode. Default is REPEAT.
static void initClass()
Initialize class with runtime type system.
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.
Abstract base class for sampler nodes that handle ML images.
Definition SoMLSampler.h:27
SoSFMLImage - field interface to ML images and related classes.
Definition SoSFMLImage.h:32
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
unsigned char MLuint8
Definition mlTypeDefs.h:109