Namespace R.math.Math3D
A static class with methods and fields that are helpful
when dealing with two dimensional mathematics.
Defined in: math3d.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The dimetric 1:2 side projection
|
|
The dimetric 1:2 top projection
|
|
The 30° isometic projection (NEN/ISO)
|
Method Attributes | Method Name and Description |
---|---|
project(point2d, height, projectionType)
Project a 2d point to 3d, using one of three projection types: R.math.Math3D#ISOMETRIC_PROJECTION
(default), R.math.Math3D#DIMETRIC_SIDE_PROJECTION, or
R.math.Math3D#DIMETRIC_TOP_PROJECTION.
|
|
unproject(point3d, projectionType)
Project a 3d point to a 2d point, using one of three projection
types: R.math.Math3D#ISOMETRIC_PROJECTION (default), R.math.Math3D#DIMETRIC_SIDE_PROJECTION, or
R.math.Math3D#DIMETRIC_TOP_PROJECTION.
|
Field Detail
DIMETRIC_SIDE_PROJECTION
The dimetric 1:2 side projection
DIMETRIC_TOP_PROJECTION
The dimetric 1:2 top projection
ISOMETRIC_PROJECTION
The 30° isometic projection (NEN/ISO)
Method Detail
{R.math.Point3D}
project(point2d, height, projectionType)
Project a 2d point to 3d, using one of three projection types: R.math.Math3D#ISOMETRIC_PROJECTION
(default), R.math.Math3D#DIMETRIC_SIDE_PROJECTION, or
R.math.Math3D#DIMETRIC_TOP_PROJECTION.
Reference: http://www.compuphase.com/axometr.htm
- Parameters:
- point2d
- {R.math.Point2D} The point to project into 3 dimensions
- height
- {Number} The height of the ground. We must use a particular height to extrapolate our 3D coordinates from. If the ground is considered level, this can remain zero.
- projectionType
- {Number} One of the three projection types in R.math.Math2D
- Returns:
- {R.math.Point3D} This point, projected into 3 dimensions
{R.math.Point2D}
unproject(point3d, projectionType)
Project a 3d point to a 2d point, using one of three projection
types: R.math.Math3D#ISOMETRIC_PROJECTION (default), R.math.Math3D#DIMETRIC_SIDE_PROJECTION, or
R.math.Math3D#DIMETRIC_TOP_PROJECTION.
Reference: http://www.compuphase.com/axometr.htm
- Parameters:
- point3d
- {R.math.Point3D} The point to project into 2 dimensions
- projectionType
- {Number} One of the three projection types in R.math.Math2D
- Returns:
- {R.math.Point2D} This point, projected into 2 dimensions