private void RotateObj(ref GenericUtility.ObjProperties obj, Vector3d versor, double angle) { for (int i = 0; i < obj.vertexPoint.Length; i++) { obj.vertexPoint[i] = Vector3d.RotatePoint(obj.vertexPoint[i], versor, angle); } }
public static GeometryProperties GetObjectGeometry( string fileName, float scale) { GenericUtility.ObjProperties properties = GenericUtility.GetImportedObjectProperties(fileName, scale); return(new GeometryProperties( properties.vertexPoint, properties.triangleIndex)); }
public static GeometryProperties GetObjectGeometry( string fileName, float scale, double rotate) { GenericUtility.ObjProperties properties = GenericUtility.GetImportedObjectProperties(fileName, scale); RotateObj(ref properties, new Vector3d(1.0, 0.0, 0.0), rotate); return(new GeometryProperties( properties.vertexPoint, properties.triangleIndex)); }
private SoftShape BuildSoftBody( string fileName, double scale, Vector3d position) { GenericUtility.ObjProperties prop = GenericUtility.GetImportedObjectProperties(fileName, scale); RotateObj(ref prop, new Vector3d(0.0, 0.0, 1.0), -Math.PI / 4.5); return(new SoftShape( prop.triangleIndex, prop.vertexPoint, position, 1.0, 0.2, 2.0, 60.0)); }