com.kuka.geometry
Class FrameUtils

java.lang.Object
  extended by com.kuka.geometry.FrameUtils

public final class FrameUtils
extends Object

Utility class providing static helper methods for the frame alignment.


Method Summary
static void alignAxes(Frame frame, CoordinateAxis frameAxis, Frame reference, CoordinateDirection direction)
          Changes the orientation of the given frame by aligning its specified axis with an axis direction of the reference frame.
static void alignAxisWithPlane(Frame frame, CoordinateAxis frameAxis, Frame reference, CoordinatePlane plane)
          Changes the orientation of the given frame by aligning its specified axis with a plane of the reference frame.
static void alignXAxes(Frame frame, Frame reference)
          Changes the orientation of the given frame by aligning its X axis with the X axis of the reference frame.
static void alignYAxes(Frame frame, Frame reference)
          Changes the orientation of the given frame by aligning its Y axis with the Y axis of the reference frame.
static void alignZAxes(Frame frame, Frame reference)
          Changes the orientation of the given frame by aligning its Z axis with the Z axis of the reference frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

alignXAxes

public static void alignXAxes(Frame frame,
                              Frame reference)
Changes the orientation of the given frame by aligning its X axis with the X axis of the reference frame. The origin of the frame is not changed.

Parameters:
frame - the frame that will be changed
reference - another frame whose X axis specifies the direction that the first frame's X axis should point to. This frame will not be changed.
Throws:
IllegalArgumentException - if either an argument is null, or if there is no static connection between the frames

alignYAxes

public static void alignYAxes(Frame frame,
                              Frame reference)
Changes the orientation of the given frame by aligning its Y axis with the Y axis of the reference frame. The origin of the frame is not changed.

Parameters:
frame - the frame that will be changed
reference - another frame whose Y axis specifies the direction that the first frame's Y axis should point to. This frame will not be changed.
Throws:
IllegalArgumentException - if either an argument is null, or if there is no static connection between the frames

alignZAxes

public static void alignZAxes(Frame frame,
                              Frame reference)
Changes the orientation of the given frame by aligning its Z axis with the Z axis of the reference frame. The origin of the frame is not changed.

Parameters:
frame - the frame that will be changed
reference - another frame whose Z axis specifies the direction that the first frame's Z axis should point to. This frame will not be changed.
Throws:
IllegalArgumentException - if either an argument is null, or if there is no static connection between the frames

alignAxes

public static void alignAxes(Frame frame,
                             CoordinateAxis frameAxis,
                             Frame reference,
                             CoordinateDirection direction)
Changes the orientation of the given frame by aligning its specified axis with an axis direction of the reference frame. For the alignment the smallest possible rotation angle is chosen. Therefore its not allowed that the axis is in opposite to the direction with which it should be aligned. The origin of the frame is not changed.

Parameters:
frame - the frame that will be changed
frameAxis - the axis of the frame that will be aligned with the specified direction of the reference frame
reference - another frame whose axes specify, in combination with the given the axis direction, the direction that the first frame's chosen axis should point to. This frame will not be changed.
direction - the axis direction to which to specified frame axis should point to
Throws:
IllegalArgumentException - if either an argument is null, or if there is no static connection between the frames
IllegalStateException - if the chosen axis is in opposite direction to the axis it should point to after alignment. This state has no unique mathematical solution.

alignAxisWithPlane

public static void alignAxisWithPlane(Frame frame,
                                      CoordinateAxis frameAxis,
                                      Frame reference,
                                      CoordinatePlane plane)
Changes the orientation of the given frame by aligning its specified axis with a plane of the reference frame. For the alignment the smallest possible rotation angle is chosen. Therefore its not allowed that the axis is orthogonal to the plane on which it should be aligned. The origin of the frame is not changed.

Parameters:
frame - the frame that will be changed
frameAxis - the axis of the frame that will be aligned with the specified plane of the reference frame
reference - another frame which specifies the plane with which the first frame's chosen axis should be aligned This frame will not be changed.
plane - the plane on which the first frame's axis should be aligned.
Throws:
IllegalArgumentException - if either an argument is null, or if there is no static connection between the frames
IllegalStateException - if the chosen axis is orthogonal to the plane it should be aligned with. This state has no unique mathematical solution.


Copyright © 2019. All rights reserved.