Panda3D
|
00001 // Filename: odeTriMeshData.I 00002 // Created by: joswilso (27Dec06) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 INLINE OdeTriMeshData::TriMeshDataMap &OdeTriMeshData:: 00016 get_tri_mesh_data_map() { 00017 if (_tri_mesh_data_map == (TriMeshDataMap *)NULL) { 00018 _tri_mesh_data_map = new TriMeshDataMap; 00019 } 00020 return *_tri_mesh_data_map; 00021 } 00022 00023 INLINE dTriMeshDataID OdeTriMeshData:: 00024 get_id() const { 00025 return _id; 00026 } 00027 00028 /* 00029 INLINE void OdeTriMeshData:: 00030 set(int data_id, void* in_data) { 00031 dGeomTriMeshDataSet(_id, data_id, in_data); 00032 } 00033 00034 INLINE void* OdeTriMeshData:: 00035 get(int data_id) { 00036 dGeomTriMeshDataGet(_id,data_id); 00037 } 00038 */ 00039 00040 INLINE void OdeTriMeshData:: 00041 build_single(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride) { 00042 odetrimeshdata_cat.debug() << "build_single(" << vertices << ", " << vertex_stride << ", " << vertex_count << ", " << indices << ", " << index_count << ", " << tri_stride << ")\n"; 00043 dGeomTriMeshDataBuildSingle(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride); 00044 } 00045 00046 INLINE void OdeTriMeshData:: 00047 build_single1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) { 00048 dGeomTriMeshDataBuildSingle1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals); 00049 } 00050 00051 INLINE void OdeTriMeshData:: 00052 build_double(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride) { 00053 dGeomTriMeshDataBuildDouble(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride); 00054 } 00055 00056 INLINE void OdeTriMeshData:: 00057 build_double1(const void* vertices, int vertex_stride, int vertex_count, const void* indices, int index_count, int tri_stride, const void* normals) { 00058 dGeomTriMeshDataBuildDouble1(_id, vertices, vertex_stride, vertex_count, indices, index_count, tri_stride, normals); 00059 } 00060 00061 /* 00062 INLINE void OdeTriMeshData:: 00063 build_simple(const dReal* vertices, int vertex_count, const int* indices, int index_count) { 00064 dGeomTriMeshDataBuildSimple(_id, vertices, vertex_count, indices, index_count); 00065 } 00066 */ 00067 00068 /* 00069 INLINE void OdeTriMeshData:: 00070 build_simple1(const dReal* vertices, int vertex_count, const int* indices, int index_count, const int* normals) { 00071 dGeomTriMeshDataBuildSimple1(_id, vertices, vertex_count, indices, index_count, normals); 00072 } 00073 */ 00074 00075 INLINE void OdeTriMeshData:: 00076 preprocess() { 00077 dGeomTriMeshDataPreprocess(_id); 00078 } 00079 00080 /* 00081 INLINE void OdeTriMeshData:: 00082 get_buffer(unsigned char** buf, int* buf_len) const { 00083 return dGeomTriMeshDataGetBuffer(_id, buf, buf_len); 00084 } 00085 00086 INLINE void OdeTriMeshData:: 00087 set_buffer(unsigned char* buf) { 00088 dGeomTriMeshDataSetBuffer(_id, buf); 00089 } 00090 00091 INLINE void OdeTriMeshData:: 00092 update() { 00093 dGeomTriMeshDataUpdate(_id); 00094 } 00095 00096 */