MeVisLab Toolbox Reference
SoMLSampler1D.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_MLSAMPLER1_D_H
14 #define SO_MLSAMPLER1_D_H
15 
16 
18 
19 #include "SoShaderSystem.h"
21 #include <Inventor/SbLinear.h>
22 #include <mlGLResources.h>
23 
25 class INVENTOR_SHADER_API SoMLSampler1D : public SoMLSampler
26 {
27  typedef SoMLSampler inherited;
28 
29  SO_NODE_HEADER(SoMLSampler1D);
30 
31  public:
32 
34  SoSFUInt32 startY;
35 
37  SoSFUInt32 startZ;
38 
41 
42  SoINTERNAL public:
43 
45  static void initClass();
46 
47  protected:
48 
50  ~SoMLSampler1D() override;
51 
53  void setGLTexImage(GLenum target, const XVImageSize &textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid *textureData) override;
54 
56  void calcSubImgProps(XVImageSize &subImgPosition, XVImageSize &subImgSize) override;
57 
58 };
59 
60 #endif // _SO_ML_SAMPLER_1D_
Sampler node that uses a 1D ML subimage to define a 1D sampler.
Definition: SoMLSampler1D.h:26
void calcSubImgProps(XVImageSize &subImgPosition, XVImageSize &subImgSize) override
Calculate position and size of used sub image by evaluation of fields.
void setGLTexImage(GLenum target, const XVImageSize &textureSize, GLint internalFormat, GLint format, GLenum textureDataType, const GLvoid *textureData) override
Set the OpenGL texture.
SoSFUInt32 startY
Origin of the 1d slice in y dimension. Default is 0.
Definition: SoMLSampler1D.h:34
SoMLSampler1D()
Constructor.
static void initClass()
Initialize class with runtime type system.
~SoMLSampler1D() override
Destructor.
SoSFUInt32 startZ
Origin of the 1d slice in z dimension. Default is 0.
Definition: SoMLSampler1D.h:37
Abstract base class for sampler nodes that handle ML images.
Definition: SoMLSampler.h:27
Abstract Open Inventor base class for sampler nodes.
Definition: SoSampler.h:30
SoSFMLImage - field interface to ML images and related classes.
Definition: SoSFMLImage.h:32
boost::graph_traits< ml_graph_ptr >::vertex_descriptor target(graph_traits< ml_graph_ptr >::edge_descriptor e, const ml_graph_ptr)
Returns the vertex descriptor for v of the edge (u,v) represented by e.