Panda3D
|
00001 // Filename: physxSphereForceFieldShape.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 PHYSXSPHEREFORCEFIELDSHAPE_H 00016 #define PHYSXSPHEREFORCEFIELDSHAPE_H 00017 00018 #include "pandabase.h" 00019 #include "luse.h" 00020 00021 #include "physxForceFieldShape.h" 00022 #include "physx_includes.h" 00023 00024 class PhysxSphereForceFieldShapeDesc; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : PhysxSphereForceFieldShape 00028 // Description : A spherical force field shape. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDAPHYSX PhysxSphereForceFieldShape : public PhysxForceFieldShape { 00031 00032 PUBLISHED: 00033 INLINE PhysxSphereForceFieldShape(); 00034 INLINE ~PhysxSphereForceFieldShape(); 00035 00036 void save_to_desc(PhysxSphereForceFieldShapeDesc &shapeDesc) const; 00037 00038 void set_radius(float radius); 00039 00040 float get_radius() const; 00041 00042 //////////////////////////////////////////////////////////////////// 00043 public: 00044 INLINE NxForceFieldShape *ptr() const { return (NxForceFieldShape *)_ptr; }; 00045 00046 void link(NxForceFieldShape *shapePtr); 00047 void unlink(); 00048 00049 private: 00050 NxSphereForceFieldShape *_ptr; 00051 00052 //////////////////////////////////////////////////////////////////// 00053 public: 00054 static TypeHandle get_class_type() { 00055 return _type_handle; 00056 } 00057 static void init_type() { 00058 PhysxForceFieldShape::init_type(); 00059 register_type(_type_handle, "PhysxSphereForceFieldShape", 00060 PhysxForceFieldShape::get_class_type()); 00061 } 00062 virtual TypeHandle get_type() const { 00063 return get_class_type(); 00064 } 00065 virtual TypeHandle force_init_type() { 00066 init_type(); 00067 return get_class_type(); 00068 } 00069 00070 private: 00071 static TypeHandle _type_handle; 00072 }; 00073 00074 #include "physxSphereForceFieldShape.I" 00075 00076 #endif // PHYSXSPHEREFORCEFIELDSHAPE_H