anatomist 6.0.4
3D neuroimaging data viewer
mtexture.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34
35#ifndef ANA_SURFACE_MTEXTURE_H
36#define ANA_SURFACE_MTEXTURE_H
37
40#include <graph/tree/tree.h>
41
42namespace anatomist
43{
44
53 {
54 public:
55 AMTexture( const std::vector<AObject *> & obj );
56 virtual ~AMTexture();
57
58 virtual int MType() const { return type(); }
59 static int classType();
60
61 virtual const GLComponent* glAPI() const { return this; }
62 virtual GLComponent* glAPI() { return this; }
63
64 virtual const AObjectPalette* glPalette( unsigned tex = 0 ) const;
65 virtual unsigned glNumTextures() const;
66 virtual unsigned glNumTextures( const ViewState & ) const;
67 virtual unsigned glDimTex( const ViewState &, unsigned tex = 0 ) const;
68 virtual unsigned glTexCoordSize( const ViewState &,
69 unsigned tex = 0 ) const;
70 virtual const float* glTexCoordArray( const ViewState &,
71 unsigned tex = 0 ) const;
72
73 virtual void glSetTexMode( glTextureMode mode, unsigned tex = 0 );
74 virtual glTextureMode glTexMode( unsigned tex = 0 ) const;
75 virtual glAutoTexturingMode glAutoTexMode( unsigned tex = 0 ) const;
77 unsigned tex = 0 );
78 virtual const float *glAutoTexParams( unsigned coord = 0,
79 unsigned tex = 0 ) const;
80 virtual void glSetAutoTexParams( const float* params, unsigned coord = 0,
81 unsigned tex = 0 );
82 virtual void glSetTexRate( float rate, unsigned tex = 0 );
83 virtual float glTexRate( unsigned tex = 0 ) const;
84 virtual glTextureFiltering glTexFiltering( unsigned tex = 0 ) const;
85 virtual void glSetTexFiltering( glTextureFiltering x, unsigned tex = 0 );
86 virtual glTextureWrapMode glTexWrapMode( unsigned coord = 0,
87 unsigned tex = 0 ) const;
88 virtual void glSetTexWrapMode( glTextureWrapMode x, unsigned coord = 0,
89 unsigned tex = 0 );
90 virtual void glSetTexRGBInterpolation( bool x, unsigned tex = 0 );
91 virtual bool glTexRGBInterpolation( unsigned tex = 0 ) const;
92
94 unsigned tex = 0 ) const;
95 virtual void glGarbageCollector( int nkept = -1 );
96
97 virtual bool Is2DObject() { return false; }
98 virtual bool Is3DObject() { return false; }
99 virtual bool CanRemove( AObject* obj );
100 virtual void update( const Observable*, void* );
101 virtual Tree* optionTree() const;
102 virtual GLComponent* glTexture( const ViewState & vs, unsigned n = 0 );
103 virtual const GLComponent* glTexture( const ViewState & vs,
104 unsigned n = 0 ) const;
105 virtual TexInfo & glTexInfo( unsigned tex = 0 ) const;
106 virtual std::string viewStateID( glPart part, const ViewState & ) const;
107
108 private:
109 static int registerClass();
110 };
111
112}
113
114#endif
115
virtual void glSetTexRate(float rate, unsigned tex=0)
virtual glTextureMode glTexMode(unsigned tex=0) const
virtual GLPrimitives glTexNameGLL(const ViewState &, unsigned tex=0) const
virtual void glSetTexFiltering(glTextureFiltering x, unsigned tex=0)
virtual GLComponent * glAPI()
OpenGL objects API.
Definition mtexture.h:62
static int classType()
virtual void glGarbageCollector(int nkept=-1)
Frees unused display lists.
virtual void glSetTexMode(glTextureMode mode, unsigned tex=0)
virtual std::string viewStateID(glPart part, const ViewState &) const
Makes a unique ID from a viewstate.
virtual const GLComponent * glTexture(const ViewState &vs, unsigned n=0) const
virtual const float * glAutoTexParams(unsigned coord=0, unsigned tex=0) const
virtual glTextureFiltering glTexFiltering(unsigned tex=0) const
virtual void glSetAutoTexMode(glAutoTexturingMode mode, unsigned tex=0)
AMTexture(const std::vector< AObject * > &obj)
virtual glAutoTexturingMode glAutoTexMode(unsigned tex=0) const
virtual GLComponent * glTexture(const ViewState &vs, unsigned n=0)
virtual bool Is3DObject()
Can be display in 3D windows.
Definition mtexture.h:98
virtual void glSetTexRGBInterpolation(bool x, unsigned tex=0)
virtual void update(const Observable *, void *)
This class is an Observer of each of the AObject it groups.
virtual glTextureWrapMode glTexWrapMode(unsigned coord=0, unsigned tex=0) const
virtual void glSetTexWrapMode(glTextureWrapMode x, unsigned coord=0, unsigned tex=0)
virtual unsigned glDimTex(const ViewState &, unsigned tex=0) const
texture dimension (1, 2 [or 3])
virtual bool CanRemove(AObject *obj)
virtual unsigned glNumTextures() const
virtual bool glTexRGBInterpolation(unsigned tex=0) const
virtual const AObjectPalette * glPalette(unsigned tex=0) const
virtual const GLComponent * glAPI() const
OpenGL objects const API.
Definition mtexture.h:61
virtual bool Is2DObject()
Can be display in 2D windows.
Definition mtexture.h:97
virtual const float * glTexCoordArray(const ViewState &, unsigned tex=0) const
virtual int MType() const
Precise type of multi-object.
Definition mtexture.h:58
virtual float glTexRate(unsigned tex=0) const
virtual TexInfo & glTexInfo(unsigned tex=0) const
virtual unsigned glNumTextures(const ViewState &) const
virtual unsigned glTexCoordSize(const ViewState &, unsigned tex=0) const
texture array size (must be >= numVertex to work), defalut=0
virtual Tree * optionTree() const
Menu tree for new options, see object/optionMatcher.h.
virtual void glSetAutoTexParams(const float *params, unsigned coord=0, unsigned tex=0)
Base Anatomist object (abstract)
Definition Object.h:97
int type() const
Object type identifier.
Definition Object.h:159
Base class for all OpenGL objects in Anatomist (with OpenGL display lists)
Definition glcomponent.h:67
glPart
GL object parts, each driving a GL list.
This class can be subclassed to represent an object that the programmer wants to have observed.
Definition Observable.h:68
std::list< RefGLItem > GLPrimitives
Definition primitive.h:156
ViewState holds information about how a view wants to see an object.
Definition viewstate.h:67