Panda3D
odeTriMeshGeom.cxx
1 // Filename: odeTriMeshGeom.cxx
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 #include "config_ode.h"
16 #include "odeTriMeshGeom.h"
17 
18 TypeHandle OdeTriMeshGeom::_type_handle;
19 
20 OdeTriMeshGeom::
21 OdeTriMeshGeom(dGeomID id) :
22  OdeGeom(id) {
23 }
24 
25 OdeTriMeshGeom::
26 OdeTriMeshGeom(OdeTriMeshData &data) :
27  OdeGeom(dCreateTriMesh(0, data.get_id(), 0, 0, 0)) {
28  OdeTriMeshData::link_data(_id, &data);
29 }
30 
31 OdeTriMeshGeom::
32 OdeTriMeshGeom(OdeSpace &space, OdeTriMeshData &data) :
33  OdeGeom(dCreateTriMesh(space.get_id(), data.get_id(), 0, 0, 0)) {
34  OdeTriMeshData::link_data(_id, &data);
35 }
36 
37 OdeTriMeshGeom::
38 OdeTriMeshGeom(const OdeTriMeshGeom &copy) :
39  OdeGeom(dCreateTriMesh(0, copy.get_data_id(), 0, 0, 0)) {
40  OdeTriMeshData::link_data(_id, copy.get_data());
41 }
42 
43 OdeTriMeshGeom::
44 ~OdeTriMeshGeom() {
45 }
46 
47 void OdeTriMeshGeom::
48 destroy() {
49  OdeTriMeshData::unlink_data(_id);
50 }
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85