Number3D
| Kind of class: | public class |
|---|---|
| Package: | org.papervision3d.core.math |
| Inherits from: | none |
| Classpath: | org.papervision3d.core.math.Number3D |
| File last modified: | Sunday, 02 March 2008, 15:23:41 |
The Number3D class represents a value in a three-dimensional coordinate system.
Properties x, y and z represent the horizontal, vertical and z the depth axes respectively.
Properties x, y and z represent the horizontal, vertical and z the depth axes respectively.
Summary
Constructor
- Number3D (x:Number = 0, y:Number = 0, z:Number = 0)
- Creates a new Number3D object whose three-dimensional values are specified by the x, y and z parameters.
Instance properties
- x : Number
- The horizontal coordinate value.
- y : Number
- The vertical coordinate value.
- z : Number
- The depth coordinate value.
- modulo : Number
- Modulo
- moduloSquared : Number
Class methods
Instance methods
- clone : Number3D
- Returns a new Number3D object that is a clone of the original instance with the same three-dimensional values.
- copyTo (n:Number3D) : void
- Copies the values of this Number3d to the passed Number3d.
- set (newx:Number, newy:Number, newz:Number) : void
- Quick way to set the properties of the Number3D
- normalize : void
- Normalize.
- multiplyEq (n:Number) : void
- Multiplies the vector by a number.
- plusEq (v:Number3D) : void
- Adds the vector passed to this vector.
- isModuloLessThan (v:Number) : Boolean
- Super fast modulo(length, magnitude) comparisons.
- isModuloGreaterThan (v:Number) : Boolean
- isModuloEqualTo (v:Number) : Boolean
- toString : String
- Returns a string value representing the three-dimensional values in the specified Number3D object.
Constructor
Number3D
public function Number3D (
x:Number = 0,
y:Number = 0,
z:Number = 0)
Creates a new Number3D object whose three-dimensional values are specified by the x, y and z parameters. If you call this constructor function without parameters, a Number3D with x, y and z properties set to zero is created.
Parameters:
x:
The horizontal coordinate value. The default value is zero.
y:
The vertical coordinate value. The default value is zero.
z:
The depth coordinate value. The default value is zero.
Class properties
ZERO
Returns a Number3D object with x, y and z properties set to zero.
Returns:
- A Number3D object.
Instance properties
modulo
public modulo:Number
(read)
Modulo
moduloSquared
public moduloSquared:Number
(read)
x
public x:Number
(read,write)
The horizontal coordinate value.
y
public y:Number
(read,write)
The vertical coordinate value.
z
public z:Number
(read,write)
The depth coordinate value.
Class methods
Instance methods
clone
Returns a new Number3D object that is a clone of the original instance with the same three-dimensional values.
Returns:
- A new Number3D instance with the same three-dimensional values as the original Number3D instance.
copyTo
Copies the values of this Number3d to the passed Number3d.
isModuloEqualTo
public function isModuloEqualTo (
v:Number) : Boolean
isModuloGreaterThan
public function isModuloGreaterThan (
v:Number) : Boolean
isModuloLessThan
public function isModuloLessThan (
v:Number) : Boolean
Super fast modulo(length, magnitude) comparisons.
multiplyEq
public function multiplyEq (
n:Number) : void
Multiplies the vector by a number. The same as the *= operator
normalize
public function normalize (
) : void
Normalize.
plusEq
Adds the vector passed to this vector. The same as the += operator.
set
public function set (
newx:Number,
newy:Number,
newz:Number) : void
Quick way to set the properties of the Number3D
toString
public function toString (
) : String
Returns a string value representing the three-dimensional values in the specified Number3D object.
Returns:
- A string.