14#ifndef COLLISIONFLOORMESH_H
15#define COLLISIONFLOORMESH_H
46 void add_triangle(
unsigned int pointA,
unsigned int pointB,
unsigned int pointC);
48 INLINE
unsigned int get_num_vertices()
const;
49 INLINE
const LPoint3 &get_vertex(
unsigned int index)
const;
50 MAKE_SEQ(get_vertices, get_num_vertices, get_vertex);
51 INLINE
unsigned int get_num_triangles()
const;
52 INLINE LPoint3i get_triangle(
unsigned int index)
const;
53 MAKE_SEQ(get_triangles, get_num_triangles, get_triangle);
58 MAKE_SEQ_PROPERTY(vertices, get_num_vertices, get_vertex);
59 MAKE_SEQ_PROPERTY(triangles, get_num_triangles, get_triangle);
63 virtual CollisionSolid *make_copy();
67 virtual void xform(
const LMatrix4 &mat);
72 virtual void output(std::ostream &out)
const;
73 virtual void write(std::ostream &out,
int indent_level = 0)
const;
85 virtual void fill_viz_geom();
88 typedef pvector<LPoint3> Vertices;
89 typedef pvector<TriangleIndices> Triangles;
108 static void init_type() {
109 CollisionSolid::init_type();
111 CollisionSolid::get_class_type());
114 return get_class_type();
116 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
Defines a single collision event.
static TypedWritable * make_CollisionFloorMesh(const FactoryParams ¶ms)
Factory method to generate a CollisionPolygon object.
void add_triangle(unsigned int pointA, unsigned int pointB, unsigned int pointC)
store a triangle for processing
static void flush_level()
Flushes the PStatCollectors used during traversal.
virtual LPoint3 get_collision_origin() const
Returns the point in space deemed to be the "origin" of the solid for collision purposes.
static void register_with_read_factory()
Factory method to generate a CollisionPolygon object.
void add_vertex(const LPoint3 &vert)
store away a vertex to index against
CollisionFloorMesh()
This is only for the convenience of CollisionPolygon.
virtual void write_datagram(BamWriter *manager, Datagram &me)
Function to write the important information in the particular object to a Datagram.
virtual PStatCollector & get_test_pcollector()
Returns a PStatCollector that is used to count the number of intersection tests made against a solid ...
virtual void xform(const LMatrix4 &mat)
Transforms the solid by the indicated matrix.
virtual PStatCollector & get_volume_pcollector()
Returns a PStatCollector that is used to count the number of bounding volume tests made against a sol...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A node that holds Geom objects, renderable pieces of geometry.
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.
Base class for objects that can be written to and read from Bam files.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...