Panda3D
odeContactGeom.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 odeContactGeom.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 #ifndef ODECONTACTGEOM_H
15 #define ODECONTACTGEOM_H
16 
17 #include "pandabase.h"
18 #include "typedReferenceCount.h"
19 #include "luse.h"
20 
21 #include "ode_includes.h"
22 #include "odeGeom.h"
23 
24 class OdeSpace;
25 class OdeUtil;
26 
27 /**
28  *
29  */
30 class EXPCL_PANDAODE OdeContactGeom : public TypedReferenceCount {
31  friend class OdeContact;
32  friend class OdeSpace;
33  friend class OdeUtil;
34 
35 PUBLISHED:
37  OdeContactGeom(const OdeContactGeom &copy);
38  virtual ~OdeContactGeom();
39 
40  INLINE LVecBase3f get_pos() const;
41  INLINE LVecBase3f get_normal() const;
42  INLINE dReal get_depth() const;
43  INLINE OdeGeom get_g1() const;
44  INLINE OdeGeom get_g2() const;
45  INLINE int get_side1() const;
46  INLINE int get_side2() const;
47 
48  INLINE void set_pos(const LVecBase3f &pos);
49  INLINE void set_normal(const LVecBase3f &normal);
50  INLINE void set_depth(const dReal depth);
51  INLINE void set_g1(const OdeGeom &geom);
52  INLINE void set_g2(const OdeGeom &geom);
53 
54 public:
55  OdeContactGeom(const dContactGeom &copy);
56  const dContactGeom* get_contact_geom_ptr() const;
57 
58 private:
59  void operator = (const OdeContactGeom &copy);
60  void operator = (const dContactGeom &copy);
61  dContactGeom _contact_geom;
62 
63 public:
64  static TypeHandle get_class_type() {
65  return _type_handle;
66  }
67  static void init_type() {
68  TypedReferenceCount::init_type();
69  register_type(_type_handle, "OdeContactGeom",
70  TypedReferenceCount::get_class_type());
71  }
72  virtual TypeHandle get_type() const {
73  return get_class_type();
74  }
75  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
76 
77 private:
78  static TypeHandle _type_handle;
79 };
80 
81 #include "odeContactGeom.I"
82 
83 #endif
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
OdeContact
Definition: odeContact.h:29
OdeSpace
Definition: odeSpace.h:37
TypedReferenceCount
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
Definition: typedReferenceCount.h:31
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
OdeContactGeom
Definition: odeContactGeom.h:30
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ode_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
odeContactGeom.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeUtil
Definition: odeUtil.h:32
typedReferenceCount.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeGeom
Definition: odeGeom.h:45