You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

2 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<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 necessary 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.
</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 necessary 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. An array of [page:Vector2].<br />
holes -- An array that holds arrays of [page:Vector2]s. Each array represents a single hole definition.<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>