Panda3D
|
00001 // Filename: physxForceFieldShapeGroup.h 00002 // Created by: enn0x (11Nov09) 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 PHYSXFORCEFIELDSHAPEGROUP_H 00016 #define PHYSXFORCEFIELDSHAPEGROUP_H 00017 00018 #include "pandabase.h" 00019 00020 #include "physxObject.h" 00021 #include "physxEnums.h" 00022 00023 #include "physx_includes.h" 00024 00025 class PhysxScene; 00026 class PhysxForceField; 00027 class PhysxForceFieldShape; 00028 class PhysxForceFieldShapeDesc; 00029 class PhysxForceFieldShapeGroupDesc; 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Class : PhysxForceFieldShapeGroup 00033 // Description : 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PANDAPHYSX PhysxForceFieldShapeGroup : public PhysxObject, public PhysxEnums { 00036 00037 PUBLISHED: 00038 INLINE PhysxForceFieldShapeGroup(); 00039 INLINE ~PhysxForceFieldShapeGroup(); 00040 00041 void save_to_desc(PhysxForceFieldShapeGroupDesc &groupDesc) const; 00042 00043 PhysxScene *get_scene() const; 00044 PhysxForceField *get_force_field() const; 00045 const char *get_name() const; 00046 00047 void set_name(const char *name); 00048 00049 // Shapes 00050 unsigned int get_num_shapes() const; 00051 PhysxForceFieldShape *create_shape(PhysxForceFieldShapeDesc &desc); 00052 PhysxForceFieldShape *get_shape(unsigned int idx) const; 00053 MAKE_SEQ(get_shapes, get_num_shapes, get_shape); 00054 00055 //////////////////////////////////////////////////////////////////// 00056 PUBLISHED: 00057 void release(); 00058 00059 INLINE void ls() const; 00060 INLINE void ls(ostream &out, int indent_level=0) const; 00061 00062 public: 00063 INLINE NxForceFieldShapeGroup *ptr() const { return _ptr; }; 00064 00065 void link(NxForceFieldShapeGroup *ptr); 00066 void unlink(); 00067 00068 PhysxObjectCollection<PhysxForceFieldShape> _shapes; 00069 00070 private: 00071 NxForceFieldShapeGroup *_ptr; 00072 string _name; 00073 00074 //////////////////////////////////////////////////////////////////// 00075 public: 00076 static TypeHandle get_class_type() { 00077 return _type_handle; 00078 } 00079 static void init_type() { 00080 PhysxObject::init_type(); 00081 register_type(_type_handle, "PhysxForceFieldShapeGroup", 00082 PhysxObject::get_class_type()); 00083 } 00084 virtual TypeHandle get_type() const { 00085 return get_class_type(); 00086 } 00087 virtual TypeHandle force_init_type() { 00088 init_type(); 00089 return get_class_type(); 00090 } 00091 00092 private: 00093 static TypeHandle _type_handle; 00094 }; 00095 00096 #include "physxForceFieldShapeGroup.I" 00097 00098 #endif // PHYSXFORCEFIELDSHAPEGROUP_H