Panda3D
odeCylinderGeom.h
1 // Filename: odeCylinderGeom.h
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 #ifndef ODECYLINDERGEOM_H
16 #define ODECYLINDERGEOM_H
17 
18 #include "pandabase.h"
19 #include "typedObject.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 #include "odeGeom.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : OdeCylinderGeom
27 // Description :
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAODE OdeCylinderGeom : public OdeGeom {
30  friend class OdeGeom;
31 
32 public:
33  OdeCylinderGeom(dGeomID id);
34 
35 PUBLISHED:
36  OdeCylinderGeom(dReal radius, dReal length);
37  OdeCylinderGeom(OdeSpace &space, dReal radius, dReal length);
38  virtual ~OdeCylinderGeom();
39 
40  INLINE void set_params(dReal radius, dReal length);
41  INLINE void get_params(dReal *radius, dReal *length) const;
42  INLINE dReal get_radius() const;
43  INLINE dReal get_length() const;
44 
45 public:
46  INLINE static int get_geom_class() { return dCylinderClass; };
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  OdeGeom::init_type();
54  register_type(_type_handle, "OdeCylinderGeom",
55  OdeGeom::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
66 #include "odeCylinderGeom.I"
67 
68 #endif
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85