Go to the documentation of this file.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 #ifndef NX_APEX_SHAPE_H
00029 #define NX_APEX_SHAPE_H
00030
00036 #include "foundation/PxPreprocessor.h"
00037 #include "NxApexUsingNamespace.h"
00038
00039 #include "NxApexDefs.h"
00040
00041 #if NX_SDK_VERSION_MAJOR < 3
00042 #include "Nxp.h"
00043 #endif
00044
00045 namespace physx
00046 {
00047 namespace apex
00048 {
00049
00050 PX_PUSH_PACK_DEFAULT
00051
00052
00053 class NxApexSphereShape;
00054 class NxApexCapsuleShape;
00055 class NxApexBoxShape;
00056 class NxApexHalfSpaceShape;
00057 class NxApexRenderDebug;
00058
00062 class NxApexShape
00063 {
00064 public:
00065
00067 virtual bool intersectAgainstAABB(physx::PxBounds3) = 0;
00068
00070 virtual physx::PxBounds3 getAABB() const = 0;
00071
00073 virtual const NxApexBoxShape* isBoxGeom() const
00074 {
00075 return NULL;
00076 }
00077
00079 virtual const NxApexSphereShape* isSphereGeom() const
00080 {
00081 return NULL;
00082 }
00083
00085 virtual const NxApexCapsuleShape* isCapsuleGeom() const
00086 {
00087 return NULL;
00088 }
00089
00091 virtual const NxApexHalfSpaceShape* isHalfSpaceGeom() const
00092 {
00093 return NULL;
00094 }
00095
00097 virtual void releaseApexShape() = 0;
00098
00100 virtual void visualize(NxApexRenderDebug* renderer) const = 0;
00101
00102 #if NX_SDK_VERSION_MAJOR < 3
00103
00104 virtual void setCollisionGroup(NxCollisionGroup) = 0;
00106 virtual NxCollisionGroup getCollisionGroup() const = 0;
00108 virtual void setCollisionGroup128(const NxGroupsMask&) = 0;
00110 virtual const NxGroupsMask& getCollisionGroup128() const = 0;
00111 #endif
00112
00114 virtual physx::PxMat44 getPose() const = 0;
00115
00117 virtual void setPose(physx::PxMat44 pose) = 0;
00118
00120 virtual physx::PxMat44 getPreviousPose() const = 0;
00121 };
00122
00124 class NxApexSphereShape : public NxApexShape
00125 {
00126 public:
00128 virtual physx::PxF32 getRadius() const = 0;
00129
00131 virtual void setRadius(physx::PxF32 radius) = 0;
00132
00133 };
00134
00136 class NxApexCapsuleShape : public NxApexShape
00137 {
00138 public:
00140 virtual void getDimensions(physx::PxF32& height, physx::PxF32& radius) const = 0;
00141
00143 virtual void setDimensions(physx::PxF32 height, physx::PxF32 radius) = 0;
00144
00145 };
00146
00148 class NxApexBoxShape : public NxApexShape
00149 {
00150 public:
00153 virtual void setSize(physx::PxVec3 size) = 0;
00154
00156 virtual physx::PxVec3 getSize() const = 0;
00157
00158 };
00159
00161 class NxApexHalfSpaceShape : public NxApexShape
00162 {
00163 public:
00165 virtual void setOriginAndNormal(physx::PxVec3 origin, physx::PxVec3 normal) = 0;
00166
00168 virtual physx::PxVec3 getNormal() const = 0;
00169
00171 virtual physx::PxVec3 getOrigin() const = 0;
00172
00174 virtual physx::PxVec3 getPreviousOrigin() const = 0;
00175 };
00176
00177
00178 PX_POP_PACK
00179
00180 }
00181 }
00182
00183 #endif // NX_APEX_SHAPE_H