|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.geometry.Frame
com.kuka.geometry.LocalFrame
public class LocalFrame
This is a lightweight class that is meant for frame calculations and intermediate results. A LocalFrame that
is no longer referenced will be collected by the JVM garbage collector. A LocalFrame instance can be
modified.
This class is not thread safe. If a frame will be used by concurrent threads, external synchronization must be used.
LocalFrame(Frame, ITransformation)| Constructor Summary | |
|---|---|
LocalFrame()
Creates a new frame instance that has no parent, i.e. a new root frame. |
|
LocalFrame(Frame parent,
IFrameConnection connection)
Creates a new frame instance with a specialized connection to a parent frame. |
|
LocalFrame(Frame parent,
ITransformation trafoFromParent)
Creates a new frame instance that will use the given frame as parent, with a static connection to that frame. |
|
LocalFrame(String name)
Creates a new frame instance that has no parent, i.e. a new root frame. |
|
LocalFrame(String name,
Frame parent,
ITransformation trafoFromParent)
Creates a new frame instance that will use the given frame as parent, with a static connection to that frame. |
|
| Method Summary | |
|---|---|
void |
connectToParent(Frame parent,
IFrameConnection connection)
Connects this frame to the given parent frame with the given connection. |
void |
connectToParent(Frame parent,
ITransformation trafoFromParent)
Changes this frame's parent and the connection to the parent. |
static LocalFrame |
copyOf(Frame orig,
Frame newParent)
Creates a new frame instance from an original frame, which must have a direct or indirect connection to the given newParent frame. |
void |
disconnectFromParent()
Disconnects this frame from its parent frame and connection. |
void |
setName(String name)
Sets the name of this frame. |
void |
setTransformationFromParent(ITransformation transformation)
Changes this frame's spatial relation to the parent. |
| Methods inherited from class com.kuka.geometry.Frame |
|---|
calculateTransformationTo, distanceTo, getConnectionFromParent, getName, getParent, getRedundancyDataMap, getRedundancyInformation, getTransformationFromParent, hasAncestor, hasPathTo, hasStaticPathTo, isNearTo, representationOf, representationOf, rotate, rotate, rotateTo, rotationalDistanceTo, setConnectionFromParent, setRedundancyInformation, toString, transform, transform, transformTo, translate, translate, translateTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocalFrame()
public LocalFrame(String name)
name - the frame's initial name
public LocalFrame(Frame parent,
ITransformation trafoFromParent)
For example: To create a new frame under otherFrame, that is shifted 100 mm along the Y axis and
turned by 45° around the Z (resp. A) axis (all seen in the coordinate system of otherFrame), you might
use this construct:
Frame myFrame = new Frame(otherFrame, Transformation.ofDeg(0, 100, 0, 45, 0, 0));
parent - a frametrafoFromParent - a spatial transformation, seen from the parent frame
IllegalArgumentException - if exactly one of parent or parentConnection parameter is nullTransformation
public LocalFrame(String name,
Frame parent,
ITransformation trafoFromParent)
For example: To create a new frame under otherFrame, that is shifted 100 mm along the Y axis and
turned by 45° around the Z (resp. A) axis (all seen in the coordinate system of otherFrame), you might
use this construct:
Frame myFrame = new Frame(otherFrame, Transformation.ofDeg(0, 100, 0, 45, 0, 0));
name - the frame's initial nameparent - a frametrafoFromParent - a spatial transformation, seen from the parent frame
IllegalArgumentException - if exactly one of parent or parentConnection parameter is nullTransformation
public LocalFrame(Frame parent,
IFrameConnection connection)
parent - a frameconnection - a frame connection
IllegalArgumentException - if any argument is null| Method Detail |
|---|
public static LocalFrame copyOf(Frame orig,
Frame newParent)
newParent frame.
The new frame will be in the same location and have the same orientation as the original frame.
The new frame's parent frame will be the given newParent frame, and the new frame will be statically
connected to the parent frame.
This method uses Frame.calculateTransformationTo(Frame) to query the original frame's position.
orig - the original framenewParent - the parent frame for the newly created frame
newParent
IllegalArgumentException - if there is no static connection between orig and newParent,
or if any argument is null
IllegalArgumentException - if there is no connection or an unknown connection type between the original frame and the new parent
frame, or if any argument is null
IllegalStateException - if the relation between the involved frames could not be determined
ThreadInterruptedException - if the thread was interrupted during execution. The thread interrupt flag will
be set if the thread was interrupted (that is, Thread.isInterrupted() will return
true)public void setName(String name)
Frame
setName in class Framename - any string, including null or "".
public void connectToParent(Frame parent,
IFrameConnection connection)
Frameparent frame with the given connection.
Useful for advanced use cases - This frame's position in space may be changed. The positions of frames connected to this frame will also be affected by this method.
parent - the new parent frame. May be null if the connection is null also.connection - the type of connection to the new parent frame. May be null if the parent is
null also.
IllegalArgumentException - if this frame is given as parent, or if one but not all of the arguments is null
public void connectToParent(Frame parent,
ITransformation trafoFromParent)
parent - a frametrafoFromParent - a spatial transformation, seen from the parent frame
IllegalArgumentException - if any argument is nullTransformationpublic void setTransformationFromParent(ITransformation transformation)
Frame
transformation - a spatial transformation, seen from the parent frame
IllegalArgumentException - if trafoFromParent is null
IllegalStateException - if this frame's parent connection type is anything other than StaticConnectionTransformationpublic void disconnectFromParent()
Frame
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||