void collideWithMeshTriangles(PxsParticleCollData& collisionShapeData, const Gu::InternalTriangleMeshData& /*meshData*/, const Cm::FastVertex2ShapeScaling& scale,
											  const PxVec3* triangleVerts, PxU32 numTriangles, PxReal proxRadius, const PxTransform& shape2World)
{	
	bool hasCC = ((collisionShapeData.localFlags & PXS_FLUID_COLL_FLAG_CC) || (collisionShapeData.localFlags & PXS_FLUID_COLL_FLAG_L_CC));

	PxVec3 tmpSurfaceNormal(0.0f);
	PxVec3 tmpSurfacePos(0.0f);
	PxVec3 tmpProxSurfaceNormal(0.0f);
	PxVec3 tmpProxSurfacePos(0.0f);
	PxReal tmpCCTime(0.0f);
	PxReal tmpDistOldToSurface(0.0f);
	
	for (PxU32 i = 0; i < numTriangles; ++i)
	{
		PxVec3 v0 = scale * triangleVerts[i*3];
		PxVec3 v1 = scale * triangleVerts[i*3 + 1];
		PxVec3 v2 = scale * triangleVerts[i*3 + 2];
		if (scale.flipsNormal())
			Ps::swap<PxVec3>(v1, v2);

		PxU32 tmpFlags = collideWithMeshTriangle(tmpSurfaceNormal, tmpSurfacePos, tmpProxSurfaceNormal, tmpProxSurfacePos,
			tmpCCTime, tmpDistOldToSurface, collisionShapeData.localOldPos, collisionShapeData.localNewPos, 
			v0, v1-v0, v2-v0, hasCC, collisionShapeData.restOffset, proxRadius);

		updateCollShapeData(collisionShapeData, hasCC, tmpFlags, tmpCCTime, tmpDistOldToSurface, tmpSurfaceNormal,
			tmpSurfacePos, tmpProxSurfaceNormal, tmpProxSurfacePos, shape2World);
	}	
}
void collideWithMeshTriangles(ParticleCollData& collisionShapeData, const TriangleMesh& /*meshData*/,
                              const Cm::FastVertex2ShapeScaling& scale, const PxVec3* triangleVerts, PxU32 numTriangles,
                              PxReal proxRadius, const PxTransform& shape2World)
{
	bool hasCC = ((collisionShapeData.localFlags & ParticleCollisionFlags::CC) ||
	              (collisionShapeData.localFlags & ParticleCollisionFlags::L_CC));

	PxVec3 tmpSurfaceNormal(0.0f);
	PxVec3 tmpSurfacePos(0.0f);
	PxVec3 tmpProxSurfaceNormal(0.0f);
	PxVec3 tmpProxSurfacePos(0.0f);
	PxReal tmpCCTime(0.0f);
	PxReal tmpDistOldToSurface(0.0f);

	for(PxU32 i = 0; i < numTriangles; ++i)
	{
		const PxI32 winding = scale.flipsNormal() ? 1 : 0;
		PxVec3 v0 = scale * triangleVerts[i * 3];
		PxVec3 v1 = scale * triangleVerts[i * 3 + 1 + winding];
		PxVec3 v2 = scale * triangleVerts[i * 3 + 2 - winding];

		PxU32 tmpFlags =
		    collideWithMeshTriangle(tmpSurfaceNormal, tmpSurfacePos, tmpProxSurfaceNormal, tmpProxSurfacePos, tmpCCTime,
		                            tmpDistOldToSurface, collisionShapeData.localOldPos, collisionShapeData.localNewPos,
		                            v0, v1 - v0, v2 - v0, hasCC, collisionShapeData.restOffset, proxRadius);

		updateCollShapeData(collisionShapeData, hasCC, tmpFlags, tmpCCTime, tmpDistOldToSurface, tmpSurfaceNormal,
		                    tmpSurfacePos, tmpProxSurfaceNormal, tmpProxSurfacePos, shape2World);
	}
}