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.
130 lines
4.8 KiB
130 lines
4.8 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">
|
||
|
An abstract base class for creating a [name] object that contains methods for interpolation.
|
||
|
For an array of [name]s see [page:CurvePath].
|
||
|
</p>
|
||
|
|
||
|
<h2>Constructor</h2>
|
||
|
|
||
|
|
||
|
<h3>[name]()</h3>
|
||
|
<p>
|
||
|
This constructor creates a new [name].
|
||
|
</p>
|
||
|
|
||
|
<h2>Properties</h2>
|
||
|
|
||
|
<h3>[property:Integer arcLengthDivisions]</h3>
|
||
|
<p>This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via [page:.getLengths].
|
||
|
To ensure precision when using methods like [page:.getSpacedPoints], it is recommended to increase [page:.arcLengthDivisions] if the curve is very large. Default is 200.</p>
|
||
|
|
||
|
<h2>Methods</h2>
|
||
|
|
||
|
<h3>[method:Vector getPoint]( [param:Float t], [param:Vector optionalTarget] )</h3>
|
||
|
<p>
|
||
|
[page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br>
|
||
|
[page:Vector optionalTarget] — (optional) If specified, the result will be copied into this Vector,
|
||
|
otherwise a new Vector will be created. <br /><br />
|
||
|
|
||
|
Returns a vector for a given position on the curve.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Vector getPointAt]( [param:Float u], [param:Vector optionalTarget] )</h3>
|
||
|
<p>
|
||
|
[page:Float u] - A position on the curve according to the arc length. Must be in the range [ 0, 1 ]. <br>
|
||
|
[page:Vector optionalTarget] — (optional) If specified, the result will be copied into this Vector,
|
||
|
otherwise a new Vector will be created. <br /><br />
|
||
|
|
||
|
Returns a vector for a given position on the curve according to the arc length.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Array getPoints]( [param:Integer divisions] )</h3>
|
||
|
<p>
|
||
|
divisions -- number of pieces to divide the curve into. Default is `5`.<br /><br />
|
||
|
|
||
|
Returns a set of divisions + 1 points using getPoint( t ).
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Array getSpacedPoints]( [param:Integer divisions] )</h3>
|
||
|
<p>
|
||
|
divisions -- number of pieces to divide the curve into. Default is `5`.<br /><br />
|
||
|
|
||
|
Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Float getLength]()</h3>
|
||
|
<p>Get total curve arc length.</p>
|
||
|
|
||
|
<h3>[method:Array getLengths]( [param:Integer divisions] )</h3>
|
||
|
<p>Get list of cumulative segment lengths.</p>
|
||
|
|
||
|
<h3>[method:undefined updateArcLengths]()</h3>
|
||
|
<p>
|
||
|
Update the cumlative segment distance cache. The method must be called every time curve parameters are changed.
|
||
|
If an updated curve is part of a composed curve like [page:CurvePath], [page:.updateArcLengths]() must be
|
||
|
called on the composed curve, too.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Float getUtoTmapping]( [param:Float u], [param:Float distance] )</h3>
|
||
|
<p>
|
||
|
Given u in the range ( 0 .. 1 ), returns [page:Float t] also in the range ( 0 .. 1 ).
|
||
|
u and t can then be used to give you points which are equidistant from the ends of the curve,
|
||
|
using [page:.getPoint].
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Vector getTangent]( [param:Float t], [param:Vector optionalTarget] )</h3>
|
||
|
<p>
|
||
|
[page:Float t] - A position on the curve. Must be in the range [ 0, 1 ]. <br>
|
||
|
[page:Vector optionalTarget] — (optional) If specified, the result will be copied into this Vector,
|
||
|
otherwise a new Vector will be created. <br /><br />
|
||
|
|
||
|
Returns a unit vector tangent at t. If the derived curve does not implement its
|
||
|
tangent derivation, two points a small delta apart will be used to find its gradient
|
||
|
which seems to give a reasonable approximation.
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Vector getTangentAt]( [param:Float u], [param:Vector optionalTarget] )</h3>
|
||
|
<p>
|
||
|
[page:Float u] - A position on the curve according to the arc length. Must be in the range [ 0, 1 ]. <br>
|
||
|
[page:Vector optionalTarget] — (optional) If specified, the result will be copied into this Vector,
|
||
|
otherwise a new Vector will be created. <br /><br />
|
||
|
|
||
|
Returns tangent at a point which is equidistant to the ends of the curve from the
|
||
|
point given in [page:.getTangent].
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Object computeFrenetFrames]( [param:Integer segments], [param:Boolean closed] )</h3>
|
||
|
<p>
|
||
|
Generates the Frenet Frames. Requires a curve definition in 3D space. Used in geometries like [page:TubeGeometry] or [page:ExtrudeGeometry].
|
||
|
</p>
|
||
|
|
||
|
<h3>[method:Curve clone]()</h3>
|
||
|
<p>Creates a clone of this instance.</p>
|
||
|
|
||
|
<h3>[method:this copy]( [param:Curve source] )</h3>
|
||
|
<p>Copies another [name] object to this instance.</p>
|
||
|
|
||
|
<h3>[method:Object toJSON]()</h3>
|
||
|
<p>Returns a JSON object representation of this instance.</p>
|
||
|
|
||
|
<h3>[method:this fromJSON]( [param:Object json] )</h3>
|
||
|
<p>Copies the data from the given JSON object to this instance.</p>
|
||
|
|
||
|
<h2>Source</h2>
|
||
|
|
||
|
<p>
|
||
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|