00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef PX_PHYSICS_COMMON_PX_TYPEINFO
00031 #define PX_PHYSICS_COMMON_PX_TYPEINFO
00032
00037 #include "common/PxPhysXCommonConfig.h"
00038
00039 #if !PX_DOXYGEN
00040 namespace physx
00041 {
00042 #endif
00043
00053 struct PxConcreteType
00054 {
00055 enum Enum
00056 {
00057 eUNDEFINED,
00058
00059 eHEIGHTFIELD,
00060 eCONVEX_MESH,
00061 eTRIANGLE_MESH_BVH33,
00062 eTRIANGLE_MESH_BVH34,
00063 eCLOTH_FABRIC,
00064
00065 eRIGID_DYNAMIC,
00066 eRIGID_STATIC,
00067 eSHAPE,
00068 eMATERIAL,
00069 eCONSTRAINT,
00070 eCLOTH,
00071 ePARTICLE_SYSTEM,
00072 ePARTICLE_FLUID,
00073 eAGGREGATE,
00074 eARTICULATION,
00075 eARTICULATION_LINK,
00076 eARTICULATION_JOINT,
00077 ePRUNING_STRUCTURE,
00078
00079 ePHYSX_CORE_COUNT,
00080 eFIRST_PHYSX_EXTENSION = 256,
00081 eFIRST_VEHICLE_EXTENSION = 512,
00082 eFIRST_USER_EXTENSION = 1024
00083 };
00084 };
00085
00092 template<typename T> struct PxTypeInfo {};
00093
00094 #define PX_DEFINE_TYPEINFO(_name, _fastType) \
00095 class _name; \
00096 template <> struct PxTypeInfo<_name> { static const char* name() { return #_name; } enum { eFastTypeId = _fastType }; };
00097
00098
00099
00100
00101
00102 PX_DEFINE_TYPEINFO(PxBase, PxConcreteType::eUNDEFINED)
00103 PX_DEFINE_TYPEINFO(PxMaterial, PxConcreteType::eMATERIAL)
00104 PX_DEFINE_TYPEINFO(PxConvexMesh, PxConcreteType::eCONVEX_MESH)
00105 PX_DEFINE_TYPEINFO(PxTriangleMesh, PxConcreteType::eUNDEFINED)
00106 PX_DEFINE_TYPEINFO(PxBVH33TriangleMesh, PxConcreteType::eTRIANGLE_MESH_BVH33)
00107 PX_DEFINE_TYPEINFO(PxBVH34TriangleMesh, PxConcreteType::eTRIANGLE_MESH_BVH34)
00108 PX_DEFINE_TYPEINFO(PxHeightField, PxConcreteType::eHEIGHTFIELD)
00109 PX_DEFINE_TYPEINFO(PxActor, PxConcreteType::eUNDEFINED)
00110 PX_DEFINE_TYPEINFO(PxRigidActor, PxConcreteType::eUNDEFINED)
00111 PX_DEFINE_TYPEINFO(PxRigidBody, PxConcreteType::eUNDEFINED)
00112 PX_DEFINE_TYPEINFO(PxRigidDynamic, PxConcreteType::eRIGID_DYNAMIC)
00113 PX_DEFINE_TYPEINFO(PxRigidStatic, PxConcreteType::eRIGID_STATIC)
00114 PX_DEFINE_TYPEINFO(PxArticulationLink, PxConcreteType::eARTICULATION_LINK)
00115 PX_DEFINE_TYPEINFO(PxArticulationJoint, PxConcreteType::eARTICULATION_JOINT)
00116 PX_DEFINE_TYPEINFO(PxArticulation, PxConcreteType::eARTICULATION)
00117 PX_DEFINE_TYPEINFO(PxAggregate, PxConcreteType::eAGGREGATE)
00118 PX_DEFINE_TYPEINFO(PxConstraint, PxConcreteType::eCONSTRAINT)
00119 PX_DEFINE_TYPEINFO(PxShape, PxConcreteType::eSHAPE)
00120 PX_DEFINE_TYPEINFO(PxClothFabric, PxConcreteType::eCLOTH_FABRIC)
00121 PX_DEFINE_TYPEINFO(PxCloth, PxConcreteType::eCLOTH)
00122 PX_DEFINE_TYPEINFO(PxParticleBase, PxConcreteType::eUNDEFINED)
00123 PX_DEFINE_TYPEINFO(PxParticleFluid, PxConcreteType::ePARTICLE_FLUID)
00124 PX_DEFINE_TYPEINFO(PxParticleSystem, PxConcreteType::ePARTICLE_SYSTEM)
00125 PX_DEFINE_TYPEINFO(PxPruningStructure, PxConcreteType::ePRUNING_STRUCTURE)
00126
00127 #if !PX_DOXYGEN
00128 }
00129 #endif
00130
00132 #endif