PxHeightFieldDesc.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_COLLISION_NXHEIGHTFIELDDESC
15 #define PX_COLLISION_NXHEIGHTFIELDDESC
16 
20 #include "foundation/PxBounds3.h"
24 
25 #ifndef PX_DOXYGEN
26 namespace physx
27 {
28 #endif
29 
39 {
40 public:
41 
51 
61 
72 
92 
111 
127 
136 
141 
145  PX_INLINE void setToDefault();
146 
151  PX_INLINE bool isValid() const;
152 };
153 
154 PX_INLINE PxHeightFieldDesc::PxHeightFieldDesc() //constructor sets to default
155 {
156  nbColumns = 0;
157  nbRows = 0;
159  thickness = -1.0f;
160  convexEdgeThreshold = 0.0f;
162 }
163 
165 {
166  *this = PxHeightFieldDesc();
167 }
168 
170 {
171  if (nbColumns < 2)
172  return false;
173  if (nbRows < 2)
174  return false;
175  switch (format)
176  {
178  if (samples.stride < 4)
179  return false;
180  break;
181  default:
182  return false;
183  }
184  if (convexEdgeThreshold < 0)
185  return false;
187  return false;
188  if (thickness < -PX_MAX_BOUNDS_EXTENTS || thickness > PX_MAX_BOUNDS_EXTENTS)
189  return false;
190  return true;
191 }
192 
193 #ifndef PX_DOXYGEN
194 } // namespace physx
195 #endif
196 
198 #endif


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