private void CreateSimVerticesForGoal(TexturedPrimitive softBodyObject, float mass) { int numVertices = softBodyObject.NumVertices; float vertexMass = mass / numVertices; simVerticesForGoal = new SimVertex[numVertices]; for (int i = 0; i < numVertices; i++) { simVerticesForGoal[i] = new SimVertex(vertexMass, SimObjectType.PASSIVE, i, softBodyObject); this.AddSimObject(simVerticesForGoal[i]); } }
private void CreateSimVertices(TexturedPlane clothPlane, float clothMass) { int numVertices = clothPlane.NumVertices; float vertexMass = clothMass / numVertices; simVertices = new SimVertex[numVertices]; for (int i = 0; i < numVertices; i++) { simVertices[i] = new SimVertex(vertexMass, SimObjectType.ACTIVE, i, clothPlane); this.AddSimObject(simVertices[i]); } }