Panda3D
 All Classes Functions Variables Enumerations
odeContactGeom.h
1 // Filename: odeContactGeom.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 ODECONTACTGEOM_H
16 #define ODECONTACTGEOM_H
17 
18 #include "pandabase.h"
19 #include "typedReferenceCount.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 #include "odeGeom.h"
24 
25 class OdeSpace;
26 class OdeUtil;
27 
28 ////////////////////////////////////////////////////////////////////
29 // Class : OdeContactGeom
30 // Description :
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAODE OdeContactGeom : public TypedReferenceCount {
33  friend class OdeContact;
34  friend class OdeSpace;
35  friend class OdeUtil;
36 
37 PUBLISHED:
39  OdeContactGeom(const OdeContactGeom &copy);
40  virtual ~OdeContactGeom();
41 
42  INLINE LVecBase3f get_pos() const;
43  INLINE LVecBase3f get_normal() const;
44  INLINE dReal get_depth() const;
45  INLINE OdeGeom get_g1() const;
46  INLINE OdeGeom get_g2() const;
47  INLINE int get_side1() const;
48  INLINE int get_side2() const;
49 
50  INLINE void set_pos(const LVecBase3f &pos);
51  INLINE void set_normal(const LVecBase3f &normal);
52  INLINE void set_depth(const dReal depth);
53  INLINE void set_g1(const OdeGeom &geom);
54  INLINE void set_g2(const OdeGeom &geom);
55 
56 public:
57  OdeContactGeom(const dContactGeom &copy);
58  const dContactGeom* get_contact_geom_ptr() const;
59 
60 private:
61  void operator = (const OdeContactGeom &copy);
62  void operator = (const dContactGeom &copy);
63  dContactGeom _contact_geom;
64 
65 public:
66  static TypeHandle get_class_type() {
67  return _type_handle;
68  }
69  static void init_type() {
70  TypedReferenceCount::init_type();
71  register_type(_type_handle, "OdeContactGeom",
72  TypedReferenceCount::get_class_type());
73  }
74  virtual TypeHandle get_type() const {
75  return get_class_type();
76  }
77  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
78 
79 private:
80  static TypeHandle _type_handle;
81 };
82 
83 #include "odeContactGeom.I"
84 
85 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85