Panda3D
|
00001 // Filename: physxShapeDesc.h 00002 // Created by: enn0x (08Sep09) 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 PHYSXSHAPEDESC_H 00016 #define PHYSXSHAPEDESC_H 00017 00018 #include "pandabase.h" 00019 #include "luse.h" 00020 00021 #include "physxEnums.h" 00022 #include "physx_includes.h" 00023 00024 class PhysxMaterial; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : PhysxShapeDesc 00028 // Description : Abstract base class for shape descriptors. 00029 // Descriptors for all the different shape types are 00030 // derived from this class. 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_PANDAPHYSX PhysxShapeDesc : public PhysxEnums, public ReferenceCount { 00033 00034 PUBLISHED: 00035 virtual void set_to_default() = 0; 00036 virtual bool is_valid() const = 0; 00037 00038 void set_name(const char *name); 00039 void set_trigger(bool value); 00040 void set_local_pos(const LPoint3f &pos); 00041 void set_local_mat(const LMatrix4f &mat); 00042 void set_local_hpr(float h, float p, float r); 00043 void set_skin_width(float skinWidth); 00044 void set_shape_flag(const PhysxShapeFlag flag, bool value); 00045 void set_mass(float mass); 00046 void set_density(float density); 00047 void set_group(unsigned short group); 00048 void set_material(const PhysxMaterial &material); 00049 void set_material_index(unsigned short index); 00050 00051 const char *get_name() const; 00052 LPoint3f get_local_pos() const; 00053 LMatrix4f get_local_mat() const; 00054 float get_skin_width() const; 00055 bool get_shape_flag(const PhysxShapeFlag flag) const; 00056 float get_mass() const; 00057 float get_density() const; 00058 unsigned short get_group() const; 00059 unsigned short get_material_index() const; 00060 00061 public: 00062 virtual NxShapeDesc *ptr() const = 0; 00063 00064 private: 00065 string _name; 00066 00067 protected: 00068 INLINE PhysxShapeDesc(); 00069 INLINE ~PhysxShapeDesc(); 00070 }; 00071 00072 #include "physxShapeDesc.I" 00073 00074 #endif // PHYSXSHAPEDESC_H