|
@@ -1161,7 +1161,7 @@
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns as a new array
|
|
|
+ * Returns as a new array populated with the mesh material and/or skeleton, if any.
|
|
|
*/
|
|
|
public getAnimatables(): IAnimatable[] {
|
|
|
var results = [];
|
|
@@ -1667,7 +1667,11 @@
|
|
|
}
|
|
|
|
|
|
// Statics
|
|
|
-
|
|
|
+ /**
|
|
|
+ * Returns a new `Mesh` object what is a deep copy of the passed mesh.
|
|
|
+ * The parameter `parsedMesh` is the mesh to be copied.
|
|
|
+ * The parameter `rootUrl` is a string, it's the root URL to prefix the `delayLoadingFile` property with
|
|
|
+ */
|
|
|
public static Parse(parsedMesh: any, scene: Scene, rootUrl: string): Mesh {
|
|
|
var mesh = new Mesh(parsedMesh.name, scene);
|
|
|
mesh.id = parsedMesh.id;
|
|
@@ -2500,6 +2504,10 @@
|
|
|
}
|
|
|
|
|
|
// Tools
|
|
|
+ /**
|
|
|
+ * Returns an object `{min: Vector3, max: Vector3}`
|
|
|
+ * This min and max `Vector3` are the minimum and maximum vectors of each mesh bounding box from the passed array, in the World system
|
|
|
+ */
|
|
|
public static MinMax(meshes: AbstractMesh[]): { min: Vector3; max: Vector3 } {
|
|
|
var minVector: Vector3 = null;
|
|
|
var maxVector: Vector3 = null;
|
|
@@ -2520,7 +2528,9 @@
|
|
|
max: maxVector
|
|
|
};
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * Returns a `Vector3`, the center of the `{min: Vector3, max: Vector3}` or the center of MinMax vector3 computed from a mesh array.
|
|
|
+ */
|
|
|
public static Center(meshesOrMinMaxVector): Vector3 {
|
|
|
var minMaxVector = meshesOrMinMaxVector.min !== undefined ? meshesOrMinMaxVector : Mesh.MinMax(meshesOrMinMaxVector);
|
|
|
return Vector3.Center(minMaxVector.min, minMaxVector.max);
|