20PStatCollector CollisionLevelStateBase::_node_volume_pcollector(
"Collision Volumes:PandaNode");
22TypeHandle CollisionLevelStateBase::_type_handle;
27void CollisionLevelStateBase::
30 _local_bounds.clear();
31 _parent_bounds.clear();
40 _colliders.reserve(num_colliders);
41 _local_bounds.reserve(num_colliders);
50 _colliders.push_back(def);
54 if (!bv->is_of_type(GeometricBoundingVolume::get_class_type())) {
55 _local_bounds.push_back(
nullptr);
60 DCAST_INTO_V(gbv, bv->make_copy());
66 if (bv->as_bounding_sphere()) {
71 if (pos_delta != LVector3::zero()) {
77 LMatrix4 inv_trans = LMatrix4::translate_mat(-pos_delta);
81 gbv_prev->xform(inv_trans);
87 gbv->xform(rel_transform->get_mat());
88 _local_bounds.push_back(gbv);
91 _parent_bounds = _local_bounds;
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
void reserve(int num_colliders)
Indicates an intention to add the indicated number of colliders to the level state.
void prepare_collider(const ColliderDef &def, const NodePath &root)
Adds the indicated Collider to the set of Colliders in the current level state.
The abstract base class for all things that can collide with other things in the world,...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
bool extend_by(const GeometricBoundingVolume *vol)
Increases the size of the volume to include the given volume.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
LVector3 get_pos_delta() const
Returns the delta vector from this node's position in the previous frame (according to set_prev_trans...
get_parent
Returns the NodePath to the parent of the referenced node: that is, this NodePath,...
const TransformState * get_transform(Thread *current_thread=Thread::get_current_thread()) const
Returns the complete transform object set on this node.
A lightweight class that represents a single element that may be timed and/or counted via stats.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.