Namespace GEarthExtensions#math3d
Defined in: extensions.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Contains methods for 3D math, including linear algebra/geo bindings.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
GEarthExtensions#math3d.htrToLocalFrame(htr)
Converts heading, tilt, and roll (HTR) to a local orientation matrix
that transforms global direction vectors to local direction vectors.
|
<static> |
GEarthExtensions#math3d.localFrameToHtr(matrix)
Converts a local orientation matrix (right, dir, up vectors) in local
cartesian coordinates to heading, tilt, and roll.
|
<static> |
GEarthExtensions#math3d.makeLocalToGlobalFrame(point)
Creates a local orientation matrix that can transform direction vectors
local to a given point to global direction vectors.
|
<static> |
GEarthExtensions#math3d.makeOrthonormalFrame(dir, up)
Creates an orthonormal orientation matrix for a given set of object direction
and up vectors.
|
Namespace Detail
GEarthExtensions#math3d
Contains methods for 3D math, including linear algebra/geo bindings.
Method Detail
<static>
{geo.linalg.Matrix}
GEarthExtensions#math3d.htrToLocalFrame(htr)
Converts heading, tilt, and roll (HTR) to a local orientation matrix
that transforms global direction vectors to local direction vectors.
- Parameters:
- {Number[]} htr
- A heading, tilt, roll array, where each angle is in degrees.
- Returns:
- {geo.linalg.Matrix} A local orientation matrix.
<static>
{Number[]}
GEarthExtensions#math3d.localFrameToHtr(matrix)
Converts a local orientation matrix (right, dir, up vectors) in local
cartesian coordinates to heading, tilt, and roll.
- Parameters:
- {geo.linalg.Matrix} matrix
- A local orientation matrix.
- Returns:
- {Number[]} A heading, tilt, roll array, where each angle is in degrees.
<static>
{geo.linalg.Matrix}
GEarthExtensions#math3d.makeLocalToGlobalFrame(point)
Creates a local orientation matrix that can transform direction vectors
local to a given point to global direction vectors. The transpose of the
returned matrix performs the inverse transformation.
- Parameters:
- {geo.Point} point
- The world point at which local coordinates are to be transformed.
- Returns:
- {geo.linalg.Matrix} An orientation matrix that can transform local coordinate vectors to global coordinate vectors.
<static>
{geo.linalg.Matrix}
GEarthExtensions#math3d.makeOrthonormalFrame(dir, up)
Creates an orthonormal orientation matrix for a given set of object direction
and up vectors. The matrix rows will each be unit length and orthogonal to
each other. If the dir and up vectors are collinear, this function will fail
and return null.
- Parameters:
- {geo.linalg.Vector} dir
- The object direction vector.
- {geo.linalg.Vector} up
- The object up vector.
- Returns:
- {geo.linalg.Matrix} Returns the orthonormal orientation matrix, or null if none is possible.