PxTriangleMeshGeometry.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_NX_TRIANGLEMESH_GEOMETRY
15 #define PX_PHYSICS_NX_TRIANGLEMESH_GEOMETRY
16 
19 #include "geometry/PxGeometry.h"
20 #include "geometry/PxMeshScale.h"
22 
23 #ifndef PX_DOXYGEN
24 namespace physx
25 {
26 #endif
27 
28 class PxTriangleMesh;
29 
30 
37 {
38  enum Enum
39  {
40  eDOUBLE_SIDED = (1<<1)
41 
42 
43  };
44 };
45 
53 
54 
66 {
67 public:
69  PxGeometry(PxGeometryType::eTRIANGLEMESH),
71  { }
72 
74  const PxMeshScale& scaling = PxMeshScale(),
76  PxGeometry(PxGeometryType::eTRIANGLEMESH),
77  scale(scaling),
78  meshFlags(flags),
79  triangleMesh(mesh)
80  { }
81 
92  PX_INLINE bool isValid() const;
93 
94 public:
96 
99 
101 };
102 
103 
105 {
106  if (mType != PxGeometryType::eTRIANGLEMESH)
107  return false;
108  if (!scale.scale.isFinite() || !scale.rotation.isUnit())
109  return false;
110  if (scale.scale.x <= 0.0f || scale.scale.y <= 0.0f || scale.scale.z <= 0.0f)
111  return false;
112  if (!triangleMesh)
113  return false;
114 
115  return true;
116 }
117 
118 #ifndef PX_DOXYGEN
119 } // namespace physx
120 #endif
121 
123 #endif


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