Packageorg.papervision3d.core.math
Classpublic class Number3D

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.



Public Properties
 PropertyDefined by
  modulo : Number
[read-only] Modulo
Number3D
  x : Number
The horizontal coordinate value.
Number3D
  y : Number
The vertical coordinate value.
Number3D
  z : Number
The depth coordinate value.
Number3D
  ZERO : Number3D
[static][read-only] Returns a Number3D object with x, y and z properties set to zero.
Number3D
Public Methods
 MethodDefined by
  
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.
Number3D
  
[static] Add
Number3D
  
Returns a new Number3D object that is a clone of the original instance with the same three-dimensional values.
Number3D
  
copyTo(n:Number3D):void
Copies the values of this number3d to the passed number3d.
Number3D
  
[static] Cross product.
Number3D
  
dot(v:Number3D, w:Number3D):Number
[static] Dot product.
Number3D
  
normalize():void
Normalize.
Number3D
  
[static] Substract.
Number3D
  
toString():String
Returns a string value representing the three-dimensional values in the specified Number3D object.
Number3D
Property detail
moduloproperty
modulo:Number  [read-only]

Modulo

Implementation
    public function get modulo():Number
xproperty 
public var x:Number

The horizontal coordinate value.

yproperty 
public var y:Number

The vertical coordinate value.

zproperty 
public var z:Number

The depth coordinate value.

ZEROproperty 
ZERO:Number3D  [read-only]

Returns a Number3D object with x, y and z properties set to zero.

Implementation
    public static function get ZERO():Number3D
Constructor detail
Number3D()constructor
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:Number (default = 0) — The horizontal coordinate value. The default value is zero.
 
y:Number (default = 0) — The vertical coordinate value. The default value is zero.
 
z:Number (default = 0) — The depth coordinate value. The default value is zero.
Method detail
add()method
public static function add(v:Number3D, w:Number3D):Number3D

Add

Parameters
v:Number3D
 
w:Number3D

Returns
Number3D
clone()method 
public function clone():Number3D

Returns a new Number3D object that is a clone of the original instance with the same three-dimensional values.

Returns
Number3D — A new Number3D instance with the same three-dimensional values as the original Number3D instance.
copyTo()method 
public function copyTo(n:Number3D):void

Copies the values of this number3d to the passed number3d.

Parameters
n:Number3D
cross()method 
public static function cross(v:Number3D, w:Number3D):Number3D

Cross product.

Parameters
v:Number3D
 
w:Number3D

Returns
Number3D
dot()method 
public static function dot(v:Number3D, w:Number3D):Number

Dot product.

Parameters
v:Number3D
 
w:Number3D

Returns
Number
normalize()method 
public function normalize():void

Normalize.

sub()method 
public static function sub(v:Number3D, w:Number3D):Number3D

Substract.

Parameters
v:Number3D
 
w:Number3D

Returns
Number3D
toString()method 
public function toString():String

Returns a string value representing the three-dimensional values in the specified Number3D object.

Returns
String — A string.