Panda3D
Public Member Functions | Public Attributes | 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
 
int get_num_instances () const
 
const STTreeget_tree () const
 Returns the particular tree this list refers to. More...
 
bool operator< (const InstanceList &other) const
 Used for comparison for ov_set. More...
 
void output (std::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 (std::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...
 

Public Attributes

 get_instance
 Returns the transform of the nth instance of this tree. More...
 
 get_num_instances
 Returns the number of instances of this tree. More...
 

Friends

class SpeedTreeNode
 

Detailed Description

Definition at line 58 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 188 of file speedTreeNode.I.

◆ fillin()

void SpeedTreeNode::InstanceList::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.

Definition at line 1797 of file speedTreeNode.cxx.

References DatagramIterator::get_string().

◆ get_tree()

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

Returns the particular tree this list refers to.

Definition at line 153 of file speedTreeNode.I.

Referenced by SpeedTreeNode::add_instances_from(), and SpeedTreeNode::remove_all_trees().

◆ operator<()

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

Used for comparison for ov_set.

Definition at line 145 of file speedTreeNode.I.

◆ remove_instance()

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

Removes the nth instance of this tree.

Definition at line 197 of file speedTreeNode.I.

◆ 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 178 of file speedTreeNode.I.

◆ write_datagram()

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

Writes the contents of this object to the datagram for shipping out to a Bam file.

Definition at line 1767 of file speedTreeNode.cxx.

Referenced by SpeedTreeNode::write_datagram().

Member Data Documentation

◆ get_instance

STTransform SpeedTreeNode::InstanceList::get_instance
inline

Returns the transform of the nth instance of this tree.

Definition at line 68 of file speedTreeNode.h.

◆ get_num_instances

int SpeedTreeNode::InstanceList::get_num_instances
inline

Returns the number of instances of this tree.

Definition at line 68 of file speedTreeNode.h.

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


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