35 #ifndef ANA_OBJECT_SLICEABLE_H
36 #define ANA_OBJECT_SLICEABLE_H
44 template <
typename T>
class Volume;
45 template <
typename T>
class VolumeRef;
52 struct SliceViewState;
76 unsigned tex = 0 )
const;
78 unsigned tex = 0 )
const;
81 const ViewState & state,
unsigned tex,
int dimx = -1,
82 int dimy = -1,
bool useTexScale =
true )
const;
84 const GLTexture & gltex,
unsigned tex )
const;
89 unsigned tex = 0 )
const;
97 virtual std::vector<float>
glMin2D()
const = 0;
98 virtual std::vector<float>
glMax2D()
const = 0;
Base Anatomist object (abstract)
Base class for all OpenGL objects in Anatomist (with OpenGL display lists)
glPart
GL object parts, each driving a GL list.
This class has to be rewritten, it's really really a shame.......
Referential: marker for transformations, with an associated color.
AObject-inherited version of Sliceable.
virtual const AObjectPalette * glPalette(unsigned tex=0) const
virtual const GLComponent * glAPI() const
OpenGL objects const API.
virtual GLComponent * glAPI()
OpenGL objects API.
virtual std::vector< float > glVoxelSize() const
virtual void glSetTexImageChanged(bool x=true, unsigned tex=0) const
const Referential * getReferential() const
virtual const Sliceable * sliceableAPI() const
virtual const Material * glMaterial() const
virtual void glSetTexEnvChanged(bool x=true, unsigned tex=0) const
virtual void glSetChanged(glPart, bool=true) const
virtual Sliceable * sliceableAPI()
virtual std::vector< float > glMin2D() const
virtual std::vector< float > glMax2D() const
virtual ~SliceableObject()
Sliceable objects can draw themselves in a 2D texture.
virtual const GLfloat * glVertexArray(const ViewState &) const
virtual const GLfloat * glNormalArray(const ViewState &state) const
normals array (optional), default=0 (no normals, flat shaded faces)
virtual void rgbaVolume(carto::Volume< AimsRGBA > &, const SliceViewState *=0, int tex=0) const
same as the other rgbaVolume() but fills an already allocated volume
virtual carto::VolumeRef< AimsRGBA > rgbaVolume(const SliceViewState *=0, int tex=0) const
fills a resampled RGBA volume
virtual const Referential * getReferential() const =0
virtual const GLfloat * glTexCoordArray(const ViewState &, unsigned tex=0) const
virtual bool glMakeTexImage(const ViewState &state, const GLTexture &gltex, unsigned tex) const
If you make non-standard textures (ie not from a palette), overload this function to fill gltex.
virtual std::vector< float > glMax2D() const =0
virtual bool update2DTexture(AImage &, const Point3df &posbase, const SliceViewState &, unsigned tex=0) const
this function must be overloaded to actually fill the slice image
virtual unsigned glPolygonSize(const ViewState &) const
number of vertices per polygon (default = 3: triangles)
virtual const GLuint * glPolygonArray(const ViewState &) const
virtual bool glAllowedTexRGBInterpolation(unsigned tex=0) const
virtual unsigned glTexCoordSize(const ViewState &, unsigned tex=0) const
texture array size (must be >= numVertex to work), defalut=0
virtual std::vector< float > glVoxelSize() const
virtual Sliceable * sliceableAPI()
virtual unsigned glDimTex(const ViewState &, unsigned tex=0) const
texture dimension (1, 2 [or 3])
virtual std::string viewStateID(glPart part, const ViewState &) const
Makes a unique ID from a viewstate.
virtual unsigned glNumPolygon(const ViewState &) const
virtual std::vector< float > glMin2D() const =0
virtual carto::VolumeRef< AimsRGBA > glBuildTexImage(const ViewState &state, unsigned tex, int dimx=-1, int dimy=-1, bool useTexScale=true) const
If you make non-standard textures (ie not from a palette), overload this function.
virtual unsigned glNumVertex(const ViewState &) const
virtual const Sliceable * sliceableAPI() const
Specialization for a sliceable object.
ViewState holds information about how a view wants to see an object.