version 3.3

VRS::SceneThing Class Reference

Generic Scene Graph Node. More...

#include <vrs/sg/scenething.h>

Inheritance diagram for VRS::SceneThing:

VRS::SceneNode VRS::SharedObj VRS::Visitable VRS::CullingSceneThing VRS::OverlayImageGL VRS::OverlayImageGL VRS::SceneAdjuster VRS::SceneCallback VRS::SceneConfiguration VRS::TEXT::ScreenOverlay

List of all members.

Public Types

enum  { ModelView = 1, Projection = 2, Orientation = 4, All = 7 }

Public Member Functions

 SceneThing (SceneThing *parent=NULL)
virtual void append (SharedObj *obj)
virtual void append (Iterator< SO< SharedObj > > *iter)
virtual void prepend (SharedObj *obj)
virtual void prepend (Iterator< SO< SharedObj > > *iter)
virtual void insert (int position, SharedObj *obj)
virtual void insert (int position, Iterator< SO< SharedObj > > *iter)
virtual int replace (SharedObj *oldObj, SharedObj *newObj)
virtual void remove (int position)
virtual void remove (SharedObj *obj)
virtual void clear ()
virtual void appendContent (SceneThing *obj)
virtual void prependContent (SceneThing *obj)
virtual void insertContent (int position, SceneThing *obj)
virtual int objects () const
virtual SharedObjobject (int i) const
virtual bool contains (SharedObj *obj) const
virtual Iterator< SO
< SharedObj > > * 
find (const ID &objClassName) const
virtual int find (SharedObj *obj, int startIndex=0) const
void setFilter (unsigned int value)
unsigned int getFilter () const
void setMask (SharedObj *obj, unsigned int value)
void setMask (int position, unsigned int value)
unsigned int getMask (SharedObj *obj) const
unsigned int getMask (int position) const
void setWatching (int onOff)
int getWatching () const
Matrix modelviewMatrix (Engine *engine) const
Matrix projectionMatrix (Engine *engine) const
Matrix orientationMatrix (Engine *engine) const
void setLocalMatrix (const Matrix &matrix)
Matrix getLocalMatrix () const
virtual int childNodes () const
virtual SceneNodechildNode (int i) const
virtual void install (Engine *engine)
virtual void deinstall (Engine *engine)
virtual void evaluate (Engine *engine)
 Evaluation of a scene subgraph.
virtual
SceneNodeVisitor::TraversalFlag 
traverse (SceneNodeVisitor *visitor)
 For used-defined traversals of the scene graph using a SceneNodeVisitor.
virtual Bounds boundingBox (Engine *engine) const
 Calculates the bounding box of the scene graph.
 VRS_TYPEINFO (SceneThing, SceneNode)
 VRS_SERIALIZABLE (SceneThing)

Protected Member Functions

virtual bool accepts (const SharedObj *) const
int evaluateForward (Engine *, int from, int to)
void evaluateBackward (Engine *, int from, int to)
virtual void preEvaluate (Engine *)
virtual void postEvaluate (Engine *)
virtual
SceneNodeVisitor::TraversalFlag 
preTraverse (SceneNodeVisitor *)
virtual
SceneNodeVisitor::TraversalFlag 
postTraverse (SceneNodeVisitor *)
virtual void acceptChildren (std::vector< Visitable * > &appendChildrenHere) const


Detailed Description

Generic Scene Graph Node.

Member Enumeration Documentation

anonymous enum

Enumerator:
ModelView 
Projection 
Orientation 
All 


Constructor & Destructor Documentation

VRS::SceneThing::SceneThing ( SceneThing parent = NULL  ) 

Collection of graphics objects which specify any number and any configuration of attributes and shapes provided by VRS. According to the class of each object, `SceneThing' pushes attribute objects (resp. pops them), evalutes shape objects, and delegates the evaluation call to child nodes. The default constructor provides an empty SceneThing. The constructor with a parent SceneThing appends the new SceneThing as child to the parent SceneThing.


Member Function Documentation

virtual void VRS::SceneThing::append ( SharedObj obj  )  [virtual]

virtual void VRS::SceneThing::append ( Iterator< SO< SharedObj > > *  iter  )  [virtual]

virtual void VRS::SceneThing::prepend ( SharedObj obj  )  [virtual]

virtual void VRS::SceneThing::prepend ( Iterator< SO< SharedObj > > *  iter  )  [virtual]

virtual void VRS::SceneThing::insert ( int  position,
SharedObj obj 
) [virtual]

virtual void VRS::SceneThing::insert ( int  position,
Iterator< SO< SharedObj > > *  iter 
) [virtual]

virtual int VRS::SceneThing::replace ( SharedObj oldObj,
SharedObj newObj 
) [virtual]

virtual void VRS::SceneThing::remove ( int  position  )  [virtual]

virtual void VRS::SceneThing::remove ( SharedObj obj  )  [virtual]

virtual void VRS::SceneThing::clear (  )  [virtual]

All objects are ordered and managed by an internal list. `SceneThing' likes mono attributes, poly attributes, transforms, handlers, shapes and geometry nodes. The position refers to the internal list index, and starts with 0. Replaces the old object with the new one and returns the position (if oldObj is not contained objects() is returned).

virtual void VRS::SceneThing::appendContent ( SceneThing obj  )  [virtual]

virtual void VRS::SceneThing::prependContent ( SceneThing obj  )  [virtual]

virtual void VRS::SceneThing::insertContent ( int  position,
SceneThing obj 
) [virtual]

virtual int VRS::SceneThing::objects (  )  const [virtual]

copy the content of the SceneThing obj into this SceneThing. Objects get a new reference, their masks are copied.

virtual SharedObj* VRS::SceneThing::object ( int  i  )  const [virtual]

Both methods provide the access to the objects contained in an SceneThing. objects() returns the number of graphics objects that are stored in the SceneThing. object(i) returns the graphics object stored at the position i.

virtual bool VRS::SceneThing::contains ( SharedObj obj  )  const [virtual]

virtual Iterator<SO<SharedObj> >* VRS::SceneThing::find ( const ID objClassName  )  const [virtual]

virtual int VRS::SceneThing::find ( SharedObj obj,
int  startIndex = 0 
) const [virtual]

'contains' return true if the given object is one or multiple times contained in the thing. There are two types of find operation: one searches for objects of a certain class, the other one searches for a given object and returns its index; if the returned index is greater or equal to size() the given object is not contained in the SceneThing.

void VRS::SceneThing::setFilter ( unsigned int  value  ) 

unsigned int VRS::SceneThing::getFilter (  )  const

void VRS::SceneThing::setMask ( SharedObj obj,
unsigned int  value 
)

void VRS::SceneThing::setMask ( int  position,
unsigned int  value 
)

unsigned int VRS::SceneThing::getMask ( SharedObj obj  )  const

unsigned int VRS::SceneThing::getMask ( int  position  )  const

Each shared object stored in an SceneThing can be assigned a mask. The mask is used to determine whether a shared object is enabled or disabled. If the logical AND of the mask of a shared object and the current filter result to something different from zero, then a shared object is considered to be enabled. The filter and the mask can be used arbitrarily, e.g., to select a group of shared objects. By default, '1' is assigned as mask to shared objects included in an SceneThing. By default, the filter is set to '1'.

void VRS::SceneThing::setWatching ( int  onOff  ) 

int VRS::SceneThing::getWatching (  )  const

Turns on and off the recording of the projection, orientation, and model transformation matrices.

Matrix VRS::SceneThing::modelviewMatrix ( Engine engine  )  const

Matrix VRS::SceneThing::projectionMatrix ( Engine engine  )  const

Matrix VRS::SceneThing::orientationMatrix ( Engine engine  )  const

The matrices can only be inquired if the node has been evaluated at least once for the given rendering engine. You can call these methodes only if the watching has been turned on.

void VRS::SceneThing::setLocalMatrix ( const Matrix matrix  ) 

Matrix VRS::SceneThing::getLocalMatrix (  )  const

An internal Tf transformation which is applied before any other components are evaluated.

virtual int VRS::SceneThing::childNodes (  )  const [virtual]

virtual SceneNode* VRS::SceneThing::childNode ( int  i  )  const [virtual]

Provide access to subgraphs contained in the components of the SceneThing, that is, the SceneNode objects.

virtual void VRS::SceneThing::install ( Engine engine  )  [virtual]

Reimplemented from VRS::SceneNode.

Reimplemented in VRS::SceneCallback, and VRS::SceneConfiguration.

virtual void VRS::SceneThing::deinstall ( Engine engine  )  [virtual]

The installation and deinstallation requests are delegated to all child scene graph nodes. No attributes or handlers are applied to the engine. The filtering based on the masks is not used.

Reimplemented from VRS::SceneNode.

Reimplemented in VRS::SceneCallback, and VRS::SceneConfiguration.

virtual void VRS::SceneThing::evaluate ( Engine engine  )  [virtual]

Evaluation of a scene subgraph.

The evaluation applies all active shared objects to the engine. A shared object is active if its mask and the current filter have common bits. If the node is disabled (see setNodeState), nothing is evaluated.

Reimplemented from VRS::SceneNode.

Reimplemented in VRS::CullingSceneThing, VRS::SceneAdjuster, VRS::SceneCallback, and VRS::SceneConfiguration.

virtual SceneNodeVisitor::TraversalFlag VRS::SceneThing::traverse ( SceneNodeVisitor visitor  )  [virtual]

For used-defined traversals of the scene graph using a SceneNodeVisitor.

Reimplemented from VRS::SceneNode.

Reimplemented in VRS::SceneCallback.

virtual Bounds VRS::SceneThing::boundingBox ( Engine engine  )  const [virtual]

Calculates the bounding box of the scene graph.

Reimplemented from VRS::SceneNode.

Reimplemented in VRS::CullingSceneThing, and VRS::SceneAdjuster.

VRS::SceneThing::VRS_TYPEINFO ( SceneThing  ,
SceneNode   
)

VRS::SceneThing::VRS_SERIALIZABLE ( SceneThing   ) 

virtual bool VRS::SceneThing::accepts ( const SharedObj  )  const [protected, virtual]

Checks whethere a given object can be inserted to the thing.

Reimplemented in VRS::SceneConfiguration.

int VRS::SceneThing::evaluateForward ( Engine ,
int  from,
int  to 
) [protected]

void VRS::SceneThing::evaluateBackward ( Engine ,
int  from,
int  to 
) [protected]

Evaluation passes. The forward pass applies the attributes, stores handlers and renders shapes, optionally it also traverses subgraphes where it calls the `evaluate' method. The backward pass un-applies the attributes and un-stores handlers.

virtual void VRS::SceneThing::preEvaluate ( Engine  )  [protected, virtual]

Reimplemented in VRS::SceneAdjuster.

virtual void VRS::SceneThing::postEvaluate ( Engine  )  [protected, virtual]

Reimplemented in VRS::SceneAdjuster.

virtual SceneNodeVisitor::TraversalFlag VRS::SceneThing::preTraverse ( SceneNodeVisitor  )  [protected, virtual]

virtual SceneNodeVisitor::TraversalFlag VRS::SceneThing::postTraverse ( SceneNodeVisitor  )  [protected, virtual]

hooks for subclasses to introduce special behavior to the default implementation of the SceneThing class.

virtual void VRS::SceneThing::acceptChildren ( std::vector< Visitable * > &  appendChildrenHere  )  const [protected, virtual]

Reimplemented from VRS::Visitable.


The documentation for this class was generated from the following file:

Generated on Thu May 23 06:00:34 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact