提交 5437929d 编写于 作者: G Greg Tatum

Docs: Math todos finished

上级 dc1da85b
......@@ -9,19 +9,19 @@
<body>
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">A geometric line segment represented by a start and end point.</div>
<h2>Constructor</h2>
<h3>[name]([page:todo start], [page:todo end])</h3>
<h3>[name]([page:Vector3 start], [page:Vector3 end])</h3>
<div>
start -- todo <br />
end -- todo
start -- [page:Vector3] Start of the line segment<br />
end -- [page:Vector3] End of the line segment
</div>
<div>
todo
The start and end vectors default to origin vectors if none are set.
</div>
......@@ -30,109 +30,103 @@
<h3>.[page:Vector3 start]</h3>
<div>
todo
</div>
<h3>.[page:Vector3 end]</h3>
<div>
todo
</div>
<h2>Methods</h2>
<h3>.closestPointToPointParameter([page:todo point], [page:todo clampToLine]) [page:todo]</h3>
<h3>.set([page:Vector3 start], [page:Vector3 end]) [page:Line3]</h3>
<div>
point -- todo <br />
clampToLine -- todo
start -- [page:Vector3] <br />
end -- [page:Vector3]
</div>
<div>
todo
Sets the start and end values by copying the provided vectors.
</div>
<h3>.distanceSq() [page:todo]</h3>
<h3>.copy([page:Line3 line]) [page:Line3]</h3>
<div>
todo
line -- [page:Line3]
</div>
<h3>.copy([page:todo line]) [page:todo]</h3>
<div>
line -- todo
Copies the passed line's start and end vectors to this line.
</div>
<h3>.clone() [page:Line3]</h3>
<div>
todo
Return a new copy of this [page:Line3].
</div>
<h3>.applyMatrix4([page:todo matrix]) [page:todo]</h3>
<h3>.equals([page:Line3 line]) [page:Boolean]</h3>
<div>
matrix -- todo
line -- [page:Line3]
</div>
<div>
todo
</div>
<h3>.distance() [page:todo]</h3>
<h3>.distance() [page:Float]</h3>
<div>
todo
Returns the length of the line segment.
</div>
<h3>.clone() [page:todo]</h3>
Returns true if both line's start and end points are equal.
</div>
<h3>.distanceSq() [page:Float]</h3>
<div>
todo
Returns the line segment's length squared.
</div>
<h3>.equals([page:todo line]) [page:todo]</h3>
<h3>.applyMatrix4([page:Matrix4 matrix]) [page:Line3 this]</h3>
<div>
line -- todo
matrix -- [page:Matrix4]
</div>
<div>
todo
Apply a matrix transform to the line segment.
</div>
<h3>.set([page:todo start], [page:todo end]) [page:todo]</h3>
<h3>.at([page:Float t], [page:Vector3 optionalTarget]) [page:Vector]</h3>
<div>
start -- todo <br />
end -- todo
t -- [page:Float] Use values 0-1 to return a result on the line segment. <br />
optionalTarget -- [page:Vector] Optional target to set the result.
</div>
<div>
todo
Return a vector at a certain position along the line. When t = 0, it returns the start vector, and when t=1 it returns the end vector.
</div>
<h3>.at([page:todo t], [page:todo optionalTarget]) [page:todo]</h3>
<h3>.center([page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
t -- todo <br />
optionalTarget -- todo
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
todo
Return the center of the line segment.
</div>
<h3>.delta([page:todo optionalTarget]) [page:todo]</h3>
<h3>.delta([page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
optionalTarget -- todo
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
todo
Returns the delta vector of the line segment, or the end vector minus the start vector.
</div>
<h3>.closestPointToPoint([page:todo point], [page:todo clampToLine], [page:todo optionalTarget]) [page:todo]</h3>
<h3>.closestPointToPoint([page:Vector3 point], [page:Boolean clampToLine], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
point -- todo <br />
clampToLine -- todo <br />
optionalTarget -- todo
point -- [page:Vector3] <br />
clampToLine -- [page:Boolean] <br />
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
todo
Returns the closets point on the line. If clamp to line is true, then the returned value will be clamped to the line segment.
</div>
<h3>.center([page:todo optionalTarget]) [page:todo]</h3>
<h3>.closestPointToPointParameter([page:Vector3 point], [page:Boolean clampToLine]) [page:Float]</h3>
<div>
optionalTarget -- todo
point -- [page:Vector3] <br />
clampToLine -- [page:Boolean]
</div>
<div>
todo
Returns a point parameter based on the closest point as projected on the line segement. If clamp to line is true, then the returned value will be between 0 and 1.
</div>
<h2>Source</h2>
......
......@@ -9,139 +9,130 @@
<body>
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">A geometric sphere defined by a center position and radius.</div>
<h2>Constructor</h2>
<h3>[name]([page:todo center], [page:todo radius])</h3>
<h3>[name]([page:Vector3 center], [page:Float radius])</h3>
<div>
center -- todo <br />
radius -- todo
</div>
<div>
todo
center -- [page:Vector3] <br />
radius -- [page:Float]
</div>
<h2>Properties</h2>
<h3>.[page:number radius]</h3>
<div>
todo
</div>
<h3>.[page:Vector3 center]</h3>
<div>
todo
</div>
<h3>.[page:Float radius]</h3>
<h2>Methods</h2>
<h3>.set([page:todo center], [page:todo radius]) [page:todo]</h3>
<h3>.set([page:Vector3 center], [page:Float radius]) [page:this:Sphere]</h3>
<div>
center -- todo <br />
radius -- todo
center -- [page:Vector3] <br />
radius -- [page:Float]
</div>
<div>
todo
Sets the center and radius.
</div>
<h3>.applyMatrix4([page:todo matrix]) [page:todo]</h3>
<h3>.applyMatrix4([page:Matrix4 matrix]) [page:Sphere this]</h3>
<div>
matrix -- todo
matrix -- [page:Matrix4]
</div>
<div>
todo
Transforms this sphere with the provided [page:Matrix4].
</div>
<h3>.clampPoint([page:todo point], [page:todo optionalTarget]) [page:todo]</h3>
<h3>.clampPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
point -- todo <br />
optionalTarget -- todo
point -- [page:Vector3] The point to clamp <br />
optionalTarget -- [page:Vector3] The optional target point to return
</div>
<div>
todo
Clamps a point within the sphere. If the point is is outside the sphere, it will clamp it to the closets point on the edge of the sphere.
</div>
<h3>.translate([page:todo offset]) [page:todo]</h3>
<h3>.translate([page:Vector3 offset]) [page:Sphere this]</h3>
<div>
offset -- todo
offset -- [page:Vector3]
</div>
<div>
todo
Translate the sphere's center by the provided offset vector.
</div>
<h3>.clone() [page:todo]</h3>
<h3>.clone() [page:Sphere]</h3>
<div>
todo
Provides a new copy of the sphere.
</div>
<h3>.equals([page:todo sphere]) [page:todo]</h3>
<h3>.equals([page:Sphere sphere]) [page:Boolean]</h3>
<div>
sphere -- todo
sphere -- [page:Sphere]
</div>
<div>
todo
Checks to see if the two spheres' centers and radii are equal.
</div>
<h3>.setFromPoints([page:todo points], [page:Vector3 optionalCenter]) [page:todo]</h3>
<h3>.setFromPoints([page:Array points], [page:Vector3 optionalCenter]) [page:Sphere this]</h3>
<div>
points -- list of [page:Vector3 vector] positions.<br />
optionalCenter -- optional position for the sphere's center.<br />
points -- [page:Array] of [page:Vector3] positions.<br />
optionalCenter -- Optional [page:Vector3] position for the sphere's center.<br />
</div>
<div>
Computes the minimum bounding sphere for *points*. If *optionalCenter* is given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing *points* is calculated.
</div>
<h3>.distanceToPoint([page:todo point]) [page:todo]</h3>
<h3>.distanceToPoint([page:Vector3 point]) [page:Float]</h3>
<div>
point -- todo
point -- [page:Vector3]
</div>
<div>
todo
Returns the closest distance from the boundary of the sphere to the point. If the sphere contains the point, the distance will be negative.
</div>
<h3>.getBoundingBox([page:todo optionalTarget]) [page:todo]</h3>
<h3>.getBoundingBox([page:Box optionalTarget]) [page:Box]</h3>
<div>
optionalTarget -- todo
optionalTarget -- [page:Box]
</div>
<div>
todo
Returns a bounding box for the sphere, optionally setting a provided box target.
</div>
<h3>.containsPoint([page:todo point]) [page:todo]</h3>
<h3>.containsPoint([page:Vector3 point]) [page:Boolean]</h3>
<div>
point -- todo
point -- [page:Vector3]
</div>
<div>
todo
Checks to see if the sphere contains the provided point inclusive of the edge of the sphere.
</div>
<h3>.copy([page:todo sphere]) [page:todo]</h3>
<h3>.copy([page:Sphere sphere]) [page:Sphere]</h3>
<div>
sphere -- todo
sphere -- [page:Sphere] to copy
</div>
<div>
todo
Copies the values of the passed sphere to this sphere.
</div>
<h3>.intersectsSphere([page:todo sphere]) [page:todo]</h3>
<h3>.intersectsSphere([page:Sphere sphere]) [page:Boolean]</h3>
<div>
sphere -- todo
sphere -- [page:Sphere]
</div>
<div>
todo
Checks to see if two spheres intersect.
</div>
<h3>.empty() [page:todo]</h3>
<h3>.empty() [page:Boolean]</h3>
<div>
todo
Checks to see if the sphere is empty (the radius set to 0).
</div>
<h2>Source</h2>
......
......@@ -9,20 +9,20 @@
<body>
<h1>[name]</h1>
<div class="desc">todo</div>
<div class="desc">A geometric triangle as defined by three vectors.</div>
<h2>Constructor</h2>
<h3>[name]([page:todo a], [page:todo b], [page:todo c])</h3>
<h3>[name]([page:Vector3 a], [page:Vector3 b], [page:Vector3 c])</h3>
<div>
a -- todo <br />
b -- todo <br />
c -- todo
a -- [page:Vector3] <br />
b -- [page:Vector3] <br />
c -- [page:Vector3]
</div>
<div>
todo
Sets the triangle's vectors to the passed vectors.
</div>
......@@ -32,109 +32,110 @@
<h3>.[page:Vector3 a]</h3>
<div>
todo
</div>
The first [page:Vector3] of the triangle.
</div>
<h3>.[page:Vector3 c]</h3>
<div>
todo
</div>
The second [page:Vector3] of the triangle.
</div>
<h3>.[page:Vector3 b]</h3>
<div>
todo
</div>
The third [page:Vector3] of the triangle.
</div>
<h2>Methods</h2>
<h3>.setFromPointsAndIndices([page:todo points], [page:todo i0], [page:todo i1], [page:todo i2]) [page:todo]</h3>
<h3>.setFromPointsAndIndices([page:Array points], [page:Integer i0], [page:Integer i1], [page:Integer i2]) [page:Triangle this]</h3>
<div>
points -- todo <br />
i0 -- todo <br />
i1 -- todo <br />
i2 -- todo
points -- [page:Array] of [page:Vector3]s <br />
i0 -- [page:Integer] index <br />
i1 -- [page:Integer] index <br />
i2 -- [page:Integer] index
</div>
<div>
todo
Sets the triangle's vectors to the vectors in the array.
</div>
<h3>.set([page:todo a], [page:todo b], [page:todo c]) [page:todo]</h3>
<h3>.set([page:Vector3 a], [page:Vector3 b], [page:Vector3 c]) [page:Triangle this]</h3>
<div>
a -- todo <br />
b -- todo <br />
c -- todo
a -- [page:Vector3] <br />
b -- [page:Vector3] <br />
c -- [page:Vector3]
</div>
<div>
todo
Sets the triangle's vectors to the passed vectors.
</div>
<h3>.normal([page:todo optionalTarget]) [page:todo]</h3>
<h3>.normal([page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
optionalTarget -- todo
optionalTarget -- Optional [page:Vector3] target to set the result.
</div>
<div>
todo
Return the calculated normal of the triangle.
</div>
<h3>.barycoordFromPoint([page:todo point], [page:todo optionalTarget]) [page:todo]</h3>
<h3>.barycoordFromPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
point -- todo <br />
optionalTarget -- todo
point -- [page:Vector3] <br />
optionalTarget -- Optional [page:Vector3] target to set the result.
</div>
<div>
todo
Return a barycentric coordinate from the given vector. <br/><br/>
[link:http://commons.wikimedia.org/wiki/File:Barycentric_coordinates_1.png](Picture of barycentric coordinates)
</div>
<h3>.clone() [page:todo]</h3>
<h3>.clone() [page:Triangle]</h3>
<div>
todo
Return a new copy of this triangle.
</div>
<h3>.area() [page:todo]</h3>
<h3>.area() [page:Float]</h3>
<div>
todo
Return the area of the triangle.
</div>
<h3>.midpoint([page:todo optionalTarget]) [page:todo]</h3>
<h3>.midpoint([page:Vector3 optionalTarget]) [page:Vector3]</h3>
<div>
optionalTarget -- todo
optionalTarget -- Optional [page:Vector3] target to set the result.
</div>
<div>
todo
Return the midpoint of the triangle. Optionally sets a target vector.
</div>
<h3>.equals([page:todo triangle]) [page:todo]</h3>
<h3>.equals([page:Triangle triangle]) [page:Boolean]</h3>
<div>
triangle -- todo
triangle -- [page:Triangle]
</div>
<div>
todo
Checks to see if two triangles are equal (share the same vectors).
</div>
<h3>.plane([page:todo optionalTarget]) [page:todo]</h3>
<h3>.plane([page:Plane optionalTarget]) [page:Plane]</h3>
<div>
optionalTarget -- todo
optionalTarget -- Optional [page:Plane] target to set the result.
</div>
<div>
todo
Return a [page:Plane plane] based on the triangle. Optionally sets a target plane.
</div>
<h3>.containsPoint([page:todo point]) [page:todo]</h3>
<h3>.containsPoint([page:Vector3 point]) [page:Boolean]</h3>
<div>
point -- todo
point -- [page:Vector3]
</div>
<div>
todo
Checks to see if the passed vector is within the triangle.
</div>
<h3>.copy([page:todo triangle]) [page:todo]</h3>
<h3>.copy([page:Triangle triangle]) [page:Triangle]</h3>
<div>
triangle -- todo
triangle -- [page:Triangle]
</div>
<div>
todo
Copies the values of the vertices of the passed triangle to this triangle.
</div>
<h2>Source</h2>
......
......@@ -210,7 +210,12 @@
value -- [page:Float]
</div>
<div>
todo
Sets the value of the vector component x, y, or z by an index.<br/><br/>
Index 0: x<br/>
Index 1: y<br/>
Index 2: z<br/>
Index 3: w<br/>
</div>
<h3>.fromArray([page:Array array]) [page:Vector4 this]</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册