Panda3D
odeBoxGeom.h
1 // Filename: odeBoxGeom.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 ODEBOXGEOM_H
16 #define ODEBOXGEOM_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 : OdeBoxGeom
27 // Description :
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAODE OdeBoxGeom : public OdeGeom {
30  friend class OdeGeom;
31 
32 public:
33  OdeBoxGeom(dGeomID id);
34 
35 PUBLISHED:
36  OdeBoxGeom(dReal lx, dReal ly, dReal lz);
37  OdeBoxGeom(OdeSpace &space, dReal lx, dReal ly, dReal lz);
38  OdeBoxGeom(OdeSpace &space, const LVecBase3f &size);
39  virtual ~OdeBoxGeom();
40 
41  INLINE void set_lengths(dReal lx, dReal ly, dReal lz);
42  INLINE void set_lengths(const LVecBase3f &size);
43  INLINE LVecBase3f get_lengths();
44  INLINE dReal get_point_depth(dReal x, dReal y, dReal z);
45  INLINE dReal get_point_depth(const LPoint3f &p);
46 
47 public:
48  INLINE static int get_geom_class() { return dBoxClass; };
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, "OdeBoxGeom",
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 "odeBoxGeom.I"
69 
70 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
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