PxHeightField.h
Go to the documentation of this file.
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_GEOMUTILS_NX_HEIGHTFIELD
15 #define PX_PHYSICS_GEOMUTILS_NX_HEIGHTFIELD
16 
21 #include "common/PxBase.h"
22 
23 #ifndef PX_DOXYGEN
24 namespace physx
25 {
26 #endif
27 
28 class PxHeightFieldDesc;
29 
66 class PxHeightField : public PxBase
67 {
68  public:
76  PX_PHYSX_COMMON_API virtual void release() = 0;
77 
90  PX_PHYSX_COMMON_API virtual PxU32 saveCells(void* destBuffer, PxU32 destBufferSize) const = 0;
91 
112  PX_PHYSX_COMMON_API virtual bool modifySamples(PxI32 startCol, PxI32 startRow, const PxHeightFieldDesc& subfieldDesc, bool shrinkBounds = false) = 0;
113 
121  PX_PHYSX_COMMON_API virtual PxU32 getNbRows() const = 0;
122 
130  PX_PHYSX_COMMON_API virtual PxU32 getNbColumns() const = 0;
131 
139  PX_PHYSX_COMMON_API virtual PxHeightFieldFormat::Enum getFormat() const = 0;
140 
148  PX_PHYSX_COMMON_API virtual PxU32 getSampleStride() const = 0;
149 
157  PX_PHYSX_COMMON_API virtual PxReal getThickness() const = 0;
158 
166  PX_PHYSX_COMMON_API virtual PxReal getConvexEdgeThreshold() const = 0;
167 
175  PX_PHYSX_COMMON_API virtual PxHeightFieldFlags getFlags() const = 0;
176 
182  PX_PHYSX_COMMON_API virtual PxReal getHeight(PxReal x, PxReal z) const = 0;
183 
192  PX_PHYSX_COMMON_API virtual PxU32 getReferenceCount() const = 0;
193 
202  PX_PHYSX_COMMON_API virtual PxMaterialTableIndex getTriangleMaterialIndex(PxTriangleID triangleIndex) const = 0;
203 
212  PX_PHYSX_COMMON_API virtual PxVec3 getTriangleNormal(PxTriangleID triangleIndex) const = 0;
213 
214  PX_PHYSX_COMMON_API virtual const char* getConcreteTypeName() const { return "PxHeightField"; }
215 
216 protected:
217  PX_INLINE PxHeightField(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
218  PX_INLINE PxHeightField(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
220  PX_PHYSX_COMMON_API virtual bool isKindOf(const char* name) const { return !strcmp("PxHeightField", name) || PxBase::isKindOf(name); }
221 };
222 
223 #ifndef PX_DOXYGEN
224 } // namespace physx
225 #endif
226 
228 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com