/* <copyright>
This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
</copyright> */
var VecUtils = require("js/helper-classes/3D/vec-utils").VecUtils;
function SubpathOffsetPoint(pos, mapPos) {
this.Pos = Vector.create([pos[0],pos[1],pos[2]]);
this.CurveMapPos = Vector.create([mapPos[0], mapPos[1], mapPos[2]]);
}
function SubpathOffsetTriangle(v0, v1, v2) {
this.v0 = v0;
this.v1 = v1;
this.v2 = v2;
this.n = Vector.create([0,0,1]); //replace with the actual cross product later
}
function sortNumberAscending(a,b){
return a-b;
}
function sortNumberDescending(a,b){
return b-a;
}
function SegmentIntersections(){
this.paramArray = [];
}
///////////////////////////////////////////////////////////////////////
// Class GLSubpath
// representation a sequence of cubic bezier curves.
// Derived from class GLGeomObj
///////////////////////////////////////////////////////////////////////
function GLSubpath() {
///////////////////////////////////////////////////
// Instance variables
///////////////////////////////////////////////////
this._Anchors = [];
this._BBoxMin = [0, 0, 0];
this._BBoxMax = [0, 0, 0];
this._isClosed = false;
this._samples = []; //polyline representation of this curve
this._sampleParam = []; //parametric distance of samples, within [0, N], where N is # of Bezier curves (=# of anchor points if closed, =#anchor pts -1 if open)
this._anchorSampleIndex = []; //index within _samples corresponding to anchor points
this._UnprojectedAnchors = [];
//offset path samples and the points on the input path they map to
this._offsetPointsLeft = [];
this._offsetPointsRight = [];
//triangles determined by the offset points
this._offsetTrianglesLeft = [];
this._offsetTrianglesRight = [];
//initially set the _dirty bit so we will construct samples
this._dirty = true;
//whether or not t
|