#include <sglLODStateNode.hpp>
Inheritance diagram for sglLODStateNode::
Public Methods | |
sglLODStateNode () | |
virtual | ~sglLODStateNode () |
void | setRangeScale (float val) |
float | getRangeScale () const |
void | setRangeOffset (float val) |
float | getRangeOffset () const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectf &isector) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectd &isector) const |
virtual void | pick (sglPickf &pick_state, unsigned int cull_flags) const |
virtual void | pick (sglPickd &pick_state, unsigned int cull_flags) const |
virtual sglNode* | clone (unsigned int mode) const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods | |
virtual void | cull (sglCull< float > &trav_state, unsigned int cull_flags) const |
virtual void | cull (sglCull< double > &trav_state, unsigned int cull_flags) const |
void | copyTo (sglLODStateNode *dst, unsigned int mode) const |
Protected Attributes | |
sglLODState | m_lod_state |
new_traversal_scale = old_traversal_scale*lod_state_node_scale new_traversal_offset= old_traversal_offset*lod_state_node_scale + lod_state_node_offset
Note: the affect of nested sglLODStateNodes is cummulative.
After computation of the new scale and offset, traversal then proceeds as if this were an sglGroup node.
Example:
sglLODStateNode *lod_state_node = new sglLODStateNode; sglLOD *lod_node = new sglLOD; lod_state_node->addChild(lod_node); // scales and offsets the range calculations for all sglLOD nodes that // appear below (as descendants of) it in the scene graph lod_state_node->setRangeScale(2.0f); lod_state_node->setRangeOffset(-20.0f);
Definition at line 71 of file sglLODStateNode.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
Set the scale factor for subsequent LOD range calculations.
Definition at line 82 of file sglLODStateNode.hpp. |
|
Get the current scale factor.
Definition at line 87 of file sglLODStateNode.hpp. |
|
Set the offset (bias) factor for subsequent LOD range calculations.
Definition at line 92 of file sglLODStateNode.hpp. |
|
Get the currect bias value.
Definition at line 97 of file sglLODStateNode.hpp. |
|
The single precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The double precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The single precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
The double precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
Make a copy of the scenegraph rooted at this node.
Reimplemented from sglGroup. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglGroup. |
|
The single precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |
|
The double precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |