Selaa lähdekoodia

update docs about LineEdgesRenderer

Bartosz Ostapowicz 7 vuotta sitten
vanhempi
commit
6926843670

+ 3 - 0
src/Mesh/babylon.linesMesh.ts

@@ -2,6 +2,9 @@
     export class LinesMesh extends Mesh {
         public color = new Color3(1, 1, 1);
         public alpha = 1;
+        /**
+         @hidden
+         **/
         public _edgesRenderer: Nullable<LineEdgesRenderer>;
         /**
          * The intersection Threshold is the margin applied when intersection a segment of the LinesMesh with a Ray.

+ 17 - 4
src/Rendering/babylon.edgesRenderer.ts

@@ -29,10 +29,10 @@
         // Beware when you use this class with complex objects as the adjacencies computation can be really long
         /**
          *
-         * @param {BABYLON.AbstractMesh} source Mesh used to create edges
-         * @param {number} epsilon sum of angles in adjacency to check for edge
-         * @param {boolean} checkVerticesInsteadOfIndices
-         * @param {boolean} generateEdgesLines - should generate Lines or only prepare resources.
+         * @param  source Mesh used to create edges
+         * @param  epsilon sum of angles in adjacency to check for edge
+         * @param  checkVerticesInsteadOfIndices
+         * @param  generateEdgesLines - should generate Lines or only prepare resources.
          */
         constructor(source: AbstractMesh, epsilon = 0.95, checkVerticesInsteadOfIndices = false, generateEdgesLines = true) {
             this._source = source;
@@ -127,6 +127,15 @@
             return -1;
         }
 
+        /**
+         * Checks if the pair of p0 and p1 is en edge
+         * @param faceIndex
+         * @param edge
+         * @param faceNormals
+         * @param  p0
+         * @param  p1
+         * @private
+         */
         protected _checkEdge(faceIndex: number, edge: number, faceNormals: Array<Vector3>, p0: Vector3, p1: Vector3): void {
             var needToCreateLine;
 
@@ -191,6 +200,10 @@
             }
         }
 
+        /**
+         * Generates lines edges from adjacencjes
+         * @private
+         */
         _generateEdgesLines(): void {
             var positions = this._source.getVerticesData(VertexBuffer.PositionKind);
             var indices = this._source.getIndices();

+ 8 - 8
src/Rendering/babylon.lineEdgesRenderer.ts

@@ -19,9 +19,9 @@
 
         /**
          * This constructor turns off auto generating edges line in Edges Renderer to make it here.
-         * @param {BABYLON.AbstractMesh} source LineMesh used to generate edges
-         * @param {number} epsilon not important (specified angle for edge detection)
-         * @param {boolean} checkVerticesInsteadOfIndices not important for LineMesh
+         * @param  source LineMesh used to generate edges
+         * @param  epsilon not important (specified angle for edge detection)
+         * @param  checkVerticesInsteadOfIndices not important for LineMesh
          *
          */
         constructor(source: AbstractMesh, epsilon = 0.95, checkVerticesInsteadOfIndices = false) {
@@ -31,11 +31,11 @@
 
         /**
          * Always create the edge since its a line so only important things are p0 and p1
-         * @param {number} faceIndex not important for LineMesh
-         * @param {number} edge not important for LineMesh
-         * @param {Array<BABYLON.Vector3>} faceNormals not important for LineMesh
-         * @param {BABYLON.Vector3} p0 beginnig of line
-         * @param {BABYLON.Vector3} p1 end of line
+         * @param  faceIndex not important for LineMesh
+         * @param  edge not important for LineMesh
+         * @param  faceNormals not important for LineMesh
+         * @param  p0 beginnig of line
+         * @param  p1 end of line
          * @private
          */
         protected _checkEdge(faceIndex: number, edge: number, faceNormals: Array<Vector3>, p0: Vector3, p1: Vector3): void {