Public Member Functions | |
InstanceList (const STTree *tree) | |
int | add_instance (const STTransform &transform) |
Adds a new instance of this tree at the indicated transform. | |
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. | |
STTransform | get_instance (int n) const |
Returns the transform of the nth instance of this tree. | |
int | get_num_instances () const |
Returns the number of instances of this tree. | |
const STTree * | get_tree () const |
Returns the particular tree this list refers to. | |
MAKE_SEQ (get_instances, get_num_instances, get_instance) | |
bool | operator< (const InstanceList &other) const |
Used for comparison for ov_set. | |
void | output (ostream &out) const |
void | remove_instance (int n) |
Removes the nth instance of this tree. | |
void | set_instance (int n, const STTransform &transform) |
Replaces the transform of the nth instance of this tree. | |
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. | |
Friends | |
class | SpeedTreeNode |
Definition at line 63 of file speedTreeNode.h.
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.
Referenced by SpeedTreeNode::add_instance(), SpeedTreeNode::add_instances_from(), and SpeedTreeNode::add_random_instances().
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 1960 of file speedTreeNode.cxx.
References STTransform::fillin(), NodePath::find(), Loader::get_global_ptr(), SpeedTreeNode::get_num_trees(), DatagramIterator::get_string(), SpeedTreeNode::get_tree(), DatagramIterator::get_uint32(), NodePath::is_empty(), and NodePath::node().
Referenced by SpeedTreeNode::fillin().
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().
Referenced by SpeedTreeNode::add_instances_from(), and SpeedTreeNode::snap_to_terrain().
int SpeedTreeNode::InstanceList::get_num_instances | ( | ) | const [inline] |
Returns the number of instances of this tree.
Definition at line 201 of file speedTreeNode.I.
Referenced by SpeedTreeNode::add_instances_from(), SpeedTreeNode::count_total_instances(), SpeedTreeNode::remove_tree(), and SpeedTreeNode::snap_to_terrain().
const STTree * SpeedTreeNode::InstanceList::get_tree | ( | ) | const [inline] |
Returns the particular tree this list refers to.
Definition at line 191 of file speedTreeNode.I.
Referenced by SpeedTreeNode::add_instances_from(), SpeedTreeNode::compute_internal_bounds(), SpeedTreeNode::fillin(), and SpeedTreeNode::remove_all_trees().
bool SpeedTreeNode::InstanceList::operator< | ( | const InstanceList & | other | ) | const [inline] |
Used for comparison for ov_set.
Definition at line 181 of file speedTreeNode.I.
void SpeedTreeNode::InstanceList::remove_instance | ( | int | n | ) | [inline] |
Removes the nth instance of this tree.
Definition at line 248 of file speedTreeNode.I.
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.
Referenced by SpeedTreeNode::snap_to_terrain().
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 1927 of file speedTreeNode.cxx.
References Datagram::add_string(), Datagram::add_uint32(), VirtualFileSystem::get_cwd(), Filename::get_dirname(), BamWriter::get_filename(), Filename::get_fullpath(), VirtualFileSystem::get_global_ptr(), and STTransform::write_datagram().
Referenced by SpeedTreeNode::write_datagram().