Panda3D
|
This object represents a solid made entirely of triangles, which will only be tested again z axis aligned rays. More...
#include "collisionFloorMesh.h"
Classes | |
struct | TriangleIndices |
Public Member Functions | |
CollisionFloorMesh () | |
This is only for the convenience of CollisionPolygon. | |
CollisionFloorMesh (const CollisionFloorMesh ©) | |
void | add_triangle (unsigned int pointA, unsigned int pointB, unsigned int pointC) |
store a triangle for processing | |
void | add_vertex (const LPoint3 &vert) |
store away a vertex to index against | |
virtual TypeHandle | force_init_type () |
virtual LPoint3 | get_collision_origin () const |
Returns the point in space deemed to be the "origin" of the solid for collision purposes. | |
const unsigned int | get_num_triangles () const |
const unsigned int | get_num_vertices () const |
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. | |
const LPoint3d | get_triangle (unsigned int index) const |
virtual TypeHandle | get_type () const |
const LPoint3 | get_vertex (unsigned int index) 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 () |
MAKE_SEQ (get_vertices, get_num_vertices, get_vertex) | |
MAKE_SEQ (get_triangles, get_num_triangles, get_triangle) | |
virtual void | output (ostream &out) const |
virtual void | write (ostream &out, int indent_level=0) const |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
virtual void | xform (const LMatrix4 &mat) |
Transforms the solid by the indicated matrix. | |
Static Public Member Functions | |
static void | flush_level () |
Flushes the PStatCollectors used during traversal. | |
static TypeHandle | get_class_type () |
static void | init_type () |
static TypedWritable * | make_CollisionFloorMesh (const FactoryParams ¶ms) |
Factory method to generate a CollisionPolygon object. | |
static void | register_with_read_factory () |
Factory method to generate a CollisionPolygon object. | |
Protected Member Functions | |
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 (CollisionEntry) test_intersection_from_ray(const CollisionEntry &entry) const |
virtual | PT (CollisionEntry) test_intersection_from_sphere(const CollisionEntry &entry) const |
virtual | PT (BoundingVolume) compute_internal_bounds() const |
This object represents a solid made entirely of triangles, which will only be tested again z axis aligned rays.
Definition at line 32 of file collisionFloorMesh.h.
CollisionFloorMesh::CollisionFloorMesh | ( | ) | [inline] |
This is only for the convenience of CollisionPolygon.
Normally, you should not attempt to create an uninitialized CollisionPlane.
Definition at line 24 of file collisionFloorMesh.I.
Referenced by make_CollisionFloorMesh().
void CollisionFloorMesh::add_triangle | ( | unsigned int | pointA, |
unsigned int | pointB, | ||
unsigned int | pointC | ||
) |
store a triangle for processing
Definition at line 455 of file collisionFloorMesh.cxx.
void CollisionFloorMesh::add_vertex | ( | const LPoint3 & | vert | ) | [inline] |
store away a vertex to index against
Definition at line 55 of file collisionFloorMesh.I.
void CollisionFloorMesh::fill_viz_geom | ( | ) | [protected, virtual] |
Fills the _viz_geom GeomNode up with Geoms suitable for rendering this solid.
Reimplemented from CollisionSolid.
Definition at line 282 of file collisionFloorMesh.cxx.
References GeomVertexWriter::add_data3(), and GeomVertexFormat::get_v3().
void CollisionFloorMesh::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 CollisionSolid.
Definition at line 386 of file collisionFloorMesh.cxx.
References DatagramIterator::get_stdfloat(), DatagramIterator::get_uint16(), DatagramIterator::get_uint32(), and LVecBase3f::read_datagram().
Referenced by make_CollisionFloorMesh().
void CollisionFloorMesh::flush_level | ( | ) | [inline, static] |
Flushes the PStatCollectors used during traversal.
Definition at line 44 of file collisionFloorMesh.I.
LPoint3 CollisionFloorMesh::get_collision_origin | ( | ) | const [virtual] |
Returns the point in space deemed to be the "origin" of the solid for collision purposes.
The closest intersection point to this origin point is considered to be the most significant.
Implements CollisionSolid.
Definition at line 87 of file collisionFloorMesh.cxx.
References LPoint3f::origin().
PStatCollector & CollisionFloorMesh::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 CollisionSolid.
Definition at line 346 of file collisionFloorMesh.cxx.
PStatCollector & CollisionFloorMesh::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 CollisionSolid.
Definition at line 334 of file collisionFloorMesh.cxx.
TypedWritable * CollisionFloorMesh::make_CollisionFloorMesh | ( | const FactoryParams & | params | ) | [static] |
Factory method to generate a CollisionPolygon object.
Definition at line 418 of file collisionFloorMesh.cxx.
References CollisionFloorMesh(), and fillin().
Referenced by register_with_read_factory().
void CollisionFloorMesh::register_with_read_factory | ( | ) | [static] |
Factory method to generate a CollisionPolygon object.
Definition at line 434 of file collisionFloorMesh.cxx.
References BamReader::get_factory(), make_CollisionFloorMesh(), and Factory< Type >::register_factory().
Function to write the important information in the particular object to a Datagram.
Reimplemented from CollisionSolid.
Definition at line 357 of file collisionFloorMesh.cxx.
References Datagram::add_stdfloat(), Datagram::add_uint16(), and Datagram::add_uint32().
void CollisionFloorMesh::xform | ( | const LMatrix4 & | mat | ) | [virtual] |
Transforms the solid by the indicated matrix.
Reimplemented from CollisionSolid.
Definition at line 57 of file collisionFloorMesh.cxx.