Panda3D
|
00001 // Filename: physxForceFieldShape.h 00002 // Created by: enn0x (15Nov09) 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 PHYSXFORCEFIELDSHAPE_H 00016 #define PHYSXFORCEFIELDSHAPE_H 00017 00018 #include "pandabase.h" 00019 #include "pointerTo.h" 00020 #include "lpoint3.h" 00021 #include "lmatrix.h" 00022 #include "lquaternion.h" 00023 00024 #include "physxObject.h" 00025 #include "physxEnums.h" 00026 #include "physx_includes.h" 00027 00028 class PhysxForceField; 00029 class PhysxForceFieldShapeGroup; 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Class : PhysxForceFieldShape 00033 // Description : Abstract base class for force field shapes. 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PANDAPHYSX PhysxForceFieldShape : public PhysxObject, public PhysxEnums { 00036 00037 PUBLISHED: 00038 void release(); 00039 00040 PhysxForceField *get_force_field() const; 00041 PhysxForceFieldShapeGroup *get_shape_group() const; 00042 00043 void set_name(const char *name); 00044 void set_mat(const LMatrix4f &mat); 00045 void set_pos(const LPoint3f &pos); 00046 00047 const char *get_name() const; 00048 LMatrix4f get_mat() const; 00049 LPoint3f get_pos() const; 00050 00051 INLINE void ls() const; 00052 INLINE void ls(ostream &out, int indent_level=0) const; 00053 00054 public: 00055 static PhysxForceFieldShape *factory(NxShapeType shapeType); 00056 00057 virtual NxForceFieldShape *ptr() const = 0; 00058 00059 virtual void link(NxForceFieldShape *shapePtr) = 0; 00060 virtual void unlink() = 0; 00061 00062 protected: 00063 INLINE PhysxForceFieldShape(); 00064 00065 private: 00066 string _name; 00067 00068 //////////////////////////////////////////////////////////////////// 00069 public: 00070 static TypeHandle get_class_type() { 00071 return _type_handle; 00072 } 00073 static void init_type() { 00074 PhysxObject::init_type(); 00075 register_type(_type_handle, "PhysxForceFieldShape", 00076 PhysxObject::get_class_type()); 00077 } 00078 virtual TypeHandle get_type() const { 00079 return get_class_type(); 00080 } 00081 virtual TypeHandle force_init_type() { 00082 init_type(); 00083 return get_class_type(); 00084 } 00085 00086 private: 00087 static TypeHandle _type_handle; 00088 }; 00089 00090 #include "physxForceFieldShape.I" 00091 00092 #endif // PHYSXFORCEFIELDSHAPE_H