Panda3D
Public Member Functions | Friends | List of all members
SpeedTreeNode::InstanceList Class Reference

Public Member Functions

 InstanceList (const STTree *tree)
 
int add_instance (const STTransform &transform)
 Adds a new instance of this tree at the indicated transform. More...
 
void fillin (DatagramIterator &scan, BamReader *manager)
 This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new SpeedTreeNode. More...
 
STTransform get_instance (int n) const
 Returns the transform of the nth instance of this tree. More...
 
int get_num_instances () const
 Returns the number of instances of this tree. More...
 
const STTreeget_tree () const
 Returns the particular tree this list refers to. More...
 
 MAKE_SEQ (get_instances, get_num_instances, get_instance)
 
bool operator< (const InstanceList &other) const
 Used for comparison for ov_set. More...
 
void output (ostream &out) const
 
void remove_instance (int n)
 Removes the nth instance of this tree. More...
 
void set_instance (int n, const STTransform &transform)
 Replaces the transform of the nth instance of this tree. More...
 
void write (ostream &out, int indent_level=0) const
 
void write_datagram (BamWriter *manager, Datagram &dg)
 Writes the contents of this object to the datagram for shipping out to a Bam file. More...
 

Friends

class SpeedTreeNode
 

Detailed Description

Definition at line 63 of file speedTreeNode.h.

Member Function Documentation

◆ add_instance()

int SpeedTreeNode::InstanceList::add_instance ( const STTransform transform)
inline

Adds a new instance of this tree at the indicated transform.

Returns the index number of the new instance.

Definition at line 237 of file speedTreeNode.I.

References remove_instance().

Referenced by SpeedTreeNode::add_instances_from(), SpeedTreeNode::add_random_instances(), and set_instance().

◆ fillin()

void SpeedTreeNode::InstanceList::fillin ( DatagramIterator scan,
BamReader manager 
)

◆ get_instance()

STTransform SpeedTreeNode::InstanceList::get_instance ( int  n) const
inline

Returns the transform of the nth instance of this tree.

Definition at line 212 of file speedTreeNode.I.

References STTransform::ident_mat(), and set_instance().

Referenced by SpeedTreeNode::add_instances_from(), get_num_instances(), and SpeedTreeNode::snap_to_terrain().

◆ get_num_instances()

int SpeedTreeNode::InstanceList::get_num_instances ( ) const
inline

Returns the number of instances of this tree.

Definition at line 201 of file speedTreeNode.I.

References get_instance().

Referenced by SpeedTreeNode::add_instances_from(), SpeedTreeNode::count_total_instances(), get_tree(), SpeedTreeNode::remove_tree(), and SpeedTreeNode::snap_to_terrain().

◆ get_tree()

const STTree * SpeedTreeNode::InstanceList::get_tree ( ) const
inline

◆ operator<()

bool SpeedTreeNode::InstanceList::operator< ( const InstanceList other) const
inline

Used for comparison for ov_set.

Definition at line 181 of file speedTreeNode.I.

References get_tree().

Referenced by SpeedTreeNode::get_global_time_delta().

◆ remove_instance()

void SpeedTreeNode::InstanceList::remove_instance ( int  n)
inline

Removes the nth instance of this tree.

Definition at line 248 of file speedTreeNode.I.

Referenced by add_instance().

◆ set_instance()

void SpeedTreeNode::InstanceList::set_instance ( int  n,
const STTransform transform 
)
inline

Replaces the transform of the nth instance of this tree.

Definition at line 224 of file speedTreeNode.I.

References add_instance().

Referenced by get_instance(), and SpeedTreeNode::snap_to_terrain().

◆ write_datagram()

void SpeedTreeNode::InstanceList::write_datagram ( BamWriter manager,
Datagram dg 
)

The documentation for this class was generated from the following files: