NxApexShape.h
Go to the documentation of this file.
00001 // This code contains NVIDIA Confidential Information and is disclosed to you
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and
00007 // any modifications thereto. Any use, reproduction, disclosure, or
00008 // distribution of this software and related documentation without an express
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 //
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2014 NVIDIA Corporation. All rights reserved.
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 } // end namespace physx::apex
00182 
00183 #endif // NX_APEX_SHAPE_H

Generated on Mon Apr 28 2014 08:01:35

Copyright © 2012-2014 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.