15 #ifndef ODETRIMESHDATA_H
16 #define ODETRIMESHDATA_H
18 #include "pandabase.h"
19 #include "typedReferenceCount.h"
22 #include "ode_includes.h"
24 #include "nodePathCollection.h"
26 #include "geomVertexData.h"
27 #include "geomVertexReader.h"
28 #include "geomTriangles.h"
29 #include "geomTristrips.h"
31 #include "config_ode.h"
41 static void unlink_data(dGeomID
id);
43 static void print_data(
const string &marker);
52 enum DataType { DT_face_normals = 0,
53 DT_last_transformation };
66 virtual void write(ostream &out = cout,
unsigned int indent=0)
const;
67 void write_faces(ostream &out)
const;
70 INLINE
void build_single(
const void* vertices,
int vertex_stride,
int vertex_count, \
71 const void* indices,
int index_count,
int tri_stride);
72 INLINE
void build_single1(
const void* vertices,
int vertex_stride,
int vertex_count, \
73 const void* indices,
int index_count,
int tri_stride, \
75 INLINE
void build_double(
const void* vertices,
int vertex_stride,
int vertex_count, \
76 const void* indices,
int index_count,
int tri_stride);
77 INLINE
void build_double1(
const void* vertices,
int vertex_stride,
int vertex_count, \
78 const void* indices,
int index_count,
int tri_stride, \
95 INLINE
void preprocess();
97 INLINE dTriMeshDataID get_id()
const;
100 void process_model(
const NodePath& model,
bool &use_normals);
101 void process_geom_node(
const GeomNode *geomNode);
102 void process_geom(
const Geom *geom);
105 void analyze(
const GeomNode *geomNode);
106 void analyze(
const Geom *geom);
113 struct StridedVertex {
124 StridedVertex *_vertices;
126 FaceNormal *_normals;
128 unsigned int _num_vertices;
129 unsigned int _num_faces;
135 static void init_type() {
136 TypedReferenceCount::init_type();
137 register_type(_type_handle,
"OdeTriMeshData",
138 TypedReferenceCount::get_class_type());
141 return get_class_type();
143 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
149 #include "odeTriMeshData.I"
This is our own Panda specialization on the default STL map.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
TypeHandle is the identifier used to differentiate C++ class types.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A node that holds Geom objects, renderable pieces of geometry.