From c7a921796332e8fcd51f3e05c1a318a41282e1e2 Mon Sep 17 00:00:00 2001 From: sschirm Date: Fri, 6 Jan 2017 14:45:46 +0100 Subject: PhysX 3.4, APEX 1.4 release candidate update: @21542069 --- .../PhysXAPI/files/PxConvexMeshDesc_8h-source.html | 198 +++++++++++---------- 1 file changed, 100 insertions(+), 98 deletions(-) (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxConvexMeshDesc_8h-source.html') diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxConvexMeshDesc_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxConvexMeshDesc_8h-source.html index 5aa5fa43..b699ae6e 100644 --- a/PhysX_3.4/Documentation/PhysXAPI/files/PxConvexMeshDesc_8h-source.html +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxConvexMeshDesc_8h-source.html @@ -43,7 +43,7 @@ 00023 // components in life support devices or systems without express written approval of 00024 // NVIDIA Corporation. 00025 // -00026 // Copyright (c) 2008-2016 NVIDIA Corporation. All rights reserved. +00026 // Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. 00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. 00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. 00029 @@ -81,108 +81,110 @@ 00130 00135 eFAST_INERTIA_COMPUTATION = (1 << 7), 00136 -00142 eGPU_COMPATIBLE = (1 << 8) -00143 }; -00144 }; -00145 -00151 typedef PxFlags<PxConvexFlag::Enum,PxU16> PxConvexFlags; -00152 PX_FLAGS_OPERATORS(PxConvexFlag::Enum,PxU16) +00142 eGPU_COMPATIBLE = (1 << 8), +00143 +00150 eSHIFT_VERTICES = (1 << 9) +00151 }; +00152 }; 00153 -00154 -00161 class PxConvexMeshDesc -00162 { -00163 public: -00164 -00170 PxBoundedData points; -00171 -00180 PxBoundedData polygons; -00181 -00192 PxBoundedData indices; -00193 -00199 PxConvexFlags flags; -00200 -00214 PxU16 vertexLimit; -00215 -00225 PxU16 quantizedCount; -00226 -00230 PX_INLINE PxConvexMeshDesc(); -00234 PX_INLINE void setToDefault(); -00240 PX_INLINE bool isValid() const; -00241 }; -00242 -00243 PX_INLINE PxConvexMeshDesc::PxConvexMeshDesc() //constructor sets to default -00244 : vertexLimit(255), quantizedCount(255) -00245 { -00246 } -00247 -00248 PX_INLINE void PxConvexMeshDesc::setToDefault() -00249 { -00250 *this = PxConvexMeshDesc(); -00251 } -00252 -00253 PX_INLINE bool PxConvexMeshDesc::isValid() const -00254 { -00255 // Check geometry -00256 if(points.count < 3 || //at least 1 trig's worth of points -00257 (points.count > 0xffff && flags & PxConvexFlag::e16_BIT_INDICES)) -00258 return false; -00259 if(!points.data) -00260 return false; -00261 if(points.stride < sizeof(PxVec3)) //should be at least one point's worth of data -00262 return false; -00263 if (quantizedCount < 4) -00264 return false; -00265 -00266 // Check topology -00267 if(polygons.data) -00268 { -00269 if(polygons.count < 4) // we require 2 neighbors for each vertex - 4 polygons at least -00270 return false; -00271 -00272 if(!indices.data) // indices must be provided together with polygons -00273 return false; -00274 -00275 PxU32 limit = (flags & PxConvexFlag::e16_BIT_INDICES) ? sizeof(PxU16) : sizeof(PxU32); -00276 if(indices.stride < limit) -00277 return false; -00278 -00279 limit = sizeof(PxHullPolygon); -00280 if(polygons.stride < limit) +00159 typedef PxFlags<PxConvexFlag::Enum,PxU16> PxConvexFlags; +00160 PX_FLAGS_OPERATORS(PxConvexFlag::Enum,PxU16) +00161 +00162 +00169 class PxConvexMeshDesc +00170 { +00171 public: +00172 +00178 PxBoundedData points; +00179 +00188 PxBoundedData polygons; +00189 +00200 PxBoundedData indices; +00201 +00207 PxConvexFlags flags; +00208 +00222 PxU16 vertexLimit; +00223 +00233 PxU16 quantizedCount; +00234 +00238 PX_INLINE PxConvexMeshDesc(); +00242 PX_INLINE void setToDefault(); +00248 PX_INLINE bool isValid() const; +00249 }; +00250 +00251 PX_INLINE PxConvexMeshDesc::PxConvexMeshDesc() //constructor sets to default +00252 : vertexLimit(255), quantizedCount(255) +00253 { +00254 } +00255 +00256 PX_INLINE void PxConvexMeshDesc::setToDefault() +00257 { +00258 *this = PxConvexMeshDesc(); +00259 } +00260 +00261 PX_INLINE bool PxConvexMeshDesc::isValid() const +00262 { +00263 // Check geometry +00264 if(points.count < 3 || //at least 1 trig's worth of points +00265 (points.count > 0xffff && flags & PxConvexFlag::e16_BIT_INDICES)) +00266 return false; +00267 if(!points.data) +00268 return false; +00269 if(points.stride < sizeof(PxVec3)) //should be at least one point's worth of data +00270 return false; +00271 if (quantizedCount < 4) +00272 return false; +00273 +00274 // Check topology +00275 if(polygons.data) +00276 { +00277 if(polygons.count < 4) // we require 2 neighbors for each vertex - 4 polygons at least +00278 return false; +00279 +00280 if(!indices.data) // indices must be provided together with polygons 00281 return false; -00282 } -00283 else -00284 { -00285 // We can compute the hull from the vertices -00286 if(!(flags & PxConvexFlag::eCOMPUTE_CONVEX)) -00287 return false; // If the mesh is convex and we're not allowed to compute the hull, -00288 // you have to provide it completely (geometry & topology). -00289 } -00290 -00291 if((flags & PxConvexFlag::ePLANE_SHIFTING) && vertexLimit < 4) +00282 +00283 PxU32 limit = (flags & PxConvexFlag::e16_BIT_INDICES) ? sizeof(PxU16) : sizeof(PxU32); +00284 if(indices.stride < limit) +00285 return false; +00286 +00287 limit = sizeof(PxHullPolygon); +00288 if(polygons.stride < limit) +00289 return false; +00290 } +00291 else 00292 { -00293 return false; -00294 } -00295 -00296 if (!(flags & PxConvexFlag::ePLANE_SHIFTING) && vertexLimit < 8) -00297 { -00298 return false; -00299 } -00300 -00301 if(vertexLimit > 256) -00302 { -00303 return false; -00304 } -00305 return true; -00306 } -00307 -00308 #if !PX_DOXYGEN -00309 } // namespace physx -00310 #endif -00311 -00313 #endif +00293 // We can compute the hull from the vertices +00294 if(!(flags & PxConvexFlag::eCOMPUTE_CONVEX)) +00295 return false; // If the mesh is convex and we're not allowed to compute the hull, +00296 // you have to provide it completely (geometry & topology). +00297 } +00298 +00299 if((flags & PxConvexFlag::ePLANE_SHIFTING) && vertexLimit < 4) +00300 { +00301 return false; +00302 } +00303 +00304 if (!(flags & PxConvexFlag::ePLANE_SHIFTING) && vertexLimit < 8) +00305 { +00306 return false; +00307 } +00308 +00309 if(vertexLimit > 256) +00310 { +00311 return false; +00312 } +00313 return true; +00314 } +00315 +00316 #if !PX_DOXYGEN +00317 } // namespace physx +00318 #endif +00319 +00321 #endif

-Copyright © 2008-2016 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com +Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com -- cgit v1.2.3