Class: Point3D

Point3D

new Point3D(xopt, yopt, zopt)

Point3D is an internally used class. A Point3D instance is attached to a DisplayObject3D object's transform3D property (which is itself an instance of the Transform3D class). It is part of internal calculations, and should only be accessed by advanced users. You should not have to deal with this class in normal usage of the engine.
Parameters:
Name Type Attributes Default Description
x Number <optional>
0 New instance's x coordinate value.
y Number <optional>
0 New instance's y coordinate value.
z Number <optional>
0 New instance's z coordinate value.
Source:

Members

x :Number

The Point3D instance's x property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

y :Number

The Point3D instance's y property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

z :Number

The Point3D instance's z property. Used for calculations.
Type:
  • Number
Default Value:
  • 0
Source:

Methods

(static) rotate(point, angle) → {Point3D}

A static verion of the non-static rotateAndUpdate method which returns a new Point3D with the modified valies.
Parameters:
Name Type Description
point Point3D Point3D values to rotate.
angle EulerAngle EulerAngle rotational values to rotate by.
Source:
Returns:
Returns a new Point3D with the end result applied.
Type
Point3D

clone() → {Point3D}

Produces a new Point3D instance that is duplicate of the current one.
Source:
Returns:
Returns a new Point3D instance.
Type
Point3D

copy(p)

A shortcut to copy the x, y, and z values of another Point3D to this one.
Parameters:
Name Type Description
p Point3D The Point3D instance to copy values from.
Source:

copyInverse(p)

A shortcut to copy the inverted (negative) x, y, and z values of another Point3D to this one.
Parameters:
Name Type Description
p Point3D The Point3D instance to copy inverted values from.
Source:

rotateAndUpdate(point, angle)

This method will rotate a supplied Point3D's coordinate values around origin 0,0,0 based on the supplied EulerAngle object's rotation. It will then set this Point3D's coordinate values to the result.
Parameters:
Name Type Description
point Point3D Point3D values to rotate.
angle EulerAngle EulerAngle rotational values to rotate by.
Source:

toString() → {String}

Returns a String representation of the Point3D instance's values.
Source:
Returns:
Returns a string with an object notation form of the x, y, and z properties.
Type
String

updateData(x, y, z)

A shortcut method for setting the x, y, and z properties.
Parameters:
Name Type Description
x Number New x value.
y Number New y value.
z Number New z value.
Source: