Panda3D
Loading...
Searching...
No Matches
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
17TypeHandle OdeTriMeshGeom::_type_handle;
18
19OdeTriMeshGeom::
20OdeTriMeshGeom(dGeomID id) :
21 OdeGeom(id) {
22}
23
24OdeTriMeshGeom::
25OdeTriMeshGeom(OdeTriMeshData &data) :
26 OdeGeom(dCreateTriMesh(nullptr, data.get_id(), nullptr, nullptr, nullptr)) {
27 OdeTriMeshData::link_data(_id, &data);
28}
29
30OdeTriMeshGeom::
31OdeTriMeshGeom(OdeSpace &space, OdeTriMeshData &data) :
32 OdeGeom(dCreateTriMesh(space.get_id(), data.get_id(), nullptr, nullptr, nullptr)) {
33 OdeTriMeshData::link_data(_id, &data);
34}
35
36OdeTriMeshGeom::
37OdeTriMeshGeom(const OdeTriMeshGeom &copy) :
38 OdeGeom(dCreateTriMesh(nullptr, copy.get_tri_mesh_data_id(), nullptr, nullptr, nullptr)) {
39 OdeTriMeshData::link_data(_id, copy.get_tri_mesh_data());
40}
41
42OdeTriMeshGeom::
43~OdeTriMeshGeom() {
44}
45
46void OdeTriMeshGeom::
47destroy() {
48 OdeTriMeshData::unlink_data(_id);
49}
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.