Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
BoundingHexahedron Class Reference

This defines a bounding convex hexahedron. More...

#include "boundingHexahedron.h"

Inheritance diagram for BoundingHexahedron:
FiniteBoundingVolume GeometricBoundingVolume BoundingVolume TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Public Member Functions

 BoundingHexahedron (const LFrustum &frustum, bool is_ortho, CoordinateSystem cs=CS_default)
 
 BoundingHexahedron (const LPoint3 &fll, const LPoint3 &flr, const LPoint3 &fur, const LPoint3 &ful, const LPoint3 &nll, const LPoint3 &nlr, const LPoint3 &nur, const LPoint3 &nul)
 
virtual const BoundingHexahedronas_bounding_hexahedron () const
 Virtual downcast method. More...
 
virtual TypeHandle force_init_type ()
 
virtual LPoint3 get_approx_center () const
 
virtual LPoint3 get_max () const
 
virtual LPoint3 get_min () const
 
int get_num_planes () const
 
int get_num_points () const
 
LPlane get_plane (int n) const
 
LPoint3 get_point (int n) const
 
virtual TypeHandle get_type () const
 
virtual BoundingVolumemake_copy () const
 
virtual void output (std::ostream &out) const
 
virtual void write (std::ostream &out, int indent_level=0) const
 
virtual void xform (const LMatrix4 &mat)
 
- Public Member Functions inherited from FiniteBoundingVolume
virtual const FiniteBoundingVolumeas_finite_bounding_volume () const
 Virtual downcast method. More...
 
virtual PN_stdfloat get_volume () const
 
- Public Member Functions inherited from GeometricBoundingVolume
bool around (const GeometricBoundingVolume **first, const GeometricBoundingVolume **last)
 Resets the volume to enclose only the volumes indicated. More...
 
bool around (const LPoint3 *first, const LPoint3 *last)
 Resets the volume to enclose only the points indicated. More...
 
virtual GeometricBoundingVolumeas_geometric_bounding_volume () final
 Virtual downcast method. More...
 
virtual const GeometricBoundingVolumeas_geometric_bounding_volume () const final
 Virtual downcast method. More...
 
int contains (const GeometricBoundingVolume *vol) const
 Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated volume. More...
 
int contains (const LPoint3 &point) const
 Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated point. More...
 
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. More...
 
bool extend_by (const GeometricBoundingVolume *vol)
 Increases the size of the volume to include the given volume. More...
 
bool extend_by (const LPoint3 &point)
 Increases the size of the volume to include the given point. More...
 
- Public Member Functions inherited from BoundingVolume
bool around (const BoundingVolume **first, const BoundingVolume **last)
 Resets the volume to enclose only the volumes indicated. More...
 
virtual const BoundingBoxas_bounding_box () const
 Virtual downcast method. More...
 
virtual const BoundingLineas_bounding_line () const
 Virtual downcast method. More...
 
virtual const BoundingPlaneas_bounding_plane () const
 Virtual downcast method. More...
 
virtual const BoundingSphereas_bounding_sphere () const
 Virtual downcast method. More...
 
int contains (const BoundingVolume *vol) const
 Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indicated volume. More...
 
bool extend_by (const BoundingVolume *vol)
 Increases the size of the volume to include the given volume. More...
 
bool is_empty () const
 Any kind of volume might be empty. More...
 
bool is_infinite () const
 The other side of the empty coin is an infinite volume. More...
 
void set_infinite ()
 Marks the volume as infinite, even if it is normally finite. More...
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
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. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from FiniteBoundingVolume
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from GeometricBoundingVolume
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from BoundingVolume
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. More...
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
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. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Public Attributes

 get_num_planes
 Returns 6: the number of faces of a hexahedron. More...
 
 get_num_points
 Returns 8: the number of vertices of a hexahedron. More...
 
 get_plane
 Returns the nth face of the hexahedron. More...
 
 get_point
 Returns the nth vertex of the hexahedron. More...
 
- Public Attributes inherited from FiniteBoundingVolume
 get_max
 
 get_min
 
 get_volume
 
- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Friends

class BoundingBox
 
class BoundingSphere
 

Additional Inherited Members

- Public Types inherited from BoundingVolume
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
}
 

Detailed Description

This defines a bounding convex hexahedron.

It is typically used to represent a frustum, but may represent any enclosing convex hexahedron, including simple boxes. However, if all you want is an axis-aligned bounding box, you may be better off with the simpler BoundingBox class.

Definition at line 32 of file boundingHexahedron.h.

Member Function Documentation

◆ as_bounding_hexahedron()

const BoundingHexahedron * BoundingHexahedron::as_bounding_hexahedron ( ) const
virtual

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 193 of file boundingHexahedron.cxx.

Member Data Documentation

◆ get_num_planes

int BoundingHexahedron::get_num_planes
inline

Returns 6: the number of faces of a hexahedron.

Definition at line 63 of file boundingHexahedron.h.

◆ get_num_points

int BoundingHexahedron::get_num_points
inline

Returns 8: the number of vertices of a hexahedron.

Definition at line 60 of file boundingHexahedron.h.

◆ get_plane

LPlane BoundingHexahedron::get_plane
inline

Returns the nth face of the hexahedron.

Definition at line 63 of file boundingHexahedron.h.

◆ get_point

LPoint3 BoundingHexahedron::get_point
inline

Returns the nth vertex of the hexahedron.

Definition at line 60 of file boundingHexahedron.h.

Referenced by PortalClipper::draw_hexahedron().


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