mark all constructor with annotation

This commit is contained in:
Val Erastov 2015-07-19 21:03:54 -07:00
parent f1e23e76e7
commit ca5b5d056e
19 changed files with 71 additions and 20 deletions

View file

@ -306,7 +306,7 @@ TCAD.geom.extrude = function(source, target) {
TCAD.geom.FACE_COUNTER = 0;
/** @Constructor **/
/** @constructor */
TCAD.Solid = function(polygons, material) {
THREE.Geometry.call( this );
this.dynamic = true; //true by default
@ -370,7 +370,7 @@ if (typeof THREE !== "undefined") {
TCAD.Solid.prototype = Object.create( THREE.Geometry.prototype );
}
/** @Constructor **/
/** @constructor */
TCAD.SketchFace = function(solid, poly) {
var proto = poly.__face;
poly.__face = this;
@ -429,9 +429,7 @@ TCAD.SketchFace.prototype.syncSketches = function(geom) {
this.sketchGeom.depth = depth;
};
/**
* Polygon
**/
/** @constructor */
TCAD.Polygon = function(shell, holes, normal) {
if (!holes) {
@ -541,6 +539,7 @@ TCAD.Polygon.prototype.eachVertex = function(handler) {
}
};
/** @constructor */
TCAD.Sketch = function() {
this.group = new THREE.Object3D();
};

View file

@ -109,6 +109,7 @@ TCAD.graph.finaAllLoops = function(graph) {
return loops;
};
/** @constructor */
TCAD.graph.Graph = function(data) {
this.id = function(e) {

View file

@ -74,6 +74,7 @@
* </table>
*
* @version $Id: LevenbergMarquardtOptimizer.java 1416643 2012-12-03 19:37:14Z tn $
* @constructor
*/
function LMOptimizer(startPoint, target, model, jacobian) {

View file

@ -1,4 +1,5 @@
/** @constructor */
TCAD.math.Matrix = function(r, c) {
this.data = [];
this.rSize = r;
@ -119,6 +120,7 @@ TCAD.math.Matrix.prototype.norm = function(v) {
return Math.sqrt(sum);
};
/** @constructor */
TCAD.math.Vector = function(n) {
TCAD.math.Matrix.call(this, n, 1);
};

View file

@ -14,6 +14,7 @@ TCAD.math.Arrays_fill = function(a, fromIndex, toIndex,val) {
a[i] = val;
};
/** @constructor */
TCAD.math.QR = function(matrix) {
var vec = TCAD.math.vec;
this.matrix = matrix;

View file

@ -1,4 +1,5 @@
/** @constructor */
TCAD.Vector = function(x, y, z) {
this.x = x || 0;
this.y = y || 0;
@ -112,9 +113,7 @@ TCAD.Vector.prototype.three = function() {
return new THREE.Vector3(this.x, this.y, this.z);
};
/** @constructor */
TCAD.Matrix = function() {
this.reset();
};

View file

@ -63,6 +63,7 @@ TCAD.TWO.utils.setStyle = function(style, ctx, scale) {
ctx.fillStyle = style.fillStyle;
};
/** @constructor */
TCAD.TWO.Viewer = function(canvas) {
this.canvas = canvas;
@ -357,6 +358,7 @@ TCAD.TWO.Viewer.prototype.deselectAll = function() {
while(this.selected.length > 0) this.selected.pop();
};
/** @constructor */
TCAD.TWO.Layer = function(name, style) {
this.name = name;
this.style = style;
@ -369,6 +371,7 @@ TCAD.TWO.Viewer.prototype.fullHeavyUIRefresh = function() {
this.parametricManager.notify();
};
/** @constructor */
TCAD.TWO.Polygon = function(points) {
this.points = points;
this.style = null;
@ -391,6 +394,7 @@ TCAD.TWO.Polygon.prototype.draw = function(ctx) {
ctx.stroke();
};
/** @constructor */
TCAD.TWO.Polyline = function(points) {
this.points = points;
this.style = null;
@ -417,6 +421,7 @@ TCAD.TWO.utils.genID = function() {
return TCAD.TWO.utils.ID_COUNTER ++;
};
/** @constructor */
TCAD.TWO.SketchObject = function() {
this.id = TCAD.TWO.utils.genID();
this.aux = false;
@ -494,6 +499,7 @@ TCAD.TWO.SketchObject.prototype.draw = function(ctx, scale, viewer) {
}
};
/** @constructor */
TCAD.TWO.Ref = function(value) {
this.id = TCAD.TWO.utils.genID();
this.value = value;
@ -507,6 +513,7 @@ TCAD.TWO.Ref.prototype.get = function() {
return this.value;
};
/** @constructor */
TCAD.TWO.Param = function(obj, prop) {
this.id = TCAD.TWO.utils.genID();
this.obj = obj;
@ -521,6 +528,7 @@ TCAD.TWO.Param.prototype.get = function() {
return this.obj[this.prop];
};
/** @constructor */
TCAD.TWO.EndPoint = function(x, y) {
TCAD.TWO.SketchObject.call(this);
this.x = x;
@ -556,6 +564,7 @@ TCAD.TWO.EndPoint.prototype.drawImpl = function(ctx, scale) {
TCAD.TWO.utils.drawPoint(ctx, this.x, this.y, 3, scale)
};
/** @constructor */
TCAD.TWO.Segment = function(a, b) {
TCAD.TWO.SketchObject.call(this);
this.a = a;
@ -619,6 +628,7 @@ TCAD.TWO.Segment.prototype.drawImpl = function(ctx, scale) {
// ctx.restore();
};
/** @constructor */
TCAD.TWO.Point = function(x, y, rad) {
this.x = x;
this.y = y;
@ -630,6 +640,7 @@ TCAD.TWO.Point.prototype.draw = function(ctx, scale) {
TCAD.TWO.utils.drawPoint(ctx, this.x, this.y, this.rad, scale);
};
/** @constructor */
TCAD.TWO.CrossHair = function(x, y, rad) {
this.x = x;
this.y = y;
@ -653,6 +664,7 @@ TCAD.TWO.CrossHair.prototype.draw = function(ctx, scale) {
ctx.restore();
};
/** @constructor */
TCAD.TWO.ToolManager = function(viewer, defaultTool) {
this.stack = [defaultTool];
var canvas = viewer.canvas;
@ -704,6 +716,7 @@ TCAD.TWO.ToolManager.prototype.getTool = function() {
return this.stack[this.stack.length - 1];
};
/** @constructor */
TCAD.TWO.PanTool = function(viewer) {
this.viewer = viewer;
this.dragging = false;
@ -795,6 +808,7 @@ TCAD.TWO.PanTool.prototype.mousewheel = function(e) {
this.viewer.refresh();
};
/** @constructor */
TCAD.TWO.DragTool = function(obj, viewer) {
this.obj = obj;
this.viewer = viewer;

View file

@ -21,6 +21,7 @@ TCAD.constraints.create = function(name, params, values) {
}
};
/** @constructor */
TCAD.constraints.Equal = function(params) {
this.params = params;
@ -81,6 +82,7 @@ TCAD.constraints.Weighted = function(constr, weight) {
};
/** @constructor */
TCAD.constraints.EqualsTo = function(params, value) {
this.params = params;
@ -96,6 +98,7 @@ TCAD.constraints.EqualsTo = function(params, value) {
};
};
/** @constructor */
TCAD.constraints.P2LDistance = function(params, distance) {
this.params = params;
@ -178,6 +181,7 @@ TCAD.constraints.P2LDistance = function(params, distance) {
};
/** @constructor */
TCAD.constraints.P2LDistanceV = function(params) {
this.params = params;//.slice(0, params.length -1);
@ -258,6 +262,7 @@ TCAD.constraints.P2LDistanceV = function(params) {
};
/** @constructor */
TCAD.constraints.P2PDistance = function(params, distance) {
this.params = params;
@ -293,6 +298,7 @@ TCAD.constraints.P2PDistance = function(params, distance) {
};
/** @constructor */
TCAD.constraints.P2PDistanceV = function(params) {
this.params = params;
@ -330,6 +336,7 @@ TCAD.constraints.P2PDistanceV = function(params) {
};
/** @constructor */
TCAD.constraints.Parallel = function(params) {
this.params = params;
@ -363,6 +370,7 @@ TCAD.constraints.Parallel = function(params) {
}
};
/** @constructor */
TCAD.constraints.Perpendicular = function(params) {
this.params = params;

View file

@ -1,5 +1,6 @@
TCAD.parametric = {};
/** @constructor */
TCAD.parametric.Param = function(id, value) {
this.id = id;
this.value = value;
@ -15,6 +16,7 @@ TCAD.parametric.Param.prototype.get = function() {
};
/** @constructor */
TCAD.parametric.System = function(constraints) {
this.constraints = constraints;
this.params = [];

View file

@ -1,5 +1,4 @@
/** @constructor */
TCAD.TWO.FilletTool = function(viewer) {
this.viewer = viewer;
};

View file

@ -1,3 +1,4 @@
/** @constructor */
TCAD.HistoryManager = function(viewer) {
this.viewer = viewer;
this.dmp = new diff_match_patch();

View file

@ -10,6 +10,7 @@ TCAD.io.Types = {
VDIM : 'TCAD.TWO.VDimension'
}
/** @constructor */
TCAD.IO = function(viewer) {
this.viewer = viewer;
};
@ -286,6 +287,7 @@ TCAD.io._format = function(str, args) {
});
};
/** @constructor */
TCAD.io.PrettyColors = function() {
var colors = ["#000000", "#00008B", "#006400", "#8B0000", "#FF8C00", "#E9967A"];
var colIdx = 0;
@ -294,6 +296,7 @@ TCAD.io.PrettyColors = function() {
}
}
/** @constructor */
TCAD.io.TextBuilder = function() {
this.data = "";
this.fline = function (chunk, args) {
@ -311,6 +314,7 @@ TCAD.io.TextBuilder = function() {
}
}
/** @constructor */
TCAD.io.BBox = function() {
var bbox = [Number.MAX_VALUE, Number.MAX_VALUE, - Number.MAX_VALUE, - Number.MAX_VALUE];

View file

@ -1,5 +1,6 @@
TCAD.STORAGE_PREFIX = "TCAD.projects.";
/** @constructor */
TCAD.App2D = function() {
var app = this;

View file

@ -1,5 +1,6 @@
TCAD.TWO.Constraints = {};
/** @constructor */
TCAD.TWO.SubSystem = function() {
this.alg = 1;
this.error = 0;
@ -7,6 +8,7 @@ TCAD.TWO.SubSystem = function() {
this.constraints = [];
};
/** @constructor */
TCAD.TWO.ParametricManager = function(viewer) {
this.viewer = viewer;
this.subSystems = [];
@ -550,6 +552,7 @@ TCAD.TWO.Constraints.Factory = {};
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Coincident = function(a, b) {
this.a = a;
this.b = b;
@ -582,6 +585,7 @@ TCAD.TWO.Constraints.Coincident.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Lock = function(p, c) {
this.p = p;
this.c = c;
@ -612,6 +616,7 @@ TCAD.TWO.Constraints.Lock.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Parallel = function(l1, l2) {
this.l1 = l1;
this.l2 = l2;
@ -641,6 +646,7 @@ TCAD.TWO.Constraints.Parallel.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Perpendicular = function(l1, l2) {
this.l1 = l1;
this.l2 = l2;
@ -670,6 +676,7 @@ TCAD.TWO.Constraints.Perpendicular.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.P2LDistance = function(p, l, d) {
this.p = p;
this.l = l;
@ -702,6 +709,7 @@ TCAD.TWO.Constraints.P2LDistance.prototype.SettableFields = {'d' : "Enter the di
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.P2LDistanceV = function(p, l, d) {
this.p = p;
this.l = l;
@ -732,6 +740,7 @@ TCAD.TWO.Constraints.P2LDistanceV.prototype.getSolveData = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.P2PDistance = function(p1, p2, d) {
this.p1 = p1;
this.p2 = p2;
@ -764,6 +773,7 @@ TCAD.TWO.Constraints.P2PDistance.prototype.SettableFields = {'d' : "Enter the di
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.P2PDistanceV = function(p1, p2, d) {
this.p1 = p1;
this.p2 = p2;
@ -794,6 +804,7 @@ TCAD.TWO.Constraints.P2PDistanceV.prototype.getSolveData = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Radius = function(arc, d) {
this.arc = arc;
this.d = d;
@ -823,6 +834,7 @@ TCAD.TWO.Constraints.Radius.prototype.SettableFields = {'d' : "Enter the radius
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.RR = function(arc1, arc2) {
this.arc1 = arc1;
this.arc2 = arc2;
@ -851,6 +863,7 @@ TCAD.TWO.Constraints.RR.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Vertical = function(line) {
this.line = line;
};
@ -877,6 +890,7 @@ TCAD.TWO.Constraints.Vertical.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Horizontal = function(line) {
this.line = line;
};
@ -903,6 +917,7 @@ TCAD.TWO.Constraints.Horizontal.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.Tangent = function(arc, line) {
this.arc = arc;
this.line = line;
@ -933,6 +948,7 @@ TCAD.TWO.Constraints.Tangent.prototype.getObjects = function() {
// ------------------------------------------------------------------------------------------------------------------ //
/** @constructor */
TCAD.TWO.Constraints.PointOnLine = function(point, line) {
this.point = point;
this.line = line;

View file

@ -1,4 +1,4 @@
/** @constructor */
TCAD.TWO.Arc = function(a, b, c) {
TCAD.TWO.SketchObject.call(this);
this.a = a;
@ -90,6 +90,7 @@ TCAD.TWO.Arc.prototype.stabilize = function(viewer) {
viewer.parametricManager._add(new TCAD.TWO.Constraints.P2PDistanceV(this.a, this.c, this.r));
};
/** @constructor */
TCAD.TWO.AddArcTool = function(viewer) {
this.viewer = viewer;
this.arc = null;

View file

@ -1,4 +1,4 @@
/** @constructor */
TCAD.TWO.Circle = function(c) {
TCAD.TWO.SketchObject.call(this);
this.c = c;
@ -40,7 +40,7 @@ TCAD.TWO.Circle.prototype.getDefaultTool = function(viewer) {
return editTool;
};
/** @constructor */
TCAD.TWO.EditCircleTool = function(viewer) {
this.viewer = viewer;
this.circle = null;

View file

@ -1,4 +1,4 @@
/** @constructor */
TCAD.TWO.LinearDimension = function(a, b) {
TCAD.TWO.SketchObject.call(this);
this.a = a;
@ -108,7 +108,7 @@ TCAD.TWO.LinearDimension.prototype.normalDistance = function(aim) {
return -1;
};
/** @constructor */
TCAD.TWO.Dimension = function(a, b) {
TCAD.TWO.LinearDimension.call(this, a, b);
};
@ -117,7 +117,7 @@ TCAD.TWO.utils.extend(TCAD.TWO.Dimension, TCAD.TWO.LinearDimension);
TCAD.TWO.Dimension.prototype._class = 'TCAD.TWO.Dimension';
/** @constructor */
TCAD.TWO.HDimension = function(a, b) {
TCAD.TWO.LinearDimension.call(this, a, b);
};
@ -129,7 +129,7 @@ TCAD.TWO.HDimension.prototype._class = 'TCAD.TWO.HDimension';
TCAD.TWO.HDimension.prototype.getA = function() { return this.a };
TCAD.TWO.HDimension.prototype.getB = function() { return {x : this.b.x, y : this.a.y} };
/** @constructor */
TCAD.TWO.VDimension = function(a, b) {
TCAD.TWO.LinearDimension.call(this, a, b);
};
@ -141,7 +141,7 @@ TCAD.TWO.VDimension.prototype._class = 'TCAD.TWO.VDimension';
TCAD.TWO.VDimension.prototype.getA = function() { return this.a };
TCAD.TWO.VDimension.prototype.getB = function() { return {x : this.a.x, y : this.b.y} };
/** @constructor */
TCAD.TWO.AddDimTool = function(viewer, layer, dimCreation) {
this.viewer = viewer;
this.layer = layer;

View file

@ -1,4 +1,4 @@
/** @constructor */
TCAD.TWO.AddSegmentTool = function(viewer, multi) {
this.viewer = viewer;
this.line = null;
@ -75,7 +75,7 @@ TCAD.TWO.AddSegmentTool.prototype.keydown = function(e) {
TCAD.TWO.AddSegmentTool.prototype.keypress = function(e) {};
TCAD.TWO.AddSegmentTool.prototype.keyup = function(e) {};
/** @constructor */
TCAD.TWO.AddPointTool = function(viewer) {
this.viewer = viewer;
};

View file

@ -1,6 +1,7 @@
TCAD.ui = {};
/** @constructor */
TCAD.ui.Window = function(el) {
this.root = el;
var root = this.root;
@ -47,6 +48,7 @@ TCAD.ui.openWin = function(win, mouseEvent) {
};
/** @constructor */
TCAD.ui.List = function(el, model) {
this.ul = el;
this.template = this.ul.html();