Panda3D
Public Member Functions | Public Attributes

LODNode::Switch Class Reference

List of all members.

Public Member Functions

 Switch (PN_stdfloat in, PN_stdfloat out)
PN_stdfloat get_in () const
PN_stdfloat get_out () const
PandaNodeget_ring_viz () const
 Returns a PandaNode suitable for rendering the ring associated with this switch.
PandaNodeget_spindle_viz () const
 Returns a PandaNode suitable for rendering the center spindle of the LODNode, in the color of this switch.
const RenderStateget_viz_model_state () const
 Returns a RenderState suitable for drawing the visible children of this switch level when the show_switch() debugging mode is enabled.
void hide ()
 Undoes a previous call to show().
bool in_range (PN_stdfloat dist) const
 Returns true if the indicated distance is within the range for the LOD.
bool in_range_2 (PN_stdfloat dist2) const
 Returns true if the indicated distance squared is within the range for the LOD.
bool is_shown () const
 Returns true if show() has been called.
void read_datagram (DatagramIterator &source)
 Reads the contents of the Switch from the datagram, presumably in response to reading a Bam file.
void rescale (PN_stdfloat factor)
 Scales the switching distances by the indicated factor.
void set_range (PN_stdfloat in, PN_stdfloat out)
void show (const LColor &color)
 Shows this ring in debug mode using the indicated color.
void write_datagram (Datagram &destination) const
 Writes the contents of the Switch out to the datagram, presumably in preparation to writing to a Bam file.

Public Attributes

UpdateSeq _bounds_seq
bool _verify_ok

Detailed Description

Definition at line 114 of file lodNode.h.


Member Function Documentation

PandaNode * LODNode::Switch::get_ring_viz ( ) const [inline]

Returns a PandaNode suitable for rendering the ring associated with this switch.

Definition at line 446 of file lodNode.I.

Referenced by LODNode::show_switches_cull_callback().

PandaNode * LODNode::Switch::get_spindle_viz ( ) const [inline]

Returns a PandaNode suitable for rendering the center spindle of the LODNode, in the color of this switch.

Definition at line 461 of file lodNode.I.

Referenced by LODNode::show_switches_cull_callback().

const RenderState * LODNode::Switch::get_viz_model_state ( ) const [inline]

Returns a RenderState suitable for drawing the visible children of this switch level when the show_switch() debugging mode is enabled.

Definition at line 477 of file lodNode.I.

Referenced by LODNode::show_switches_cull_callback().

void LODNode::Switch::hide ( ) [inline]

Undoes a previous call to show().

Definition at line 435 of file lodNode.I.

bool LODNode::Switch::in_range ( PN_stdfloat  dist) const [inline]

Returns true if the indicated distance is within the range for the LOD.

Definition at line 378 of file lodNode.I.

bool LODNode::Switch::in_range_2 ( PN_stdfloat  dist2) const [inline]

Returns true if the indicated distance squared is within the range for the LOD.

(The distance value is understood to be the square of the distance from the camera to the object.)

Definition at line 391 of file lodNode.I.

Referenced by LODNode::cull_callback(), and LODNode::show_switches_cull_callback().

bool LODNode::Switch::is_shown ( ) const [inline]

Returns true if show() has been called.

Definition at line 413 of file lodNode.I.

Referenced by LODNode::compute_internal_bounds(), and LODNode::show_switches_cull_callback().

void LODNode::Switch::read_datagram ( DatagramIterator source) [inline]

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

Definition at line 505 of file lodNode.I.

References DatagramIterator::get_stdfloat().

void LODNode::Switch::rescale ( PN_stdfloat  factor) [inline]

Scales the switching distances by the indicated factor.

Definition at line 401 of file lodNode.I.

void LODNode::Switch::show ( const LColor color) [inline]

Shows this ring in debug mode using the indicated color.

Definition at line 424 of file lodNode.I.

void LODNode::Switch::write_datagram ( Datagram destination) const [inline]

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

Definition at line 493 of file lodNode.I.

References Datagram::add_stdfloat().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations