Panda3D
 All Classes Functions Variables Enumerations
odeTriMeshData.I
1 // Filename: odeTriMeshData.I
2 // Created by: joswilso (27Dec06)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 INLINE OdeTriMeshData::TriMeshDataMap &OdeTriMeshData::
16 get_tri_mesh_data_map() {
17  if (_tri_mesh_data_map == (TriMeshDataMap *)NULL) {
18  _tri_mesh_data_map = new TriMeshDataMap;
19  }
20  return *_tri_mesh_data_map;
21 }
22 
23 INLINE dTriMeshDataID OdeTriMeshData::
24 get_id() const {
25  return _id;
26 }
27 
28 /*
29 INLINE void OdeTriMeshData::
30 set(int data_id, void* in_data) {
31  dGeomTriMeshDataSet(_id, data_id, in_data);
32 }
33 
34 INLINE void* OdeTriMeshData::
35 get(int data_id) {
36  dGeomTriMeshDataGet(_id,data_id);
37 }
38 */
39 
40 INLINE void OdeTriMeshData::
41 build_single(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride) {
42  odetrimeshdata_cat.debug() << "build_single(" << vertices << ", " << vertex_stride << ", " << vertex_count << ", " << indices << ", " << index_count << ", " << tri_stride << ")\n";
43  dGeomTriMeshDataBuildSingle(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride);
44 }
45 
46 INLINE void OdeTriMeshData::
47 build_single1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) {
48  dGeomTriMeshDataBuildSingle1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals);
49 }
50 
51 INLINE void OdeTriMeshData::
52 build_double(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride) {
53  dGeomTriMeshDataBuildDouble(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride);
54 }
55 
56 INLINE void OdeTriMeshData::
57 build_double1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) {
58  dGeomTriMeshDataBuildDouble1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals);
59 }
60 
61 /*
62 INLINE void OdeTriMeshData::
63 build_simple(const dReal* vertices, int vertex_count, const int* indices, int index_count) {
64  dGeomTriMeshDataBuildSimple(_id, vertices, vertex_count, indices, index_count);
65 }
66 */
67 
68 /*
69 INLINE void OdeTriMeshData::
70 build_simple1(const dReal* vertices, int vertex_count, const int* indices, int index_count, const int* normals) {
71  dGeomTriMeshDataBuildSimple1(_id, vertices, vertex_count, indices, index_count, normals);
72 }
73 */
74 
75 INLINE void OdeTriMeshData::
76 preprocess() {
77  dGeomTriMeshDataPreprocess(_id);
78 }
79 
80 /*
81 INLINE void OdeTriMeshData::
82 get_buffer(unsigned char** buf, int* buf_len) const {
83  return dGeomTriMeshDataGetBuffer(_id, buf, buf_len);
84 }
85 
86 INLINE void OdeTriMeshData::
87 set_buffer(unsigned char* buf) {
88  dGeomTriMeshDataSetBuffer(_id, buf);
89 }
90 
91 INLINE void OdeTriMeshData::
92 update() {
93  dGeomTriMeshDataUpdate(_id);
94 }
95 
96 */
This is our own Panda specialization on the default STL map.
Definition: pmap.h:52