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

LODSwitch Class Reference

Defines a switching region for an LOD. More...

#include <LOD.h>

List of all members.

Public Member Functions

 LODSwitch ()
 LODSwitch (float in, float out)
 LODSwitch (const LODSwitch &copy)
void operator= (const LODSwitch &copy)
void get_range (float &in, float &out) const
float get_in () const
float get_out () const
void set_range (float in, float out)
bool in_range (float dist_squared) const
 Computes the distance between two points and returns true if the result is within the range for the LOD.

void rescale (float factor_squared)
 Scales the switching distances by the square root of the indicated factor.

bool operator== (const LODSwitch &other) const
bool operator!= (const LODSwitch &other) const
bool operator< (const LODSwitch &other) const
void write_datagram (Datagram &destination) const
 Writes the contents of the LODSwitch out to the datagram, presumably in preparation to writing to a Bam file.

void read_datagram (DatagramIterator &source)
 Reads the contents of the LODSwitch from the datagram, presumably in response to reading a Bam file.


Protected Attributes

float _in
float _out


Detailed Description

Defines a switching region for an LOD.

An object will be visible when it is closer than "in" units, but further than "out" units from the camera.

The sense of in vs. out distances is as if the object were coming towards you from far away: it switches "in" at the far distance, and switches "out" at the close distance. Thus, "in" should be larger than "out".

Definition at line 56 of file LOD.h.


Constructor & Destructor Documentation

LODSwitch::LODSwitch  )  [inline]
 

Definition at line 32 of file LOD.I.

References INLINE, and set_range().

LODSwitch::LODSwitch float  in,
float  out
[inline]
 

Definition at line 43 of file LOD.I.

References INLINE.

LODSwitch::LODSwitch const LODSwitch &  copy  )  [inline]
 

Definition at line 55 of file LOD.I.

References _in, _out, and INLINE.


Member Function Documentation

float LODSwitch::get_in  )  const [inline]
 

Definition at line 95 of file LOD.I.

References _in, _out, and INLINE.

Referenced by operator=().

float LODSwitch::get_out  )  const [inline]
 

Definition at line 107 of file LOD.I.

References _in, _out, and INLINE.

Referenced by operator=().

void LODSwitch::get_range float &  in,
float &  out
const [inline]
 

Definition at line 82 of file LOD.I.

bool LODSwitch::in_range float  dist_squared  )  const [inline]
 

Computes the distance between two points and returns true if the result is within the range for the LOD.

Definition at line 137 of file LOD.I.

bool LODSwitch::operator!= const LODSwitch &  other  )  const [inline]
 

Definition at line 177 of file LOD.I.

References _in, _out, DatagramIterator::get_float32(), and INLINE.

bool LODSwitch::operator< const LODSwitch &  other  )  const [inline]
 

Definition at line 189 of file LOD.I.

void LODSwitch::operator= const LODSwitch &  copy  )  [inline]
 

Definition at line 69 of file LOD.I.

References get_in(), and get_out().

bool LODSwitch::operator== const LODSwitch &  other  )  const [inline]
 

Definition at line 165 of file LOD.I.

References _in, _out, Datagram::add_float32(), and INLINE.

void LODSwitch::read_datagram DatagramIterator source  )  [inline]
 

Reads the contents of the LODSwitch from the datagram, presumably in response to reading a Bam file.

Definition at line 224 of file LOD.I.

void LODSwitch::rescale float  factor_squared  )  [inline]
 

Scales the switching distances by the square root of the indicated factor.

Definition at line 152 of file LOD.I.

References INLINE.

void LODSwitch::set_range float  in,
float  out
[inline]
 

Definition at line 119 of file LOD.I.

References _in, _out, and INLINE.

Referenced by LODSwitch().

void LODSwitch::write_datagram Datagram destination  )  const [inline]
 

Writes the contents of the LODSwitch out to the datagram, presumably in preparation to writing to a Bam file.

Definition at line 206 of file LOD.I.


Member Data Documentation

float LODSwitch::_in [protected]
 

Definition at line 81 of file LOD.h.

Referenced by get_in(), get_out(), LODSwitch(), operator!=(), operator==(), and set_range().

float LODSwitch::_out [protected]
 

Definition at line 82 of file LOD.h.

Referenced by get_in(), get_out(), LODSwitch(), operator!=(), operator==(), and set_range().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:52:06 2003 for Panda by doxygen1.3