Function or value | Description |
|
|
|
|
|
![]() ![]() ![]() ![]() ![]() ![]() Create a 'fresh copy' of a frame: one with the same origin point and X/Y directions, but that can be used to define a different local coordinate system. Sometimes useful in generic/library code. Despite the name, this is efficient: it really just returns the value you passed in, but with a different type.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Construct a `Frame2d` given its X axis `Frame2d.fromXAxis axis` is equivalent to `Frame2d.withXDirection (Axis2d.direction axis) (Axis2d.originPoint axis)`
|
|
![]() ![]() ![]() ![]() ![]() ![]() Construct a `Frame2d` given its Y axis; `Frame2d.fromYAxis axis` is equivalent to `Frame2d.withYDirection (Axis2d.direction axis) (Axis2d.originPoint axis)`
|
Full Usage:
isRightHanded frame
Parameters:
Frame2D<'Units, 'Coordinates, 'Defines>
Returns: bool
|
![]() ![]() ![]() ![]() ![]() ![]() Check if a frame is [right-handed](https://en.wikipedia.org/wiki/Cartesian_coordinate_system#Orientation_and_handedness). All predefined frames are right-handed, and most operations on frames preserve handedness, so about the only ways to end up with a left-handed frame are by constructing one explicitly with `unsafe` or by mirroring a right-handed frame.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Mirror a frame across an axis. Note that this will switch the [handedness](https://en.wikipedia.org/wiki/Cartesian_coordinate_system#Orientation_and_handedness) of the frame.
|
|
|
|
|
|
![]() ![]() ![]() ![]() ![]() ![]() Take one frame defined in global coordinates and a second frame defined in local coordinates relative to the first frame, and return the second frame expressed in global coordinates.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Take two frames defined in global coordinates, and return the second one expressed in local coordinates relative to the first.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Reverse the X direction of a frame, leaving its Y direction and origin point the same. Note that this will switch the [handedness](https://en.wikipedia.org/wiki/Cartesian_coordinate_system#Orientation_and_handedness) of the frame.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Reverse the Y direction of a frame, leaving its X direction and origin point the same. Note that this will switch the [handedness](https://en.wikipedia.org/wiki/Cartesian_coordinate_system#Orientation_and_handedness) of the frame.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Rotate a frame counterclockwise around a given point by a given angle. The frame's origin point will be rotated around the given point by the given angle, and its X and Y basis directions will be rotated by the given angle.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Rotate a frame counterclockwise by a given angle around the frame's own origin point. The resulting frame will have the same origin point, and its X and Y directions will be rotated by the given angle.
|
|
![]() ![]() ![]() ![]() ![]() ![]() Translate a frame along one of its own axes by a given distance. The first argument is a function that returns the axis to translate along, given the current frame. The majority of the time this argument will be either `Frame2d.xAxis` or `Frame2d.yAxis`. The second argument is the distance to translate along the given axis.
|
|
|
Full Usage:
translateIn direction distance frame
Parameters:
Direction2D<'Coordinates>
distance : Quantity<'Units>
frame : Frame2D<'Units, 'Coordinates, 'Defines>
Returns: Frame2D<'Units, 'Coordinates, 'Defines>
|
|
|
|
Full Usage:
withXDirection xDirection origin
Parameters:
Direction2D<'a>
origin : Point2D<'b, 'a>
Returns: Frame2D<'b, 'a, 'c>
|
![]() ![]() ![]() ![]() ![]() ![]() Construct a frame with the given Y axis direction, having the given origin point. The X axis direction will be constructed by rotating the given direction 90 degrees clockwise.
|
Full Usage:
withYDirection givenDirection givenOrigin
Parameters:
Direction2D<'Coordinates>
givenOrigin : Point2D<'Units, 'Coordinates>
Returns: Frame2D<'Units, 'Coordinates, 'Defines>
|
![]() ![]() ![]() ![]() ![]() ![]() Construct a frame with the given Y axis direction, having the given origin point. The X axis direction will be constructed by rotating the given Y direction 90 degrees clockwise.
|
|
|
Full Usage:
xDirection frame
Parameters:
Frame2D<'Units, 'Coordinates, 'Defines>
Returns: Direction2D<'Coordinates>
|
|
|
|
Full Usage:
yDirection frame
Parameters:
Frame2D<'Units, 'Coordinates, 'Defines>
Returns: Direction2D<'Coordinates>
|
|