From fcff3438ce0ccc4a719f87ef9d2f2b267283bdc0 Mon Sep 17 00:00:00 2001 From: Dave Kushner Date: Mon, 6 May 2013 12:54:02 -0700 Subject: [PATCH] Update several math documentation pages. Added some info regarding the quaternion object, its applications and the purpose of its functions. Added some info regarding the box2 object and its functions. --- docs/api/math/Box2.html | 159 ++++++++++++++++++---------------- docs/api/math/Quaternion.html | 36 ++++---- 2 files changed, 106 insertions(+), 89 deletions(-) diff --git a/docs/api/math/Box2.html b/docs/api/math/Box2.html index 8a07e323f8..d88728b2e9 100644 --- a/docs/api/math/Box2.html +++ b/docs/api/math/Box2.html @@ -9,19 +9,19 @@

[name]

-
todo
+
Represents a boundary box in 2D space.

Constructor

-

[name]([page:todo min], [page:todo max])

+

[name]([page:Vector2 min], [page:Vector2 max])

- min -- todo
- max -- todo + min -- Lower (x, y) boundary of the box.
+ max -- Upper (x, y) boundary of the box.
- todo + Creates a box bounded by min and max.
@@ -31,186 +31,199 @@

.[page:Vector2 max]

- todo + Upper (x, y) boundary of this box.

.[page:Vector2 min]

- todo + Lower (x, y) boundary of this box.

Methods

-

.set([page:todo min], [page:todo max]) [page:todo]

+

.set([page:Vector2 min], [page:Vector2 max]) [page:todo]

- min -- todo
- max -- todo + min -- Lower (x, y) boundary of the box.
+ max -- Upper (x, y) boundary of the box.
- todo + Sets the lower and upper (x, y) boundaries of this box.
-

.expandByPoint([page:todo point]) [page:todo]

+

.expandByPoint([page:Vector2 point]) [page:Box2]

- point -- todo + point -- Point that should be included in the box.
- todo + Expands the boundaries of this box to include *point*.
-

.clampPoint([page:todo point], [page:todo optionalTarget]) [page:todo]

+

.clampPoint([page:Vector2 point], [page:Vector2 optionalTarget]) [page:Vector2]

- point -- todo
- optionalTarget -- todo + point -- Position to clamp.
+ optionalTarget -- If specified, the clamped result will be copied here.
- todo + Clamps *point* within the bounds of this box.
-

.isIntersectionBox([page:todo box]) [page:todo]

+

.isIntersectionBox([page:Box2 box]) [page:Boolean]

- box -- todo + box -- Box to check for intersection against.
- todo + Determines whether or not this box intersects *box*.
-

.setFromPoints([page:todo points]) [page:todo]

+

.setFromPoints([page:Array points]) [page:Box2]

- points -- todo + points -- Set of points that the resulting box will envelop.
- todo + Sets the upper and lower bounds of this box to include all of the points in *points*.
-

.size([page:todo optionalTarget]) [page:todo]

+

.size([page:Vector2 optionalTarget]) [page:Vector2]

- optionalTarget -- todo + optionalTarget -- If specified, the result will be copied here.
- todo + Returns the width and height of this box.
-

.union([page:todo box]) [page:todo]

+

.union([page:Box2 box]) [page:Box2]

- box -- todo + box -- Box that will be unioned with this box.
- todo + Unions this box with *box* setting the upper bound of this box to the greater of the + two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes' + lower bounds.
-

.getParameter([page:todo point]) [page:todo]

+

.getParameter([page:Vector2 point]) [page:Vector2]

- point -- todo + point -- Point to parametrize.
- todo + Returns point as a proportion of this box's width and height.
-

.expandByScalar([page:todo scalar]) [page:todo]

+

.expandByScalar([page:float scalar]) [page:Box2]

- scalar -- todo + scalar -- Distance to expand.
- todo + Expands each dimension of the box by *scalar*. If negative, the dimensions of the box
+ will be contracted.
-

.intersect([page:todo box]) [page:todo]

+

.intersect([page:Box2 box]) [page:Box2]

- box -- todo + box -- Box to intersect with.
- todo + Returns the intersection of this and *box*, setting the upper bound of this box to the lesser
+ of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes'
+ lower bounds.
-

.containsBox([page:todo box]) [page:todo]

+

.containsBox([page:Box2 box]) [page:Boolean]

- box -- todo + box -- Box to test for inclusion.
- todo + Returns true if this box includes the entirety of *box*. If this and *box* overlap exactly,
+ this function also returns true.
-

.translate([page:todo offset]) [page:todo]

+

.translate([page:Vector2 offset]) [page:Box2]

- offset -- todo + offset -- Direction and distance of offset.
- todo + Adds *offset* to both the upper and lower bounds of this box, effectively moving this box
+ *offset* units in 2D space.
-

.empty() [page:todo]

+

.empty() [page:Boolean]

- todo + Returns true if this box includes zero points within its bounds.
+ Note that a box with equal lower and upper bounds still includes one point, the + one both bounds share.
-

.clone() [page:todo]

+

.clone() [page:Box2]

- todo + Returns a copy of this box.
-

.equals([page:todo box]) [page:todo]

+

.equals([page:Box2 box]) [page:Boolean]

- box -- todo + box -- Box to compare.
- todo + Returns true if this box and *box* share the same lower and upper bounds.
-

.expandByVector([page:todo vector]) [page:todo]

+

.expandByVector([page:Vector2 vector]) [page:Box2]

- vector -- todo + vector -- Amount to expand this box in each dimension.
- todo + Expands this box equilaterally by *vector*. The width of this box will be + expanded by the x component of *vector* in both directions. The height of + this box will be expanded by the y component of *vector* in both directions.
-

.copy([page:todo box]) [page:todo]

+

.copy([page:Box2 box]) [page:Box2]

- box -- todo + box -- Box to copy.
- todo + Copies the values of *box* to this box.
-

.makeEmpty() [page:todo]

+

.makeEmpty() [page:Box2]

- todo + Makes this box empty.
-

.center([page:todo optionalTarget]) [page:todo]

+

.center([page:Vector2 optionalTarget]) [page:Vector2]

- optionalTarget -- todo + optionalTarget -- If specified, the result will be copied here.
- todo + Returns the center point of this box.
-

.distanceToPoint([page:todo point]) [page:todo]

+

.distanceToPoint([page:Vector2 point]) [page:Float]

- point -- todo + point -- Point to measure distance to.
- todo + Returns the distance from any edge of this box to the specified point.
+ If the point lies inside of this box, the distance will be 0.
-

.containsPoint([page:todo point]) [page:todo]

+

.containsPoint([page:Vector2 point]) [page:Boolean]

- point -- todo + point -- Point to check for inclusion.
- todo + Returns true if the specified point lies within the boundaries of this box.
-

.setFromCenterAndSize([page:todo center], [page:todo size]) [page:todo]

+

.setFromCenterAndSize([page:Vector2 center], [page:Vector2 size]) [page:Box2]

- center -- todo
- size -- todo + center -- Desired center position of the box.
+ size -- Desired x and y dimensions of the box.
- todo + Centers this box on *center* and sets this box's width and height to the values specified + in *size*.

Source

diff --git a/docs/api/math/Quaternion.html b/docs/api/math/Quaternion.html index 5d53e660f9..d4d20860e2 100644 --- a/docs/api/math/Quaternion.html +++ b/docs/api/math/Quaternion.html @@ -121,44 +121,48 @@ -

.slerp([page:todo qb], [page:todo t]) [page:todo]

+

.slerp([page:Quaternion qb], [page:float t]) [page:Quaternion]

- qb -- todo
- t -- todo + qb -- Target quaternion rotation.
+ t -- Normalized [0..1] interpolation factor.
- todo + Handles the spherical linear interpolation between this quaternion's configuration + and that of *qb*. *t* represents how close to the current (0) or target (1) rotation the + result should be.
-

.toArray() [page:todo]

+

.toArray() [page: Array]

- todo + Returns the numerical elements of this quaternion in an array of format (x, y, z, w).
-

.equals([page:todo v]) [page:todo]

+

.equals([page:Quaternion v]) [page:Boolean]

- v -- todo + v -- Quaternion that this quaternion will be compared to.
- todo + Compares each component of *v* to each component of this quaternion to determine if they + represent the same rotation.
-

.lengthSq() [page:todo]

+

.lengthSq() [page:Float]

- todo + Calculates the squared length of the quaternion.
-

.fromArray([page:todo array]) [page:todo]

+

.fromArray([page:Array array]) [page:Quaternion]

- array -- todo + array -- Array of format (x, y, z, w) used to construct the quaternion.
- todo + Sets this quaternion's component values from an array.
-

.conjugate() [page:todo]

+

.conjugate() [page:Quaternion]

- todo + Returns the rotational conjugate of this quaternion. The conjugate of a quaternion + represents the same rotation in the opposite direction about the rotational axis.

Source

-- GitLab