anatomist 6.0.4
3D neuroimaging data viewer
GraphObject.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_GRAPH_GRAPHOBJECT_H
36#define ANA_GRAPH_GRAPHOBJECT_H
37
38
41
42
43namespace anatomist
44{
45
46 class AGraph;
47
48
53 {
54 public:
67
69 virtual ~AGraphObject();
70
73 virtual int MType() const { return AObject::GRAPHOBJECT; }
75
78
79 static ShowType showType() { return( _showType ); }
81 static void setShowType( ShowType type ) { _showType = type; }
83
84 virtual const Material & material() const;
85 virtual Material & GetMaterial();
86 virtual void SetMaterial( const Material & mat );
87 virtual void SetMaterialOrDefault( const AGraph* agr,
88 const Material & mat );
89
90 virtual carto::GenericObject* attributed() { return( _gobject.get() ); }
91 virtual const carto::GenericObject* attributed() const
92 { return( _gobject.get() ); }
93 virtual void internalUpdate();
94 virtual const AObjectPalette* palette() const { return 0; }
95 virtual AObjectPalette* palette() { return 0; }
96
97 virtual std::list<AObject *> renderedSubObjects( const ViewState & ) const;
98 virtual GLComponent* glGeometry( const ViewState & );
99 virtual const GLComponent* glGeometry( const ViewState & ) const ;
100
101 protected:
103
104 private:
106 static ShowType _showType;
107 };
108
109}
110
111
112namespace carto
113{
114#define _TMP_ std::map<anatomist::AObject *, std::string>
116#undef _TMP_
117}
118
119#endif
#define _TMP_
virtual const Material & material() const
static ShowType showType()
Visu mode (default is TRIANG)
Definition GraphObject.h:79
virtual int MType() const
Precise type of multi-object.
Definition GraphObject.h:73
virtual void SetMaterial(const Material &mat)
ShowType
Modes d'affichage des sous-objets.
Definition GraphObject.h:57
@ FIRST
Affiche seulement le 1er objet 3D de la liste.
Definition GraphObject.h:65
@ TRIANG
Affiche les triangulations seulement.
Definition GraphObject.h:59
@ BUCKET
Affiche les buckets seulement.
Definition GraphObject.h:61
@ ALL
Affiche tous les objets 3D.
Definition GraphObject.h:63
virtual GLComponent * glGeometry(const ViewState &)
virtual std::list< AObject * > renderedSubObjects(const ViewState &) const
lis of objects displayed in render() in a default implementation
virtual const AObjectPalette * palette() const
Definition GraphObject.h:94
carto::rc_ptr< carto::GenericObject > _gobject
virtual Material & GetMaterial()
virtual AObjectPalette * palette()
Normally, getOrCreatePalette() should be used instead of this function in most cases.
Definition GraphObject.h:95
virtual void internalUpdate()
Updates the state of the object.
AGraphObject(carto::GenericObject *go)
virtual void SetMaterialOrDefault(const AGraph *agr, const Material &mat)
virtual const carto::GenericObject * attributed() const
Definition GraphObject.h:91
virtual carto::GenericObject * attributed()
Definition GraphObject.h:90
static void setShowType(ShowType type)
Control the visualization mode.
Definition GraphObject.h:81
virtual const GLComponent * glGeometry(const ViewState &) const
AGraph object class.
Definition Graph.h:57
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
This class has to be rewritten, it's really really a shame.......
Definition Material.h:48
PythonAObject AttributedAObject
#define DECLARE_GENERIC_OBJECT_TYPE(T)
ViewState holds information about how a view wants to see an object.
Definition viewstate.h:67