| 1 | /* |
| 2 | * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. |
| 3 | * |
| 4 | * NVIDIA CORPORATION and its licensors retain all intellectual property |
| 5 | * and proprietary rights in and to this software, related documentation |
| 6 | * and any modifications thereto. Any use, reproduction, disclosure or |
| 7 | * distribution of this software and related documentation without an express |
| 8 | * license agreement from NVIDIA CORPORATION is strictly prohibited. |
| 9 | */ |
| 10 | // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. |
| 11 | // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. |
| 12 | |
| 13 | |
| 14 | #ifndef PX_PHYSICS_NX_GEOMETRY |
| 15 | #define PX_PHYSICS_NX_GEOMETRY |
| 16 | /** \addtogroup geomutils |
| 17 | @{ |
| 18 | */ |
| 19 | |
| 20 | #include "common/PxPhysXCommonConfig.h" |
| 21 | #include "foundation/PxFlags.h" |
| 22 | #include "foundation/PxMath.h" |
| 23 | |
| 24 | #ifndef PX_DOXYGEN |
| 25 | namespace physx |
| 26 | { |
| 27 | #endif |
| 28 | |
| 29 | /** |
| 30 | \brief A geometry type. |
| 31 | |
| 32 | Used to distinguish the type of a ::PxGeometry object. |
| 33 | */ |
| 34 | struct PxGeometryType |
| 35 | { |
| 36 | enum Enum |
| 37 | { |
| 38 | eSPHERE, |
| 39 | ePLANE, |
| 40 | eCAPSULE, |
| 41 | eBOX, |
| 42 | eCONVEXMESH, |
| 43 | eTRIANGLEMESH, |
| 44 | eHEIGHTFIELD, |
| 45 | |
| 46 | eGEOMETRY_COUNT, //!< internal use only! |
| 47 | eINVALID = -1 //!< internal use only! |
| 48 | }; |
| 49 | }; |
| 50 | |
| 51 | /** |
| 52 | \brief A geometry object. |
| 53 | |
| 54 | A geometry object defines the characteristics of a spatial object, but without any information |
| 55 | about its placement in the world. |
| 56 | |
| 57 | \note This is an abstract class. You cannot create instances directly. Create an instance of one of the derived classes instead. |
| 58 | */ |
| 59 | class PxGeometry |
| 60 | { |
| 61 | public: |
| 62 | /** |
| 63 | \brief Returns the type of the geometry. |
| 64 | \return The type of the object. |
| 65 | */ |
| 66 | PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometryType::Enum getType() const { return mType; } |
| 67 | |
| 68 | protected: |
| 69 | PX_CUDA_CALLABLE PX_FORCE_INLINE PxGeometry(PxGeometryType::Enum type) : mType(type) {} |
| 70 | PxGeometryType::Enum mType; |
| 71 | }; |
| 72 | |
| 73 | #ifndef PX_DOXYGEN |
| 74 | } // namespace physx |
| 75 | #endif |
| 76 | |
| 77 | /** @} */ |
| 78 | #endif |
| 79 | |