Panda3D
|
An inverted sphere: this is a sphere whose collision surface is the inside surface of the sphere. More...
#include "collisionInvSphere.h"
Public Member Functions | |
CollisionInvSphere (const LPoint3 ¢er, PN_stdfloat radius) | |
CollisionInvSphere (PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius) | |
CollisionInvSphere (const CollisionInvSphere ©) | |
virtual TypeHandle | force_init_type () |
virtual PStatCollector & | get_test_pcollector () |
Returns a PStatCollector that is used to count the number of intersection tests made against a solid of this type in a given frame. | |
virtual TypeHandle | get_type () const |
virtual PStatCollector & | get_volume_pcollector () |
Returns a PStatCollector that is used to count the number of bounding volume tests made against a solid of this type in a given frame. | |
virtual CollisionSolid * | make_copy () |
virtual void | output (ostream &out) const |
virtual | PT (CollisionEntry) test_intersection(const CollisionEntry &entry) const |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Factory method to generate a CollisionInvSphere object. | |
Protected Member Functions | |
CollisionInvSphere () | |
Creates an invalid sphere. | |
virtual void | fill_viz_geom () |
Fills the _viz_geom GeomNode up with Geoms suitable for rendering this solid. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place. | |
virtual | PT (BoundingVolume) compute_internal_bounds() const |
virtual | PT (CollisionEntry) test_intersection_from_sphere(const CollisionEntry &entry) const |
virtual | PT (CollisionEntry) test_intersection_from_line(const CollisionEntry &entry) const |
virtual | PT (CollisionEntry) test_intersection_from_ray(const CollisionEntry &entry) const |
virtual | PT (CollisionEntry) test_intersection_from_segment(const CollisionEntry &entry) const |
Static Protected Member Functions | |
static TypedWritable * | make_CollisionInvSphere (const FactoryParams ¶ms) |
Factory method to generate a CollisionInvSphere object. |
An inverted sphere: this is a sphere whose collision surface is the inside surface of the sphere.
Everything outside the sphere is solid matter; everything inside is empty space. Useful for constraining objects to remain within a spherical perimeter.
Definition at line 31 of file collisionInvSphere.h.
CollisionInvSphere::CollisionInvSphere | ( | ) | [inline, protected] |
Creates an invalid sphere.
Only used when reading from a bam file.
Definition at line 45 of file collisionInvSphere.I.
Referenced by make_CollisionInvSphere().
void CollisionInvSphere::fill_viz_geom | ( | ) | [protected, virtual] |
Fills the _viz_geom GeomNode up with Geoms suitable for rendering this solid.
Reimplemented from CollisionSphere.
Definition at line 322 of file collisionInvSphere.cxx.
References GeomVertexWriter::add_data3(), CollisionSphere::compute_point(), and GeomVertexFormat::get_v3().
void CollisionInvSphere::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.
Reimplemented from CollisionSphere.
Definition at line 404 of file collisionInvSphere.cxx.
Referenced by make_CollisionInvSphere().
PStatCollector & CollisionInvSphere::get_test_pcollector | ( | ) | [virtual] |
Returns a PStatCollector that is used to count the number of intersection tests made against a solid of this type in a given frame.
Reimplemented from CollisionSphere.
Definition at line 78 of file collisionInvSphere.cxx.
PStatCollector & CollisionInvSphere::get_volume_pcollector | ( | ) | [virtual] |
Returns a PStatCollector that is used to count the number of bounding volume tests made against a solid of this type in a given frame.
Reimplemented from CollisionSphere.
Definition at line 66 of file collisionInvSphere.cxx.
TypedWritable * CollisionInvSphere::make_CollisionInvSphere | ( | const FactoryParams & | params | ) | [static, protected] |
Factory method to generate a CollisionInvSphere object.
Definition at line 385 of file collisionInvSphere.cxx.
References CollisionInvSphere(), and fillin().
Referenced by register_with_read_factory().
void CollisionInvSphere::register_with_read_factory | ( | ) | [static] |
Factory method to generate a CollisionInvSphere object.
Reimplemented from CollisionSphere.
Definition at line 364 of file collisionInvSphere.cxx.
References BamReader::get_factory(), make_CollisionInvSphere(), and Factory< Type >::register_factory().
void CollisionInvSphere::write_datagram | ( | BamWriter * | manager, |
Datagram & | me | ||
) | [virtual] |
Function to write the important information in the particular object to a Datagram.
Reimplemented from CollisionSphere.
Definition at line 375 of file collisionInvSphere.cxx.