Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglLODState Class Reference

#include <sglLODState.hpp>

Inheritance diagram for sglLODState::

sglObject List of all members.

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

Detailed Description

This class contains scale and offset (bias) values that affect the range calculations of one or more sglLOD nodes to which it is assigned. This can be used to modify the selection behaviour of groups of sglLOD nodes. See the sglLOD class documentation for the effect on the range calculations for level-of-detail selection.


   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


Definition at line 58 of file sglLODState.hpp.

Constructor & Destructor Documentation

sglLODState::sglLODState ( )

Default constructor. The scale and offset default to 1 and 0 respectively (that is, no effect).

sglLODState::~sglLODState ( ) [virtual]

virtual destructor.

Member Function Documentation

void sglLODState::setRangeScale ( float val ) [inline]

Set the scale factor for sglLOD range calculations.

val   The scale value (any value is valid). This defaults to 1.

Definition at line 72 of file sglLODState.hpp.

Referenced by sglLODStateNode::setRangeScale().

float sglLODState::getRangeScale ( ) const [inline]

Get the current scale factor.

scale value.

Definition at line 77 of file sglLODState.hpp.

Referenced by sglLODStateNode::getRangeScale().

void sglLODState::setRangeOffset ( float val ) [inline]

Set the offset (bias) factor for sglLOD range calculations.

val   The bias value (any value is valid). This defaults to 0.

Definition at line 82 of file sglLODState.hpp.

Referenced by sglLODStateNode::setRangeOffset().

float sglLODState::getRangeOffset ( ) const [inline]

Get the current bias value.

bias value.

Definition at line 87 of file sglLODState.hpp.

Referenced by sglLODStateNode::getRangeOffset().

virtual void sglLODState::printInfo ( ostream & ostrm,
const char * indent_string ) const [virtual]

Output the state of this node to the specified ostream.

ostrm   the ostream to which the output is sent
indent_string   the string (usually spaces) that is output at the beginning of every line of output

Reimplemented from sglObject.

The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:08 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001