Panda3D

Loading...
Searching...
No Matches
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.
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
int | get_num_instances () const
const STTree * | get_tree () const
| Returns the particular tree this list refers to.
bool | operator< (const InstanceList &other) const
| Used for comparison for ov_set.
void | output (std::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 (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.

## Public Attributes
| get_instance
| Returns the transform of the nth instance of this tree.
| get_num_instances
| Returns the number of instances of this tree.

## Friends
class | SpeedTreeNode

## Detailed Description

Definition at line 58 of file speedTreeNode.h.

## Constructor & Destructor Documentation

## ◆ InstanceList()

SpeedTreeNode::InstanceList::InstanceList | ( | const STTree * | tree | ) |
| inline

Definition at line 137 of file speedTreeNode.I.

## 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 187 of file speedTreeNode.I.

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

## ◆ 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 1796 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().

## ◆ get_tree()

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

Returns the particular tree this list refers to.

Definition at line 152 of file speedTreeNode.I.

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

## ◆ operator<()

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

Used for comparison for ov_set.

Definition at line 144 of file speedTreeNode.I.

## ◆ output()

void SpeedTreeNode::InstanceList::output | ( | std::ostream & | out | ) | const

Definition at line 1743 of file speedTreeNode.cxx.

## ◆ remove_instance()

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

Removes the nth instance of this tree.

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

Referenced by SpeedTreeNode::snap_to_terrain().

## ◆ write()

void SpeedTreeNode::InstanceList::write | ( | std::ostream & | out,
|  | int | indent_level = 0 ) const

Definition at line 1751 of file speedTreeNode.cxx.

## ◆ 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 1766 of file speedTreeNode.cxx.

References Datagram::add_string(), Datagram::add_uint32(), Filename::find_on_searchpath(), BamWriter::get_filename, Filename::get_fullpath(), VirtualFileSystem::get_global_ptr(), Filename::make_absolute(), Filename::make_relative_to(), and STTransform::write_datagram().

Referenced by SpeedTreeNode::write_datagram().

## Friends And Related Symbol Documentation

## ◆ SpeedTreeNode

friend class SpeedTreeNode
| friend

Definition at line 84 of file speedTreeNode.h.

## 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.

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

## ◆ 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::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:

- panda/src/speedtree/speedTreeNode.h
- panda/src/speedtree/speedTreeNode.cxx
- panda/src/speedtree/speedTreeNode.I