[name]
A class containing utility functions for shapes.
Note that these are all linear functions so it is neccessary to calculate seperately for
x, y (an z, w if present) components of a vector.
Methods
[method:Number area]( contour )
contour -- 2D polygon.
Calculate area of a ( 2D ) contour polygon.
[method:Number b2]( t, p0, p1, p2 )
t -- number
p0, p1, p2 -- x, y, z or w components of a quadratic bezier curve.
Note that this is a linear function so it is neccessary to calculate seperately for
x, y (and z for 3D curves) components of a curve.
Used internally by [page:QuadraticBezierCurve QuadraticBezierCurve],
[page:QuadraticBezierCurve3 QuadraticBezierCurve3] and [page:Font Font].
[method:Number b3]( t, p0, p1, p2, p3 )
t -- number.
p0, p1, p2, p3 -- x, y or z components of a cubic bezier curve..
Note that this is a linear function so it is neccessary to calculate seperately for
x, y (and z for 3D curves) components of a curve.
Used internally by [page:CubicBezierCurve CubicBezierCurve],
[page:CubicBezierCurve3 CubicBezierCurve3] and [page:Font Font].
[method:Boolean isClockwise]( pts )
pts -- points defining a 2D polygon
Note that this is a linear function so it is neccessary to calculate seperately for
x, y components of a polygon.
Used internally by [page:Path Path],
[page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeBufferGeometry ShapeBufferGeometry].
[method:null triangulate]( contour, indices )
contour -- 2D polygon.
indices --
Used internally by [page:ExtrudeGeometry ExtrudeGeometry]
and [page:ShapeBufferGeometry ShapeBufferGeometry] to calculate faces.
[method:null triangulateShape]( contour, holes )
contour -- 2D polygon.
holes -- array of holes
Used internally by [page:ExtrudeGeometry ExtrudeGeometry]
and [page:ShapeBufferGeometry ShapeBufferGeometry] to calculate faces in shapes with holes.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]