#include <GeoNode.h>
Inheritance diagram for nvsg::GeoNode:
Public Methods | |
virtual NVSG_API GeoNode * | clone (void) const |
Create a new GeoNode by copying from this. More... | |
NVSG_API bool | addGeometry (const Drawable *pDrawable, const StateSet *pStateSet) |
Add a Geometry to the GeoNode. More... | |
NVSG_API size_t | getNumberOfGeometries (void) const |
Get the number of Geometries of this GeoNode. More... | |
NVSG_API const Drawable * | getDrawable (size_t index) const |
Returns the Drawable at position index. More... | |
NVSG_API size_t | getDrawables (std::vector< const Drawable * > &v, const StateSet *pStateSet=NULL) const |
Get the Drawables that use a given StateSet. More... | |
NVSG_API size_t | getNumberOfDrawables (void) const |
Get the number of Drawables in this GeoNode. More... | |
NVSG_API void | replaceDrawable (const Drawable *newDrawable, const Drawable *oldDrawable) |
Replace all occurrences of a specified Drawable. More... | |
NVSG_API const StateSet * | getStateSet (size_t index) const |
Returns the StateSet at position index. More... | |
NVSG_API const StateSet * | getStateSet (const Drawable *pDrawable) const |
Returns the StateSet of a specified Drawable. More... | |
NVSG_API size_t | getStateSets (std::vector< const StateSet * > &v) const |
Get all StateSets used. More... | |
NVSG_API size_t | getNumberOfStateSets (void) const |
Get the number of (different) StateSets in this GeoNode. More... | |
NVSG_API void | replaceStateSet (const StateSet *newStateSet, const StateSet *oldStateSet) |
Replace all occurrences of a specified StateSet. More... | |
NVSG_API void | replaceStateSet (const StateSet *newStateSet, const Drawable *drawable) |
Replace the StateSet for a specified Drawable. More... | |
NVSG_API bool | removeGeometry (const Drawable *pDrawable, const StateSet *pStateSet=NULL) |
Remove one Geometry from this GeoNode. More... | |
NVSG_API void | removeGeometry (size_t index) |
Remove the Geometry at position index. More... | |
NVSG_API bool | removeGeometries (const StateSet *pStateSet=NULL) |
Remove the Geometries with a given StateSet. More... | |
NVSG_API void | generateTexCoords (TextureCoordType tct, size_t tu=0) |
Generate texture coordinates on all geometries. More... | |
NVSG_API void | calculateTangentSpace (size_t tu=0, size_t tg=1, size_t bn=2) |
Generate tangents and binormals for all geometries. More... | |
virtual NVSG_API bool | containsCgFx (void) const |
Ask if this GeoNode contains any CgFx attributes. More... | |
virtual NVSG_API void | invalidateCgFxContainment (void) |
Invalidate the CgFx containment cache. More... | |
virtual NVSG_API bool | containsTransparentMaterial (void) const |
Ask if this GeoNode contains any transparent Material attributes. More... | |
virtual NVSG_API void | invalidateTransparentMaterialContainment (void) |
Invalidate the transparent Material containment cache. More... | |
virtual NVSG_API bool | containsTransparentTexture (void) const |
Ask if this GeoNode contains any transparent Texture. More... | |
virtual NVSG_API void | invalidateTransparentTextureContainment (void) |
Invalidate the transparent Texture containment cache. More... | |
virtual NVSG_API void | invalidateNumberOfFrames (void) const |
Invalidate the number of animation frames cache. More... | |
virtual NVSG_API size_t | getNumberOfFrames (void) const |
Get the number of animation frames that are part of this Node. More... | |
virtual NVSG_API DataID | getDataID (void) const |
Get the DataID of the data of this object. More... | |
virtual NVSG_API bool | isDataShared (void) const |
Determine whether the data of this object is shared. More... | |
Static Public Methods | |
NVSG_API const GeoNode * | create (void) |
Create a GeoNode. More... | |
NVSG_API const GeoNode * | createFromBase (const Node &rhs) |
Create a GeoNode by copying from a Node. More... | |
Protected Methods | |
NVSG_API | GeoNode (void) |
Default Constructor. More... | |
NVSG_API | GeoNode (const Node &rhs) |
Partial Constructor. More... | |
NVSG_API | GeoNode (const GeoNode &rhs) |
Copy Constructor. More... | |
virtual NVSG_API | ~GeoNode (void) |
Protected destructor to prevent explicit creation on stack. More... | |
virtual NVSG_API bool | calcBoundingSphere (void) const |
Calculate the bounding sphere of this GeoNode. More... | |
NVSG_API void | invalidateCaches (const StateSet *pStateSet, bool insert) |
Invalidate all caches of this GeoNode, maybe depending on the added or removed StateSet. More... |
A GeoNode holds a number of geometries. A Geometry consists of a Drawable - defining the topology, and a StateSet - defining the visual appearance.
|
Default Constructor.
|
|
Partial Constructor.
|
|
Copy Constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Create a GeoNode.
|
|
Create a GeoNode by copying from a Node.
|
|
Create a new GeoNode by copying from this.
Implements nvsg::Node. |
|
Add a Geometry to the GeoNode. If the GeoNode already holds a geometry with the same Drawable, no geometry is added. Otherwise the pair of pDrawable and pStateSet is added to the set of geometries.
|
|
Get the number of Geometries of this GeoNode.
|
|
Returns the Drawable at position index.
|
|
Get the Drawables that use a given StateSet. Fills the vector v with the pointers to all const Drawables. If pStateSet is not NULL, only the Drawables that use that StateSet are returned.
|
|
Get the number of Drawables in this GeoNode.
|
|
Replace all occurrences of a specified Drawable. The function replaces all occurrences of oldDrawable by newDrawable.
|
|
Returns the StateSet at position index.
|
|
Returns the StateSet of a specified Drawable.
|
|
Get all StateSets used. Fills the vector v with the constant pointers to all (different) StateSets.
|
|
Get the number of (different) StateSets in this GeoNode.
|
|
Replace all occurrences of a specified StateSet. The function replaces all occurrences of oldStateSet by newStateSet. |
|
Replace the StateSet for a specified Drawable. The function replaces the StateSet currently assigned to \s drawable by newStateSet. |
|
Remove one Geometry from this GeoNode. Removes the Geometry with Drawable pDrawable from the GeoNode. If pStateSet is not NULL, the Geometry is only removed if it corresponds to pDrawable.
|
|
Remove the Geometry at position index.
|
|
Remove the Geometries with a given StateSet. If pStateSet is given, all Geometries that use that StateSet are removed. Otherwise all Geometries are removed (i.e. the GeoNode is cleared).
|
|
Generate texture coordinates on all geometries. There are three different methods for texture generation: TCT_CYLINDRICAL, TCT_PLANAR, and TCT_SPHERICAL.
|
|
Generate tangents and binormals for all geometries. To generate tangents and binormals there have to be texture coordinates.
|
|
Ask if this GeoNode contains any CgFx attributes.
Reimplemented from nvsg::Node. |
|
Invalidate the CgFx containment cache. The cache is invalidated and the invalidation of a Node is called. Reimplemented from nvsg::Node. |
|
Ask if this GeoNode contains any transparent Material attributes.
Reimplemented from nvsg::Node. |
|
Invalidate the transparent Material containment cache. The cache is invalidated and the invalidation of a Node is called. Reimplemented from nvsg::Node. |
|
Ask if this GeoNode contains any transparent Texture.
Reimplemented from nvsg::Node. |
|
Invalidate the transparent Texture containment cache. The cache is invalidated and the invalidation of a Node is called. Reimplemented from nvsg::Node. |
|
Invalidate the number of animation frames cache. The cache is invalidated and the invalidation of a Node is called. Reimplemented from nvsg::Node. |
|
Get the number of animation frames that are part of this Node.
Reimplemented from nvsg::Node. |
|
Get the DataID of the data of this object.
Reimplemented from nvsg::Node. |
|
Determine whether the data of this object is shared.
Reimplemented from nvsg::Node. |
|
Calculate the bounding sphere of this GeoNode. The bounding sphere of a GeoNode is calculated by combining the bounding spheres of all its geometries.
Implements nvsg::Node. |
|
Invalidate all caches of this GeoNode, maybe depending on the added or removed StateSet. Invalidates the bounding sphere of this GeoNode. If the CgFx containment changes by adding/removing pStateSet, the CgFx cache is invalidated.
|