Panda3D
 All Classes Functions Variables Enumerations
odeContact.h
1 // Filename: odeContact.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 ODECONTACT_H
16 #define ODECONTACT_H
17 
18 #include "pandabase.h"
19 #include "typedReferenceCount.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 #include "odeSurfaceParameters.h"
24 #include "odeContactGeom.h"
25 
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : OdeContact
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAODE OdeContact : public TypedReferenceCount {
32 PUBLISHED:
33  OdeContact();
34  // OdeContact(const OdeContact &copy);
35  OdeContact(const dContact &contact);
36  virtual ~OdeContact();
37 
38  INLINE OdeSurfaceParameters get_surface() const;
39  INLINE OdeContactGeom get_geom();
40  INLINE LVecBase3f get_fdir1() const;
41 
42  INLINE void set_surface(const OdeSurfaceParameters &surface_parameters);
43  INLINE void set_geom(const OdeContactGeom &contact_geom);
44  INLINE void set_fdir1(const LVecBase3f &fdir1);
45 
46 public:
47  void operator = (const OdeContact &copy);
48  bool operator == (const OdeContact &other);
49  const dContact* get_contact_ptr() const;
50 
51 private:
52  dContact _contact;
53 
54 public:
55  static TypeHandle get_class_type() {
56  return _type_handle;
57  }
58  static void init_type() {
59  TypedReferenceCount::init_type();
60  register_type(_type_handle, "OdeContact",
61  TypedReferenceCount::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 "odeContact.I"
73 
74 #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