Panda3D
 All Classes Functions Variables Enumerations
odeCappedCylinderGeom.h
1 // Filename: odeCappedCylinderGeom.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 ODECAPPEDCYLINDERGEOM_H
16 #define ODECAPPEDCYLINDERGEOM_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 : OdeCappedCylinderGeom
27 // Description :
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAODE OdeCappedCylinderGeom : public OdeGeom {
30  friend class OdeGeom;
31 
32 public:
33  OdeCappedCylinderGeom(dGeomID id);
34 
35 PUBLISHED:
36  OdeCappedCylinderGeom(dReal radius, dReal length);
37  OdeCappedCylinderGeom(OdeSpace &space, dReal radius, dReal length);
38  virtual ~OdeCappedCylinderGeom();
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  INLINE dReal get_point_depth(dReal x, dReal y, dReal z) const;
45  INLINE dReal get_point_depth(const LPoint3f &p) const;
46 
47 public:
48  INLINE static int get_geom_class() { return dCapsuleClass; };
49 
50 public:
51  static TypeHandle get_class_type() {
52  return _type_handle;
53  }
54  static void init_type() {
55  OdeGeom::init_type();
56  register_type(_type_handle, "OdeCappedCylinderGeom",
57  OdeGeom::get_class_type());
58  }
59  virtual TypeHandle get_type() const {
60  return get_class_type();
61  }
62  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63 
64 private:
65  static TypeHandle _type_handle;
66 };
67 
68 #include "odeCappedCylinderGeom.I"
69 
70 #endif
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85