Panda3D
odeRayGeom.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 odeRayGeom.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 #ifndef ODERAYGEOM_H
15 #define ODERAYGEOM_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 OdeRayGeom : public OdeGeom {
27  friend class OdeGeom;
28 
29 public:
30  OdeRayGeom(dGeomID id);
31 
32 PUBLISHED:
33  OdeRayGeom(dReal length);
34  OdeRayGeom(OdeSpace &space, dReal length);
35  virtual ~OdeRayGeom();
36 
37  INLINE void set_length(dReal length);
38  INLINE dReal get_length();
39  INLINE void set(dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
40  INLINE void set(const LVecBase3f &start, const LVecBase3f &dir);
41  INLINE void get(LVecBase3f &start, LVecBase3f &dir) const;
42  INLINE LVecBase3f get_start() const;
43  INLINE LVecBase3f get_direction() const;
44  INLINE void set_params(int first_contact, int backface_cull);
45  INLINE void get_params(int &first_contact, int &backface_cull) const;
46  INLINE int get_first_contact() const;
47  INLINE int get_backface_cull() const;
48  INLINE void set_closest_hit(int closest_hit);
49  INLINE int get_closest_hit();
50 
51 public:
52  INLINE static int get_geom_class() { return dRayClass; };
53 
54 public:
55  static TypeHandle get_class_type() {
56  return _type_handle;
57  }
58  static void init_type() {
59  OdeGeom::init_type();
60  register_type(_type_handle, "OdeRayGeom",
61  OdeGeom::get_class_type());
62  }
63  virtual TypeHandle get_type() const {
64  return get_class_type();
65  }
66  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
67 
68 private:
69  static TypeHandle _type_handle;
70 };
71 
72 #include "odeRayGeom.I"
73 
74 #endif
OdeRayGeom
Definition: odeRayGeom.h:26
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
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ode_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
odeRayGeom.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeGeom
Definition: odeGeom.h:45