private static PhysicsShape CreatePhysicsShapeFromTrimeshAndCache(MeshingStage meshingStage, ulong meshHash, PhysX.TriangleMeshGeometry triMesh) { PhysicsShape phyShape; phyShape = new PhysicsShape(triMesh, ShapeType.TriMesh, meshHash); phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.TriMesh); return(phyShape); }
private static PhysicsShape CreatePhysicsShapeFromConvexSetAndCache(MeshingStage meshingStage, ulong meshHash, List <PhysX.ConvexMeshGeometry> convexes) { PhysicsShape phyShape; phyShape = new PhysicsShape(convexes, meshHash); phyShape.Complexity = convexes.Count; phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.DecomposedConvexHulls); return(phyShape); }
private static PhysicsShape CreatePhysicsShapeFromSingleConvexAndCache(MeshingStage meshingStage, ulong meshHash, PhysX.ConvexMeshGeometry convex) { PhysicsShape phyShape; phyShape = new PhysicsShape(new List <PhysX.ConvexMeshGeometry> { convex }, meshHash, true); phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.SingleConvex); return(phyShape); }
private static PhysicsShape CreatePhysicsShapeFromConvexSetAndCache(MeshingStage meshingStage, ulong meshHash, List<PhysX.ConvexMeshGeometry> convexes) { PhysicsShape phyShape; phyShape = new PhysicsShape(convexes, meshHash); phyShape.Complexity = convexes.Count; phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.DecomposedConvexHulls); return phyShape; }
private static PhysicsShape CreatePhysicsShapeFromTrimeshAndCache(MeshingStage meshingStage, ulong meshHash, PhysX.TriangleMeshGeometry triMesh) { PhysicsShape phyShape; phyShape = new PhysicsShape(triMesh, ShapeType.TriMesh, meshHash); phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.TriMesh); return phyShape; }
private static PhysicsShape CreatePhysicsShapeFromSingleConvexAndCache(MeshingStage meshingStage, ulong meshHash, PhysX.ConvexMeshGeometry convex) { PhysicsShape phyShape; phyShape = new PhysicsShape(new List<PhysX.ConvexMeshGeometry> { convex }, meshHash, true); phyShape.AddRef(); //complex shapes are cached meshingStage.CacheShape(meshHash, phyShape, ShapeType.SingleConvex); return phyShape; }