Panda3D
|
00001 // Filename: odeContactGeom.h 00002 // Created by: joswilso (27Dec06) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef ODECONTACTGEOM_H 00016 #define ODECONTACTGEOM_H 00017 00018 #include "pandabase.h" 00019 #include "typedReferenceCount.h" 00020 #include "luse.h" 00021 00022 #include "ode_includes.h" 00023 #include "odeGeom.h" 00024 00025 class OdeSpace; 00026 class OdeUtil; 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : OdeContactGeom 00030 // Description : 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_PANDAODE OdeContactGeom : public TypedReferenceCount { 00033 friend class OdeContact; 00034 friend class OdeSpace; 00035 friend class OdeUtil; 00036 00037 PUBLISHED: 00038 OdeContactGeom(); 00039 OdeContactGeom(const OdeContactGeom ©); 00040 virtual ~OdeContactGeom(); 00041 00042 INLINE LVecBase3f get_pos() const; 00043 INLINE LVecBase3f get_normal() const; 00044 INLINE dReal get_depth() const; 00045 INLINE OdeGeom get_g1() const; 00046 INLINE OdeGeom get_g2() const; 00047 INLINE int get_side1() const; 00048 INLINE int get_side2() const; 00049 00050 INLINE void set_pos(const LVecBase3f &pos); 00051 INLINE void set_normal(const LVecBase3f &normal); 00052 INLINE void set_depth(const dReal depth); 00053 INLINE void set_g1(const OdeGeom &geom); 00054 INLINE void set_g2(const OdeGeom &geom); 00055 00056 public: 00057 OdeContactGeom(const dContactGeom ©); 00058 const dContactGeom* get_contact_geom_ptr() const; 00059 00060 private: 00061 void operator = (const OdeContactGeom ©); 00062 void operator = (const dContactGeom ©); 00063 dContactGeom _contact_geom; 00064 00065 public: 00066 static TypeHandle get_class_type() { 00067 return _type_handle; 00068 } 00069 static void init_type() { 00070 TypedReferenceCount::init_type(); 00071 register_type(_type_handle, "OdeContactGeom", 00072 TypedReferenceCount::get_class_type()); 00073 } 00074 virtual TypeHandle get_type() const { 00075 return get_class_type(); 00076 } 00077 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00078 00079 private: 00080 static TypeHandle _type_handle; 00081 }; 00082 00083 #include "odeContactGeom.I" 00084 00085 #endif