PxTriangleMesh.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_TRIANGLEMESH
15 #define PX_PHYSICS_GEOMUTILS_NX_TRIANGLEMESH
16 
19 #include "foundation/PxVec3.h"
20 #include "foundation/PxBounds3.h"
22 #include "common/PxBase.h"
23 
24 #ifndef PX_DOXYGEN
25 namespace physx
26 {
27 #endif
28 
35 {
36  enum Enum
37  {
38  e16_BIT_INDICES = (1<<1),
39  eADJACENCY_INFO = (1<<2),
40 
41  PX_DEPRECATED eHAS_16BIT_TRIANGLE_INDICES = e16_BIT_INDICES,
42  PX_DEPRECATED eHAS_ADJACENCY_INFO = eADJACENCY_INFO
43  };
44 };
45 
53 
54 
83 class PxTriangleMesh : public PxBase
84 {
85  public:
91  PX_PHYSX_COMMON_API virtual PxU32 getNbVertices() const = 0;
92 
98  PX_PHYSX_COMMON_API virtual const PxVec3* getVertices() const = 0;
99 
105  PX_PHYSX_COMMON_API virtual PxU32 getNbTriangles() const = 0;
106 
118  PX_PHYSX_COMMON_API virtual const void* getTriangles() const = 0;
119 
129  PX_PHYSX_COMMON_API virtual PxTriangleMeshFlags getTriangleMeshFlags() const = 0;
130 
143  PX_PHYSX_COMMON_API virtual const PxU32* getTrianglesRemap() const = 0;
144 
145 
153  PX_PHYSX_COMMON_API virtual void release() = 0;
154 
163  PX_PHYSX_COMMON_API virtual PxMaterialTableIndex getTriangleMaterialIndex(PxTriangleID triangleIndex) const = 0;
164 
170  PX_PHYSX_COMMON_API virtual PxBounds3 getLocalBounds() const = 0;
171 
180  PX_PHYSX_COMMON_API virtual PxU32 getReferenceCount() const = 0;
181 
182  PX_PHYSX_COMMON_API virtual const char* getConcreteTypeName() const { return "PxTriangleMesh"; }
183 
184 protected:
185  PX_INLINE PxTriangleMesh(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
186  PX_INLINE PxTriangleMesh(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
188  PX_PHYSX_COMMON_API virtual bool isKindOf(const char* name) const { return !strcmp("PxTriangleMesh", name) || PxBase::isKindOf(name); }
189 };
190 
191 #ifndef PX_DOXYGEN
192 } // namespace physx
193 #endif
194 
196 #endif


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