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