Panda3D
odeTriMeshGeom.cxx
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 odeTriMeshGeom.cxx
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 #include "config_ode.h"
15 #include "odeTriMeshGeom.h"
16 
17 TypeHandle OdeTriMeshGeom::_type_handle;
18 
19 OdeTriMeshGeom::
20 OdeTriMeshGeom(dGeomID id) :
21  OdeGeom(id) {
22 }
23 
24 OdeTriMeshGeom::
25 OdeTriMeshGeom(OdeTriMeshData &data) :
26  OdeGeom(dCreateTriMesh(nullptr, data.get_id(), nullptr, nullptr, nullptr)) {
27  OdeTriMeshData::link_data(_id, &data);
28 }
29 
30 OdeTriMeshGeom::
31 OdeTriMeshGeom(OdeSpace &space, OdeTriMeshData &data) :
32  OdeGeom(dCreateTriMesh(space.get_id(), data.get_id(), nullptr, nullptr, nullptr)) {
33  OdeTriMeshData::link_data(_id, &data);
34 }
35 
36 OdeTriMeshGeom::
37 OdeTriMeshGeom(const OdeTriMeshGeom &copy) :
38  OdeGeom(dCreateTriMesh(nullptr, copy.get_data_id(), nullptr, nullptr, nullptr)) {
39  OdeTriMeshData::link_data(_id, copy.get_data());
40 }
41 
42 OdeTriMeshGeom::
43 ~OdeTriMeshGeom() {
44 }
45 
46 void OdeTriMeshGeom::
47 destroy() {
48  OdeTriMeshData::unlink_data(_id);
49 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81