A Transform
represents a geometric transform.
It is composed of:
Vector3
,Quaternion
.See also API doc: Transform, Vector3 and Quaternion.
A TransformTime
is a structure grouping a Transform
and a
timestamp.
Typically, a TransformTime
represents a geometric transform between
2 Frames that is correct at a given time. The time component is
equal to this specific time.
See also API doc: TransformTime and Timestamps.
Create an AttachedFrame
from a base Frame
and a Transform
:
val baseFrame: Frame = ...
val transform: Transform = TransformBuilder.create().fromXTranslation(1.0)
val attachedFrame: AttachedFrame = baseFrame.makeAttachedFrame(transform)
Frame baseFrame = ...;
Transform transform = TransformBuilder.create().fromXTranslation(1);
AttachedFrame attachedFrame = baseFrame.makeAttachedFrame(transform);
Update the Transform
between an AttachedFrame
and its parent Frame
:
val attachedFrame: AttachedFrame = ...
val transform: Transform = TransformBuilder.create().fromXTranslation(2.0)
attachedFrame.update(transform)
AttachedFrame attachedFrame = ...;
Transform transform = TransformBuilder.create().fromXTranslation(2);
attachedFrame.update(transform);
Update the Transform
between a FreeFrame
and a base Frame
, based
on sensor data acquired at a given timestamp:
val freeFrame: FreeFrame = ...
val baseFrame: Frame = ...
val transform: Transform = ...
freeFrame.update(baseFrame, transform, timestamp)
FreeFrame freeFrame = ...;
Frame baseFrame = ...;
Transform transform = ...;
freeFrame.update(baseFrame, transform, timestamp);
See also API doc: FreeFrame and Timestamps.
Retrieve a TransformTime
between 2 Frames:
val baseFrame: Frame = ...
val transformedFrame: Frame = ...
val transformTime: TransformTime = transformedFrame.computeTransform(baseFrame)
Frame baseFrame = ...;
Frame transformedFrame = ...;
TransformTime transformTime = transformedFrame.computeTransform(baseFrame);