aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/extensions/include
diff options
context:
space:
mode:
authormtamis <[email protected]>2017-02-28 18:24:59 +0100
committermtamis <[email protected]>2017-02-28 18:24:59 +0100
commit5581909a4d19db97304449f66404ff99a0429d3f (patch)
treea90f7eb85c095a8aba45cf5e909c82c1cdbed77d /NvCloth/extensions/include
parentFix cmake visual studio project generation (locate_gw_root.bat) (diff)
downloadnvcloth-5581909a4d19db97304449f66404ff99a0429d3f.tar.xz
nvcloth-5581909a4d19db97304449f66404ff99a0429d3f.zip
Add visual samples.
Diffstat (limited to 'NvCloth/extensions/include')
-rw-r--r--NvCloth/extensions/include/NvClothExt/ClothMeshDesc.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/NvCloth/extensions/include/NvClothExt/ClothMeshDesc.h b/NvCloth/extensions/include/NvClothExt/ClothMeshDesc.h
index c649a11..24d4c88 100644
--- a/NvCloth/extensions/include/NvClothExt/ClothMeshDesc.h
+++ b/NvCloth/extensions/include/NvClothExt/ClothMeshDesc.h
@@ -159,7 +159,7 @@ public:
PX_INLINE bool isValid() const;
};
-PX_INLINE ClothMeshDesc::ClothMeshDesc() //constructor sets to default
+PX_INLINE ClothMeshDesc::ClothMeshDesc()
{
flags = 0;
}
@@ -171,20 +171,20 @@ PX_INLINE void ClothMeshDesc::setToDefault()
PX_INLINE bool ClothMeshDesc::isValid() const
{
- if(points.count < 3) //at least 1 trig's worth of points
+ if (points.count < 3) // at least 1 triangle
return false;
- if((pointsStiffness.count != points.count) && pointsStiffness.count != 0)
- return false; //Either all or none of the points can have stiffness information
- if(points.count > 0xffff && flags & MeshFlag::e16_BIT_INDICES)
+ if ((pointsStiffness.count != points.count) && pointsStiffness.count != 0)
+ return false; // either all or none of the points can have stiffness information
+ if (points.count > 0xffff && flags & MeshFlag::e16_BIT_INDICES)
return false;
- if(!points.data)
+ if (!points.data)
return false;
- if(points.stride < sizeof(physx::PxVec3)) //should be at least one point's worth of data
+ if (points.stride < sizeof(physx::PxVec3)) // should be at least one point
return false;
- if(invMasses.data && invMasses.stride < sizeof(float))
+ if (invMasses.data && invMasses.stride < sizeof(float))
return false;
- if(invMasses.data && invMasses.count != points.count)
+ if (invMasses.data && invMasses.count != points.count)
return false;
if (!triangles.count && !quads.count) // no support for non-indexed mesh
@@ -195,9 +195,9 @@ PX_INLINE bool ClothMeshDesc::isValid() const
return false;
physx::PxU32 indexSize = (flags & MeshFlag::e16_BIT_INDICES) ? sizeof(physx::PxU16) : sizeof(physx::PxU32);
- if(triangles.count && triangles.stride < indexSize*3)
+ if (triangles.count && triangles.stride < indexSize*3)
return false;
- if(quads.count && quads.stride < indexSize*4)
+ if (quads.count && quads.stride < indexSize*4)
return false;
return true;