Panda3D
odeCappedCylinderGeom.h
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 odeCappedCylinderGeom.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 #ifndef ODECAPPEDCYLINDERGEOM_H
15 #define ODECAPPEDCYLINDERGEOM_H
16 
17 #include "pandabase.h"
18 #include "typedObject.h"
19 #include "luse.h"
20 
21 #include "ode_includes.h"
22 #include "odeGeom.h"
23 
24 /**
25  *
26  */
27 class EXPCL_PANDAODE OdeCappedCylinderGeom : public OdeGeom {
28  friend class OdeGeom;
29 
30 public:
31  OdeCappedCylinderGeom(dGeomID id);
32 
33 PUBLISHED:
34  OdeCappedCylinderGeom(dReal radius, dReal length);
35  OdeCappedCylinderGeom(OdeSpace &space, dReal radius, dReal length);
36  virtual ~OdeCappedCylinderGeom();
37 
38  INLINE void set_params(dReal radius, dReal length);
39  INLINE void get_params(dReal *radius, dReal *length) const;
40  INLINE dReal get_radius() const;
41  INLINE dReal get_length() const;
42  INLINE dReal get_point_depth(dReal x, dReal y, dReal z) const;
43  INLINE dReal get_point_depth(const LPoint3f &p) const;
44 
45 public:
46  INLINE static int get_geom_class() { return dCapsuleClass; };
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, "OdeCappedCylinderGeom",
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 "odeCappedCylinderGeom.I"
67 
68 #endif
odeCappedCylinderGeom.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
odeGeom.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
OdeSpace
Definition: odeSpace.h:37
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
OdeCappedCylinderGeom
Definition: odeCappedCylinderGeom.h:27
typedObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ode_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeGeom
Definition: odeGeom.h:45