#include <sglLODState.hpp>
Inheritance diagram for sglLODState::
Public Methods | |
sglLODState () | |
virtual | ~sglLODState () |
void | setRangeScale (float val) |
float | getRangeScale () const |
void | setRangeOffset (float val) |
float | getRangeOffset () const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Attributes | |
float | m_range_scale |
float | m_range_offset |
Example:
sglLOD *lod_node1 = new sglLOD; sglLOD *lod_node2 = new sglLOD; // halve the computed range and add a bias for this LOD only: has effect // of selecting finer resolution children at farther distances sglLODState *lod_state = new sglLODState; lod_state->setRangeScale(0.5f); // multiplicative factor lod_state->setRangeOffset(-20.0f); // additive factor lod_node1->setLODState(lod_state); lod_node2->setLODState(lod_state);
Definition at line 58 of file sglLODState.hpp.
|
Default constructor. The scale and offset default to 1 and 0 respectively (that is, no effect). |
|
virtual destructor.
|
|
Set the scale factor for sglLOD range calculations.
Definition at line 72 of file sglLODState.hpp. Referenced by sglLODStateNode::setRangeScale(). |
|
Get the current scale factor.
Definition at line 77 of file sglLODState.hpp. Referenced by sglLODStateNode::getRangeScale(). |
|
Set the offset (bias) factor for sglLOD range calculations.
Definition at line 82 of file sglLODState.hpp. Referenced by sglLODStateNode::setRangeOffset(). |
|
Get the current bias value.
Definition at line 87 of file sglLODState.hpp. Referenced by sglLODStateNode::getRangeOffset(). |
|
Output the state of this node to the specified ostream.
Reimplemented from sglObject. |