Panda3D
Loading...
Searching...
No Matches
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
14INLINE OdeTriMeshData::TriMeshDataMap &OdeTriMeshData::
15get_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
22INLINE dTriMeshDataID OdeTriMeshData::
23get_id() const {
24 return _id;
25}
26
27/*
28INLINE void OdeTriMeshData::
29set(int data_id, void* in_data) {
30 dGeomTriMeshDataSet(_id, data_id, in_data);
31}
32
33INLINE void* OdeTriMeshData::
34get(int data_id) {
35 dGeomTriMeshDataGet(_id,data_id);
36}
37*/
38
39INLINE void OdeTriMeshData::
40build_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
47INLINE void OdeTriMeshData::
48build_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
52INLINE void OdeTriMeshData::
53build_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
57INLINE void OdeTriMeshData::
58build_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/*
63INLINE void OdeTriMeshData::
64build_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/*
70INLINE void OdeTriMeshData::
71build_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
76INLINE void OdeTriMeshData::
77preprocess() {
78 dGeomTriMeshDataPreprocess(_id);
79}
80
81/*
82INLINE void OdeTriMeshData::
83get_buffer(unsigned char** buf, int* buf_len) const {
84 return dGeomTriMeshDataGetBuffer(_id, buf, buf_len);
85}
86
87INLINE void OdeTriMeshData::
88set_buffer(unsigned char* buf) {
89 dGeomTriMeshDataSetBuffer(_id, buf);
90}
91
92INLINE void OdeTriMeshData::
93update() {
94 dGeomTriMeshDataUpdate(_id);
95}
96
97*/
This is our own Panda specialization on the default STL map.
Definition pmap.h:49