Panda3D
odeSphereGeom.cxx
1 // Filename: odeSphereGeom.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 "odeSphereGeom.h"
17 
18 TypeHandle OdeSphereGeom::_type_handle;
19 
20 OdeSphereGeom::
21 OdeSphereGeom(dGeomID id) :
22  OdeGeom(id) {
23 }
24 
25 OdeSphereGeom::
26 OdeSphereGeom(dReal radius) :
27  OdeGeom(dCreateSphere(0, radius)) {
28 }
29 
30 OdeSphereGeom::
31 OdeSphereGeom(OdeGeom &geom) :
32  OdeGeom(geom.get_id()) {
33  nassertv(dGeomGetClass(_id) == dSphereClass);
34 }
35 
36 OdeSphereGeom::
37 OdeSphereGeom(OdeSpace &space, dReal radius) :
38  OdeGeom(dCreateSphere(space.get_id(), radius)) {
39 }
40 
41 OdeSphereGeom::
42 ~OdeSphereGeom() {
43 }
dSpaceID get_id() const
Returns the underlying dSpaceID.
Definition: odeSpace.I:34
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85