Panda3D
odeSphereGeom.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 odeSphereGeom.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 #ifndef ODESPHEREGEOM_H
15 #define ODESPHEREGEOM_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "ode_includes.h"
21 #include "odeGeom.h"
22 
23 /**
24  *
25  */
26 class EXPCL_PANDAODE OdeSphereGeom : public OdeGeom {
27  friend class OdeGeom;
28 
29 public:
30  OdeSphereGeom(dGeomID id);
31 
32 PUBLISHED:
33  OdeSphereGeom(dReal radius);
34  OdeSphereGeom(OdeSpace &space, dReal radius);
35  OdeSphereGeom(OdeGeom &geom);
36  virtual ~OdeSphereGeom();
37 
38  INLINE void set_radius(dReal radius);
39  INLINE dReal get_radius() const;
40  INLINE dReal get_point_depth(dReal x, dReal y, dReal z) const;
41  INLINE dReal get_point_depth(const LPoint3f &p) const;
42 
43 public:
44  INLINE static int get_geom_class() { return dSphereClass; };
45 
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
51  OdeGeom::init_type();
52  register_type(_type_handle, "OdeSphereGeom",
53  OdeGeom::get_class_type());
54  }
55  virtual TypeHandle get_type() const {
56  return get_class_type();
57  }
58  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
59 
60 private:
61  static TypeHandle _type_handle;
62 };
63 
64 #include "odeSphereGeom.I"
65 
66 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81