35 #ifndef ANA_MOBJECT_MOBJECT_H
36 #define ANA_MOBJECT_MOBJECT_H
43 class ObjectListIterator;
44 class const_ObjectListIterator;
45 class ObjectVectorIterator;
46 class const_ObjectVectorIterator;
48 class const_AGraphIterator;
49 class Fusion2DIterator;
50 class const_Fusion2DIterator;
51 class Fusion3DIterator;
52 class const_Fusion3DIterator;
53 class ATexSurfaceIterator;
54 class const_ATexSurfaceIterator;
81 virtual bool operator != (
const const_Fusion2DIterator & )
const
85 virtual bool operator != (
const const_Fusion3DIterator & )
const
97 inline bool BaseIterator::operator ==
101 return( ! (
operator != (x)) );
105 inline bool BaseIterator::operator !=
108 return( i.operator != ( *
this ) );
148 : _iterator( x._iterator->clone() )
168 if(
this == &i )
return( *
this );
258 virtual size_t size()
const = 0;
273 std::vector<float> & bmax )
const;
277 std::vector<float> & bmax )
const;
369 std::cout <<
"unable to erase object " << obj->
name()
371 <<
name() <<
" : object not found\n";
Multi-object generic iterator.
BaseIterator & subIterator()
void datatype
Data storage type, to be redefined by children classes.
AObject * operator*() const
AIterator & operator=(const AIterator &)
bool operator!=(const AIterator &) const
bool operator==(const AIterator &) const
BaseIterator * _iterator
Underlying specific iterator.
Base Anatomist object (abstract)
std::string name() const
Name shown in control window.
Textured surface iterator.
virtual BaseIterator & operator--()=0
virtual bool operator!=(const BaseIterator &) const
virtual BaseIterator & operator++()=0
virtual AObject * operator*() const =0
virtual BaseIterator * clone() const =0
bool operator==(const BaseIterator &) const
Multi-object : base abstract class for objects that contain others.
void eraseObject(AObject *obj)
virtual bool isTransparent() const
virtual void SetMaterial(const Material &mat)
virtual std::vector< float > voxelSize() const
Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1)
virtual const MObject * mObjectAPI() const
virtual iterator begin()=0
virtual AObject * objectAt(const std::vector< float > &pos, float tol=0)
Find the object (sub-object) at given postion with a tolerence.
virtual void setReferential(Referential *ref)
virtual void update(const Observable *observable, void *arg)
This class is an Observer of each of the AObject it groups.
virtual bool Is3DObject()
Can be display in 3D windows.
virtual bool Is2DObject()
Can be display in 2D windows.
virtual std::list< AObject * > generativeChildren() const
Children objects which have been used to build the current MObject.
virtual void insert(AObject *)=0
virtual void updateSubObjectReferential(const AObject *o)
virtual int MType() const =0
Precise type of multi-object.
int isMultiObject() const
maybe not necessary ?: we can use dynamic_cast instead
virtual void _eraseObject(AObject *o)
must be called by all subclasses if they reimplement erase()
virtual const_iterator find(const AObject *) const =0
bool hasContentChanged() const
virtual bool boundingBox(std::vector< float > &bmin, std::vector< float > &bmax) const
Fills bmin and bmax with the N-D bounding box extrema in the object's referential coordinates.
virtual bool renderingIsObserverDependent() const
true only if the rendering (openGL) of the object changes with the observer position/orientation of t...
virtual MObject * mObjectAPI()
virtual void setContentChanged() const
virtual void clearReferentialInheritance()
sets the object to get referential from to null, unregister it
virtual float MaxT() const
Obsolete, deprecated.
virtual void clearHasChangedFlags() const
virtual bool boundingBox2D(std::vector< float > &bmin, std::vector< float > &bmax) const
Bounding box in 2D views mode.
virtual size_t size() const =0
virtual const_iterator begin() const =0
virtual void _insertObject(AObject *o)
must be called by all subclasses in their insert() implementation
virtual bool render(PrimList &, const ViewState &)
rendering (generally 2D or 3D using OpenGL).
virtual void setReferentialInheritance(AObject *)
virtual bool shouldRemoveChildrenWithMe() const
tells whether children objects should be removed from views when this MObject is removed from a view.
virtual bool CanRemove(AObject *obj)
virtual std::list< AObject * > renderedSubObjects(const ViewState &) const
lis of objects displayed in render() in a default implementation
virtual const_iterator end() const =0
virtual float MinT() const
Obsolete, deprecated.
virtual void erase(iterator &)=0
virtual void setPalette(const AObjectPalette &pal)
This class has to be rewritten, it's really really a shame.......
This class can be subclassed to represent an object that the programmer wants to have observed.
void setChanged() const
Indicates that this object has changed.
Referential: marker for transformations, with an associated color.
Textured surface const_iterator.
std::list< carto::rc_ptr< GLItem > > PrimList
ViewState holds information about how a view wants to see an object.