Shapemetry API / Axes
Class: Axes
Defined in: core/Axes.ts:7
An orthonormal coordinate frame (origin + x/y/z unit axes) for local↔world transforms.
Constructors
Constructor
new Axes(
origin,xAxis,yAxis,zAxis):Axes
Defined in: core/Axes.ts:8
Parameters
origin
xAxis
yAxis
zAxis
Returns
Axes
Properties
origin
readonlyorigin:Point
Defined in: core/Axes.ts:9
xAxis
readonlyxAxis:Vector
Defined in: core/Axes.ts:10
yAxis
readonlyyAxis:Vector
Defined in: core/Axes.ts:11
zAxis
readonlyzAxis:Vector
Defined in: core/Axes.ts:12
Methods
toJSON()
toJSON():
AxesJSON
Defined in: core/Axes.ts:15
Returns
fromJSON()
staticfromJSON(d):Axes
Defined in: core/Axes.ts:16
Parameters
d
Returns
Axes
fromTransformation()
staticfromTransformation(tr):Axes
Defined in: core/Axes.ts:18
Parameters
tr
Returns
Axes
fromNormal()
staticfromNormal(normal,origin?):Axes
Defined in: core/Axes.ts:29
Build a right-hand frame from a normal (zAxis = normal). Origin defaults to Point(0,0,0).
Parameters
normal
origin?
Point = ...
Returns
Axes
fromNormalAndRef()
staticfromNormalAndRef(normal,refDir,origin?):Axes
Defined in: core/Axes.ts:47
Build a right-hand frame from a normal and a reference direction (xAxis projected from refDir).
Parameters
normal
refDir
origin?
Point = ...
Returns
Axes
fromTangent()
staticfromTangent(origin,tangent):Axes
Defined in: core/Axes.ts:66
Build a right-hand frame from a tangent (xAxis = tangent). Picks an arbitrary stable normal.
Parameters
origin
tangent
Returns
Axes
rotate()
rotate(
axis,angle):Axes
Defined in: core/Axes.ts:79
Rotate all 3 axes around a unit axis. Origin unchanged.
Parameters
axis
angle
number
Returns
Axes
withOrigin()
withOrigin(
origin):Axes
Defined in: core/Axes.ts:84
Return a copy with the origin replaced.
Parameters
origin
Returns
Axes
toTransformation()
toTransformation():
Transformation
Defined in: core/Axes.ts:88