Package | away3d.core.math |
Class | public final class Number3D |
Property | Defined by | ||
---|---|---|---|
BACKWARD : Number3D
[static]
A 3d number object representing a relative direction backward.
| Number3D | ||
DOWN : Number3D
[static]
A 3d number object representing a relative direction down.
| Number3D | ||
FORWARD : Number3D
[static]
A 3d number object representing a relative direction forward.
| Number3D | ||
LEFT : Number3D
[static]
A 3d number object representing a relative direction left.
| Number3D | ||
modulo : Number [read-only]
The modulo of the 3d number object.
| Number3D | ||
modulo2 : Number [read-only]
The squared modulo of the 3d number object.
| Number3D | ||
RIGHT : Number3D
[static]
A 3d number object representing a relative direction right.
| Number3D | ||
UP : Number3D
[static]
A 3d number object representing a relative direction up.
| Number3D | ||
x : Number
The horizontal coordinate of the 3d number object.
| Number3D | ||
y : Number
The vertical coordinate of the 3d number object.
| Number3D | ||
z : Number
The depth coordinate of the 3d number object.
| Number3D |
Method | Defined by | ||
---|---|---|---|
Number3D
(x:Number = 0, y:Number = 0, z:Number = 0, n:Boolean = false)
Creates a new
Number3D object. | Number3D | ||
Fills the 3d number object with the result from an addition of two 3d numbers.
| Number3D | ||
Duplicates a
Number3D 's properties to this Number3D . | Number3D | ||
Calculates a 3d number object representing the closest point on a given plane to a given 3d point.
| Number3D | ||
Fills the 3d number object with the result from an cross product of two 3d numbers.
| Number3D | ||
Calculates the distance from the 3d number object to the given 3d number.
| Number3D | ||
Calculates the dot product of the 3d number object with the given 3d number.
| Number3D | ||
Compares the 3d number to another and returns a boolean indicating whether
they match or not.
| Number3D | ||
Returns the angle in radians made between the 3d number obejct and the given 3d number.
| Number3D | ||
[static]
Returns a 3d number object representing a point between the two 3d number parameters w
and v.
| Number3D | ||
Fills the 3d number object with values representing a point between the current and the
3d number specified in parameter v.
| Number3D | ||
Fill the 3d number object with the euler angles represented by the 3x3 matrix rotation.
| Number3D | ||
Fill the 3d number object with the scale values represented by the 3x3 matrix.
| Number3D | ||
normalize(val:Number = 1):void
Normalises the 3d number object.
| Number3D | ||
Number3D | |||
Fills the 3d number object with the result of a 3d matrix rotation performed on a 3d number.
| Number3D | ||
Fills the 3d number object with scaled values from the given 3d number.
| Number3D | ||
Fills the 3d number object with the result from a subtraction of two 3d numbers.
| Number3D | ||
toString():String
Used to trace the values of a 3d number.
| Number3D | ||
Fills the 3d number object with the result of a 3d matrix tranformation performed on a 3d number.
| Number3D |
BACKWARD | property |
public static var BACKWARD:Number3D
A 3d number object representing a relative direction backward.
DOWN | property |
public static var DOWN:Number3D
A 3d number object representing a relative direction down.
FORWARD | property |
public static var FORWARD:Number3D
A 3d number object representing a relative direction forward.
LEFT | property |
public static var LEFT:Number3D
A 3d number object representing a relative direction left.
modulo | property |
modulo:Number
[read-only]The modulo of the 3d number object.
Implementation public function get modulo():Number
modulo2 | property |
modulo2:Number
[read-only]The squared modulo of the 3d number object.
Implementation public function get modulo2():Number
RIGHT | property |
public static var RIGHT:Number3D
A 3d number object representing a relative direction right.
UP | property |
public static var UP:Number3D
A 3d number object representing a relative direction up.
x | property |
public var x:Number
The horizontal coordinate of the 3d number object.
y | property |
public var y:Number
The vertical coordinate of the 3d number object.
z | property |
public var z:Number
The depth coordinate of the 3d number object.
Number3D | () | constructor |
public function Number3D(x:Number = 0, y:Number = 0, z:Number = 0, n:Boolean = false)
Parameters
x:Number (default = 0 ) — [optional] A default value for the horizontal coordinate of the 3d number object. Defaults to 0.
|
|
y:Number (default = 0 ) — [optional] A default value for the vertical coordinate of the 3d number object. Defaults to 0.
|
|
z:Number (default = 0 ) — [optional] A default value for the depth coordinate of the 3d number object. Defaults to 0.
|
|
n:Boolean (default = false ) — [optional] Determines of the resulting 3d number object should be normalised. Defaults to false.
|
add | () | method |
public function add(v:Number3D, w:Number3D):void
Fills the 3d number object with the result from an addition of two 3d numbers.
Parametersv:Number3D — The first 3d number in the addition.
|
|
w:Number3D — The second 3d number in the addition.
|
clone | () | method |
public function clone(v:Number3D):void
Duplicates a Number3D
's properties to this Number3D
.
v:Number3D — Number3D The Number3D whose properties will be cloned.
|
closestPointOnPlane | () | method |
public function closestPointOnPlane(p:Number3D, k:Number3D, n:Number3D):Number3D
Calculates a 3d number object representing the closest point on a given plane to a given 3d point.
Parametersp:Number3D — The 3d point used in teh calculation.
|
|
k:Number3D — The plane offset used in the calculation.
|
|
n:Number3D — The plane normal used in the calculation.
|
Number3D —
The resulting 3d point.
|
cross | () | method |
public function cross(v:Number3D, w:Number3D):void
Fills the 3d number object with the result from an cross product of two 3d numbers.
Parametersv:Number3D — The first 3d number in the cross product calculation.
|
|
w:Number3D — The second 3d number in the cross product calculation.
|
distance | () | method |
public function distance(w:Number3D):Number
Calculates the distance from the 3d number object to the given 3d number.
Parametersw:Number3D — The 3d number object whose distance is calculated.
|
Number |
dot | () | method |
public function dot(w:Number3D):Number
Calculates the dot product of the 3d number object with the given 3d number.
Parametersw:Number3D — The 3d number object to use in the calculation.
|
Number — The dot product result.
|
equals | () | method |
public function equals(v:Number3D):Boolean
Compares the 3d number to another and returns a boolean indicating whether they match or not.
Parametersv:Number3D — The 3d number to compare against.
|
Boolean — Boolean indicating match.
|
getAngle | () | method |
public function getAngle(w:Number3D = null):Number
Returns the angle in radians made between the 3d number obejct and the given 3d number.
Parametersw:Number3D (default = null ) — [optional] The 3d number object to use in the calculation.
|
Number — An angle in radians representing the angle between the two 3d number objects.
|
getInterpolated | () | method |
public static function getInterpolated(w:Number3D, v:Number3D, f:Number):Number3D
Returns a 3d number object representing a point between the two 3d number parameters w and v. The f parameter defines the degree of interpolation between the two ednpoints, where 0 or 1 will return 3d number objects equal to v and w respectively.
Parametersw:Number3D — The target point.
|
|
v:Number3D — The zero point.
|
|
f:Number — The level of interpolation where 0.0 will return a 3d number object equal to v,
and 1.0 will return a 3d number object equal to w.
|
Number3D |
See also
interpolate | () | method |
public function interpolate(w:Number3D, f:Number):void
Fills the 3d number object with values representing a point between the current and the 3d number specified in parameter v. The f parameter defines the degree of interpolation between the two endpoints, where 0 represents the unmodified current values, and 1.0 those of the v parameter.
Parametersw:Number3D — The target point.
|
|
f:Number — The level of interpolation between the current 3d number and the parameter v.
|
See also
matrix2euler | () | method |
public function matrix2euler(m:Matrix3D):void
Fill the 3d number object with the euler angles represented by the 3x3 matrix rotation.
Parametersm:Matrix3D — The 3d matrix object to use in the calculation.
|
matrix2scale | () | method |
public function matrix2scale(m:Matrix3D):void
Fill the 3d number object with the scale values represented by the 3x3 matrix.
Parametersm:Matrix3D — The 3d matrix object to use in the calculation.
|
normalize | () | method |
public function normalize(val:Number = 1):void
Normalises the 3d number object.
Parametersval:Number (default = 1 ) — [optional] A normalisation coefficient representing the length of the resulting 3d number object. Defaults to 1.
|
quaternion2euler | () | method |
rotate | () | method |
public function rotate(v:Number3D, m:Matrix3D):void
Fills the 3d number object with the result of a 3d matrix rotation performed on a 3d number.
Parametersv:Number3D — The 3d number object to use in the calculation.
|
|
m:Matrix3D — The 3d matrix object representing the rotation.
|
scale | () | method |
public function scale(v:Number3D, s:Number):void
Fills the 3d number object with scaled values from the given 3d number.
Parametersv:Number3D — The 3d number object used for the scaling calculation.
|
|
s:Number — The scaling value.
|
sub | () | method |
public function sub(v:Number3D, w:Number3D):void
Fills the 3d number object with the result from a subtraction of two 3d numbers.
Parametersv:Number3D — The starting 3d number in the subtraction.
|
|
w:Number3D — The subtracting 3d number in the subtraction.
|
toString | () | method |
public function toString():String
Used to trace the values of a 3d number.
ReturnsString — A string representation of the 3d number object.
|
transform | () | method |
public function transform(v:Number3D, m:Matrix3D):void
Fills the 3d number object with the result of a 3d matrix tranformation performed on a 3d number.
Parametersv:Number3D — The 3d number object to use in the calculation.
|
|
m:Matrix3D — The 3d matrix object representing the tranformation.
|