Panda3D
|
00001 // Filename: physxJointDesc.h 00002 // Created by: enn0x (28Sep09) 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 PHYSXJOINTDESC_H 00016 #define PHYSXJOINTDESC_H 00017 00018 #include "pandabase.h" 00019 #include "lpoint3.h" 00020 #include "lvector3.h" 00021 00022 #include "physxEnums.h" 00023 #include "physx_includes.h" 00024 00025 class PhysxActor; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : PhysxJointDesc 00029 // Description : Abstract base class for joint descriptors. 00030 //////////////////////////////////////////////////////////////////// 00031 class EXPCL_PANDAPHYSX PhysxJointDesc : public PhysxEnums { 00032 00033 PUBLISHED: 00034 virtual void set_to_default() = 0; 00035 virtual bool is_valid() const = 0; 00036 00037 void set_name(const char *name); 00038 void set_joint_flag(PhysxJointFlag flag, bool value); 00039 void set_max_force(float force); 00040 void set_max_torque(float torque); 00041 void set_solver_extrapolation_factor(float factor); 00042 void set_global_axis(const LVector3f &axis); 00043 void set_global_anchor(const LPoint3f &anchor); 00044 void set_local_normal(unsigned int idx, const LVector3f &normal); 00045 void set_local_axis(unsigned int idx, const LVector3f &axis); 00046 void set_local_anchor(unsigned int idx, const LPoint3f &anchor); 00047 void set_actor(unsigned int idx, const PhysxActor &actor); 00048 00049 const char *get_name() const; 00050 bool get_joint_flag(PhysxJointFlag flag) const; 00051 float get_max_force() const; 00052 float get_max_torque() const; 00053 float get_solver_extrapolation_factor() const; 00054 LVector3f get_local_normal(unsigned int idx) const; 00055 LVector3f get_local_axis(unsigned int idx) const; 00056 LPoint3f get_local_anchor(unsigned int idx) const; 00057 PhysxActor *get_actor(unsigned int idx) const; 00058 00059 public: 00060 virtual NxJointDesc *ptr() const = 0; 00061 00062 private: 00063 string _name; 00064 00065 protected: 00066 INLINE PhysxJointDesc(); 00067 INLINE ~PhysxJointDesc(); 00068 }; 00069 00070 #include "physxJointDesc.I" 00071 00072 #endif // PHYSXJOINTDESC_H