Panda3D
|
This is another abstract class, for a general class of bounding volumes that actually enclose points in 3-d space, such as BSP's and bounding spheres. More...
#include "geometricBoundingVolume.h"
Public Member Functions | |
bool | around (const GeometricBoundingVolume **first, const GeometricBoundingVolume **last) |
Resets the volume to enclose only the volumes indicated. | |
bool | around (const LPoint3 *first, const LPoint3 *last) |
Resets the volume to enclose only the points indicated. | |
virtual const GeometricBoundingVolume * | as_geometric_bounding_volume () const final |
Virtual downcast method. | |
virtual GeometricBoundingVolume * | as_geometric_bounding_volume () final |
Virtual downcast method. | |
int | contains (const GeometricBoundingVolume *vol) const |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated volume. | |
int | contains (const LPoint3 &a, const LPoint3 &b) const |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated line segment. | |
int | contains (const LPoint3 &point) const |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated point. | |
bool | extend_by (const GeometricBoundingVolume *vol) |
Increases the size of the volume to include the given volume. | |
bool | extend_by (const LPoint3 &point) |
Increases the size of the volume to include the given point. | |
virtual TypeHandle | force_init_type () |
virtual LPoint3 | get_approx_center () const =0 |
virtual TypeHandle | get_type () const |
virtual void | xform (const LMatrix4 &mat)=0 |
![]() | |
bool | around (const BoundingVolume **first, const BoundingVolume **last) |
Resets the volume to enclose only the volumes indicated. | |
virtual const BoundingBox * | as_bounding_box () const |
Virtual downcast method. | |
virtual const BoundingHexahedron * | as_bounding_hexahedron () const |
Virtual downcast method. | |
virtual const BoundingLine * | as_bounding_line () const |
Virtual downcast method. | |
virtual const BoundingPlane * | as_bounding_plane () const |
Virtual downcast method. | |
virtual const BoundingSphere * | as_bounding_sphere () const |
Virtual downcast method. | |
virtual const FiniteBoundingVolume * | as_finite_bounding_volume () const |
Virtual downcast method. | |
int | contains (const BoundingVolume *vol) const |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated volume. | |
bool | extend_by (const BoundingVolume *vol) |
Increases the size of the volume to include the given volume. | |
bool | is_empty () const |
Any kind of volume might be empty. | |
bool | is_infinite () const |
The other side of the empty coin is an infinite volume. | |
virtual BoundingVolume * | make_copy () const =0 |
virtual void | output (std::ostream &out) const =0 |
void | set_infinite () |
Marks the volume as infinite, even if it is normally finite. | |
virtual void | write (std::ostream &out, int indent_level=0) const |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
static BoundsType | string_bounds_type (const std::string &str) |
Returns the BoundsType corresponding to the indicated string. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Additional Inherited Members | |
![]() | |
enum | BoundsType { BT_default , BT_best , BT_sphere , BT_box , BT_fastest } |
enum | IntersectionFlags { IF_no_intersection = 0 , IF_possible = 0x01 , IF_some = 0x02 , IF_all = 0x04 , IF_dont_understand = 0x08 } |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
This is another abstract class, for a general class of bounding volumes that actually enclose points in 3-d space, such as BSP's and bounding spheres.
Definition at line 29 of file geometricBoundingVolume.h.
|
inline |
Definition at line 17 of file geometricBoundingVolume.I.
|
inline |
Resets the volume to enclose only the volumes indicated.
Definition at line 43 of file geometricBoundingVolume.I.
References BoundingVolume::around().
Referenced by TextNode::compute_internal_bounds(), PT(), and PT().
|
inline |
Resets the volume to enclose only the points indicated.
Definition at line 53 of file geometricBoundingVolume.I.
|
finalvirtual |
Virtual downcast method.
Returns this object as a pointer of the indicated type, if it is in fact that type. Returns NULL if it is not that type.
Reimplemented from BoundingVolume.
Definition at line 32 of file geometricBoundingVolume.cxx.
|
finalvirtual |
Virtual downcast method.
Returns this object as a pointer of the indicated type, if it is in fact that type. Returns NULL if it is not that type.
Reimplemented from BoundingVolume.
Definition at line 23 of file geometricBoundingVolume.cxx.
Referenced by CullBinBackToFront::add_object(), CullBinFrontToBack::add_object(), and CullTraverser::traverse().
|
inline |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated volume.
Definition at line 67 of file geometricBoundingVolume.I.
References BoundingVolume::contains().
Referenced by IntersectionBoundingVolume::add_component(), UnionBoundingVolume::add_component(), CollisionLevelState< MaskType >::any_in_bounds(), LensNode::is_in_view(), and PortalClipper::is_whole_portal_in_view().
|
inline |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated line segment.
Definition at line 89 of file geometricBoundingVolume.I.
References BoundingVolume::is_empty().
|
inline |
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated point.
Definition at line 76 of file geometricBoundingVolume.I.
References BoundingVolume::is_empty().
|
inline |
Increases the size of the volume to include the given volume.
Definition at line 27 of file geometricBoundingVolume.I.
References BoundingVolume::extend_by().
Referenced by CollisionLevelStateBase::prepare_collider(), and PT().
|
inline |
Increases the size of the volume to include the given point.
Definition at line 35 of file geometricBoundingVolume.I.
|
inlinevirtual |
Reimplemented from BoundingVolume.
Definition at line 80 of file geometricBoundingVolume.h.
|
inlinestatic |
Definition at line 69 of file geometricBoundingVolume.h.
|
inlinevirtual |
Reimplemented from BoundingVolume.
Definition at line 77 of file geometricBoundingVolume.h.
|
inlinestatic |
Definition at line 72 of file geometricBoundingVolume.h.