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  odetrimeshdata_cat.debug() << "build_single(" << vertices << ", " << vertex_stride << ", " << vertex_count << ", " << indices << ", " << index_count << ", " << tri_stride << ")\n";
42  dGeomTriMeshDataBuildSingle(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride);
43 }
44 
45 INLINE void OdeTriMeshData::
46 build_single1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) {
47  dGeomTriMeshDataBuildSingle1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals);
48 }
49 
50 INLINE void OdeTriMeshData::
51 build_double(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride) {
52  dGeomTriMeshDataBuildDouble(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride);
53 }
54 
55 INLINE void OdeTriMeshData::
56 build_double1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) {
57  dGeomTriMeshDataBuildDouble1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals);
58 }
59 
60 /*
61 INLINE void OdeTriMeshData::
62 build_simple(const dReal* vertices, int vertex_count, const int* indices, int index_count) {
63  dGeomTriMeshDataBuildSimple(_id, vertices, vertex_count, indices, index_count);
64 }
65 */
66 
67 /*
68 INLINE void OdeTriMeshData::
69 build_simple1(const dReal* vertices, int vertex_count, const int* indices, int index_count, const int* normals) {
70  dGeomTriMeshDataBuildSimple1(_id, vertices, vertex_count, indices, index_count, normals);
71 }
72 */
73 
74 INLINE void OdeTriMeshData::
75 preprocess() {
76  dGeomTriMeshDataPreprocess(_id);
77 }
78 
79 /*
80 INLINE void OdeTriMeshData::
81 get_buffer(unsigned char** buf, int* buf_len) const {
82  return dGeomTriMeshDataGetBuffer(_id, buf, buf_len);
83 }
84 
85 INLINE void OdeTriMeshData::
86 set_buffer(unsigned char* buf) {
87  dGeomTriMeshDataSetBuffer(_id, buf);
88 }
89 
90 INLINE void OdeTriMeshData::
91 update() {
92  dGeomTriMeshDataUpdate(_id);
93 }
94 
95 */
This is our own Panda specialization on the default STL map.
Definition: pmap.h:49