Panda3D
odeRayGeom.h
1 // Filename: odeRayGeom.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 ODERAYGEOM_H
16 #define ODERAYGEOM_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "ode_includes.h"
22 #include "odeGeom.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : OdeRayGeom
26 // Description :
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAODE OdeRayGeom : public OdeGeom {
29  friend class OdeGeom;
30 
31 public:
32  OdeRayGeom(dGeomID id);
33 
34 PUBLISHED:
35  OdeRayGeom(dReal length);
36  OdeRayGeom(OdeSpace &space, dReal length);
37  virtual ~OdeRayGeom();
38 
39  INLINE void set_length(dReal length);
40  INLINE dReal get_length();
41  INLINE void set(dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
42  INLINE void set(const LVecBase3f &start, const LVecBase3f &dir);
43  INLINE void get(LVecBase3f &start, LVecBase3f &dir) const;
44  INLINE LVecBase3f get_start() const;
45  INLINE LVecBase3f get_direction() const;
46  INLINE void set_params(int first_contact, int backface_cull);
47  INLINE void get_params(int &first_contact, int &backface_cull) const;
48  INLINE int get_first_contact() const;
49  INLINE int get_backface_cull() const;
50  INLINE void set_closest_hit(int closest_hit);
51  INLINE int get_closest_hit();
52 
53 public:
54  INLINE static int get_geom_class() { return dRayClass; };
55 
56 public:
57  static TypeHandle get_class_type() {
58  return _type_handle;
59  }
60  static void init_type() {
61  OdeGeom::init_type();
62  register_type(_type_handle, "OdeRayGeom",
63  OdeGeom::get_class_type());
64  }
65  virtual TypeHandle get_type() const {
66  return get_class_type();
67  }
68  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
69 
70 private:
71  static TypeHandle _type_handle;
72 };
73 
74 #include "odeRayGeom.I"
75 
76 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85