Defines a right-handed or left-handed axis in 3D.
An axis is defined by a location point and three perpendicular directions. axis defines the Z direction of the axis.
new Axis3d(
location?,axis?,xReferenceDirection?):Axis3d
Creates an axis.
By default, creates an axis with location `Point.origin()` (0, 0, 0), xDirection `Direction.xDir()` (1, 0, 0), yDirection `Direction.yDir()` (0, 1, 0), and axis `Direction.zDir()` (0, 0, 1).
The provided location point and directions are copied.
Point = ...
Location point of the axis.
Direction = ...
Z direction of the axis.
Reference direction used to compute xDirection and yDirection. If omitted, a perpendicular X direction is computed automatically.
Axis3d
readonlylocation:Point
Location point of the axis.
get axis():
Direction
Z direction of the axis.
get xDirection():
Direction
X direction of the axis.
get yDirection():
Direction
Y direction of the axis.
clone():
Axis3d
Creates a new axis with the same location, xDirection, yDirection, and axis as this axis.
Axis3d
copy(
other):this
Copies the location, xDirection, yDirection, and axis of other to this axis.
The values of the point and directions are copied without replacing the existing point and direction objects of this axis.
Axis3d
Axis to copy.
this
isRightHanded():
boolean
Returns true if the axis is right-handed, false otherwise.
boolean
mirror(
point):this
Mirrors the axis about a point.
Other point.
this
mirror(
axis):this
Mirrors the axis about an axis.
Axis.
this
mirror(
axis):this
Mirrors the axis about another axis placement.
Axis3d
Axis.
this
mirrored(
point):Axis3d
Creates a mirrored copy of the axis.
Point.
Axis3d
mirrored(
axis):Axis3d
Creates a mirrored copy of the axis.
Axis.
Axis3d
mirrored(
axis):Axis3d
Creates a mirrored copy of the axis.
Axis3d
Axis.
Axis3d
reverse():
this
Reverses the directions of the axis.
this
reversed():
Axis3d
Creates a copy of the axis with reversed directions.
Axis3d
rotate(
axis,angle):this
Rotates the axis around another axis.
Rotation axis.
number
Rotation angle.
this
rotated(
axis,angle):Axis3d
Creates a rotated copy of the axis.
Rotation axis.
number
Rotation angle.
Axis3d
scale(
point,scale):this
Scales the location point of the axis.
If scale is negative, the axis directions are reversed.
Other point.
number
Scale value.
this
scaled(
point,scale):Axis3d
Creates a copy of the axis and scales its location point.
If scale is negative, the axis directions of the returned object are reversed.
Other point.
number
Scale value.
Axis3d
transform(
transformation):this
Transforms the axis.
Transformation.
this
transformed(
transformation):Axis3d
Creates a transformed copy of the axis.
Transformation.
Axis3d
translate(
vector):this
Translates the axis.
Translation vector.
this
translated(
vector):Axis3d
Creates a translated copy of the axis.
Translation vector.
Axis3d