瀏覽代碼

API doc : class Path3D inline doc added

jbousquie 9 年之前
父節點
當前提交
c616a17b54
共有 1 個文件被更改,包括 25 次插入0 次删除
  1. 25 0
      src/Math/babylon.math.ts

+ 25 - 0
src/Math/babylon.math.ts

@@ -3131,6 +3131,8 @@
 
         /**
         * new Path3D(path, normal, raw)
+        * Creates a Path3D. A Path3D is a logical math object, so not a mesh.  
+        * please read the description in the tutorial :  http://doc.babylonjs.com/tutorials/How_to_use_Path3D  
         * path : an array of Vector3, the curve axis of the Path3D
         * normal (optional) : Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.
         * raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.
@@ -3143,26 +3145,49 @@
             this._compute(firstNormal);
         }
 
+        /**
+         * Returns the Path3D array of successive Vector3 designing its curve.  
+         */
         public getCurve(): Vector3[] {
             return this._curve;
         }
 
+        /**
+         * Returns an array populated with tangent vectors on each Path3D curve points.
+         */
         public getTangents(): Vector3[] {
             return this._tangents;
         }
 
+
+        /**
+         * Returns an array populated with normal vectors on each Path3D curve points.
+         */
         public getNormals(): Vector3[] {
             return this._normals;
         }
 
+
+        /**
+         * Returns an array populated with binormal vectors on each Path3D curve points.
+         */
         public getBinormals(): Vector3[] {
             return this._binormals;
         }
 
+
+        /**
+         * Returns an array populated with distances (float) of the i-th point from the first curve point.
+         */
         public getDistances(): number[] {
             return this._distances;
         }
 
+
+        /**
+         * Forces the Path3D tangent, normal, binormal and distance recomputation.
+         * Returns the same object updated.  
+         */
         public update(path: Vector3[], firstNormal?: Vector3): Path3D {
             for (var p = 0; p < path.length; p++) {
                 this._curve[p].x = path[p].x;