anatomist  5.1.2
3D neuroimaging data viewer
transformedobject.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_TRANSFORMEDOBJECT_H
36 #define ANA_SURFACE_TRANSFORMEDOBJECT_H
37 
38 
41 
42 
43 namespace anatomist
44 {
45 
46  class Referential;
47  class Geometry;
48 
49 
54  {
55  public:
56  TransformedObject( const std::vector<AObject *> &,
57  bool followorientation=true,
58  bool followposition=false,
59  const Point3df & pos=Point3df( 1, 1, 0 ),
60  bool strongrefs=false );
62  bool followorientation=true,
63  bool followposition=false,
64  const Point3df & pos=Point3df( 1, 1, 0 ) );
65  virtual ~TransformedObject();
66 
67  virtual bool renderingIsObserverDependent() const;
68  virtual bool render( PrimList &, const ViewState & );
69  void setPosition( const Point3df & );
71  Point3df position() const;
72  void setOffset( const Point3df & );
74  Point3df offset() const;
77  bool usesDynamicOffset() const;
79  void setScale( float scale );
80  float scale() const;
81  bool followsOrientation() const;
82  void setFollowOrientation( bool x );
83  bool followsPosition() const;
84  void setFollowPosition( bool x );
85  virtual const GLComponent* glAPI() const { return ObjectVector::glAPI(); }
86  virtual GLComponent* glAPI() { return ObjectVector::glAPI(); }
87 
88 
89  protected:
92 
93  private:
94  struct Private;
95  Private *d;
96  };
97 
98 }
99 
100 #endif
101 
virtual const GLComponent * glAPI() const
OpenGL objects const API.
Definition: Object.h:150
Base class for all OpenGL objects in Anatomist (with OpenGL display lists)
Definition: glcomponent.h:67
it's a list, in fact...
Definition: objectVector.h:212
A container object which displays its children either with a fixed orientation, or at a fixed positio...
virtual bool render(PrimList &, const ViewState &)
rendering (generally 2D or 3D using OpenGL).
void setScale(float scale)
Point3df offset() const
3D constant offset in camera coords
virtual bool renderingIsObserverDependent() const
true only if the rendering (openGL) of the object changes with the observer position/orientation of t...
void setDynamicOffsetFromPoint(const Point3df &)
void popTransformationMatrixes(GLPrimitives &)
void setPosition(const Point3df &)
void setupTransforms(GLPrimitives &, const ViewState &)
void setOffset(const Point3df &)
virtual const GLComponent * glAPI() const
Point3df position() const
position in model view coords
TransformedObject(const std::vector< AObject * > &, bool followorientation=true, bool followposition=false, const Point3df &pos=Point3df(1, 1, 0), bool strongrefs=false)
virtual GLComponent * glAPI()
TransformedObject(const std::vector< carto::shared_ptr< AObject > > &, bool followorientation=true, bool followposition=false, const Point3df &pos=Point3df(1, 1, 0))
Point3df dynamicOffsetFromPoint() const
std::list< carto::rc_ptr< GLItem > > PrimList
Definition: Object.h:72
std::list< RefGLItem > GLPrimitives
Definition: primitive.h:156
ViewState holds information about how a view wants to see an object.
Definition: viewstate.h:67