1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<p class="desc">
A class containing utility functions for shapes.<br /><br />
Note that these are all linear functions so it is neccessary to calculate separately for
x, y (and z, w if present) components of a vector.
</p>
<h2>Methods</h2>
<h3>[method:Number area]( contour )</h3>
<p>
contour -- 2D polygon. An array of THREE.Vector2()<br /><br />
Calculate area of a ( 2D ) contour polygon.<br /><br />
</p>
<h3>[method:Boolean isClockwise]( pts )</h3>
<p>
pts -- points defining a 2D polygon<br /><br />
Note that this is a linear function so it is neccessary to calculate separately for
x, y components of a polygon.<br /><br />
Used internally by [page:Path Path],
[page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry].
</p>
<h3>[method:Array triangulateShape]( contour, holes )</h3>
<p>
contour -- 2D polygon.<br />
holes -- array of holes<br /><br />
Used internally by [page:ExtrudeGeometry ExtrudeGeometry] and [page:ShapeGeometry ShapeGeometry] to calculate faces in shapes with holes.
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
|