us.ihmc.euclid.referenceFrame.ReferenceFrame.transformFromThisToDesiredFrame()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(12.0k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中us.ihmc.euclid.referenceFrame.ReferenceFrame.transformFromThisToDesiredFrame方法的一些代码示例,展示了ReferenceFrame.transformFromThisToDesiredFrame的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReferenceFrame.transformFromThisToDesiredFrame方法的具体详情如下:
包路径:us.ihmc.euclid.referenceFrame.ReferenceFrame
类名称:ReferenceFrame
方法名:transformFromThisToDesiredFrame

ReferenceFrame.transformFromThisToDesiredFrame介绍

[英]Transforms the given objectToTransform by the transform from this reference frame to the given desiredFrame.

This method can be used to change the reference frame in which objectToTransform is expressed from this to desiredFrame.

The given implementation of the given Transformable should check for RigidBodyTransform#hasRotation() and RigidBodyTransform#hasTranslation() to perform the transformation efficiently.
[中]将给定对象从该参考帧转换为给定的所需帧。
此方法可用于将表示objectToTransform的参考框架从该框架更改为所需框架。
给定Transformable的给定实现应该检查RigIDodyTransform#hasRotation()和RigIDodyTransform#hasTranslation()以高效地执行转换。

代码示例

代码示例来源:origin: us.ihmc/euclid-frame

/**
* This is the main feature of a {@code FrameGeometryObject}:
* <p>
* Transforms this geometry object such that the transformation represents the same geometry but
* from the perspective of another reference frame: {@code desiredFrame}. Once the geometry object
* is transformed, the reference frame is updated to {@code desiredFrame}. In the case,
* {@code this.referenceFrame == desiredFrame}, this method does nothing.
* </p>
*
* @param desiredFrame the reference frame in which the geometry object is to be expressed.
*/
public void changeFrame(ReferenceFrame desiredFrame)
{
 referenceFrame.transformFromThisToDesiredFrame(desiredFrame, this);
 referenceFrame = desiredFrame;
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this orientation 2D to represent the orientation 2D from {@code this.getReferenceFrame()} to
* the given {@code referenceFrame}.
*
* @param referenceFrame the reference frame of interest.
*/
default void setFromReferenceFrame(ReferenceFrame referenceFrame)
{
 setToZero();
 referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this orientation to represent the orientation from {@code this.getReferenceFrame()} to the
* given {@code referenceFrame}.
*
* @param referenceFrame the reference frame of interest.
*/
default void setFromReferenceFrame(ReferenceFrame referenceFrame)
{
 setToZero();
 referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
  * Sets this point coordinate to the given {@code referenceFrame}'s origin coordinate in this frame
  * tuple current frame.
  *
  * @param referenceFrame the reference frame of interest.
  */
  default void setFromReferenceFrame(ReferenceFrame referenceFrame)
  {
   setToZero();
   referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
  }
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this pose 2D to represent the pose of the given {@code referenceFrame} expressed in
* {@code this.getReferenceFrame()}.
*
* @param referenceFrame the reference frame of interest.
*/
default void setFromReferenceFrame(ReferenceFrame referenceFrame)
{
 setToZero();
 referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
  * Sets this point coordinate to the given {@code referenceFrame}'s origin coordinate in this frame
  * tuple current frame.
  *
  * @param referenceFrame the reference frame of interest.
  */
  default void setFromReferenceFrame(ReferenceFrame referenceFrame)
  {
   setToZero();
   referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
  }
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this pose 3D to represent the pose of the given {@code referenceFrame} expressed in
* {@code this.getReferenceFrame()}.
*
* @param referenceFrame the reference frame of interest.
*/
default void setFromReferenceFrame(ReferenceFrame referenceFrame)
{
 setToZero();
 referenceFrame.transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
  * Transforms this geometry such that the transformation represents the same geometry but from the
  * perspective of another reference frame: {@code desiredFrame}.
  * <p>
  * Once the geometry is transformed, the reference frame is updated to {@code desiredFrame}. In the
  * case, {@code this.referenceFrame == desiredFrame}, this method does nothing.
  * </p>
  *
  * @param desiredFrame the reference frame in which this geometry is to be expressed.
  */
  default void changeFrame(ReferenceFrame desiredFrame)
  {
   getReferenceFrame().transformFromThisToDesiredFrame(desiredFrame, this);
   setReferenceFrame(desiredFrame);
  }
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this matrix to {@code other}.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameMatrix3DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set
* to {@code other} once transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
* 
* @param other the other frame matrix to set this to. Not modified.
*/
default void setMatchingFrame(FrameMatrix3DReadOnly other)
{
 Matrix3DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this line segment to be same as the given line segment expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameLineSegment2DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame line segment to set this to. Not modified.
*/
default void setMatchingFrame(FrameLineSegment2DReadOnly other)
{
 LineSegment2DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this pose 2D to be the same as the given one expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FramePose2DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame pose 2D to set this to. Not modified.
*/
default void setMatchingFrame(FramePose2DReadOnly other)
{
 Pose2DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this orientation to be the same as the given one expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameOrientation2DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other orientation 2D to set this to. Not modified.
*/
default void setMatchingFrame(FrameOrientation2DReadOnly other)
{
 Orientation2DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this pose 3D to be the same as the given one expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FramePose3DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame pose 3D to set this to. Not modified.
*/
default void setMatchingFrame(FramePose3DReadOnly other)
{
 Pose3DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this frame tuple to {@code other}.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameTuple2DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame tuple to set this to. Not modified.
*/
default void setMatchingFrame(FrameTuple2DReadOnly other)
{
 Tuple2DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this line segment to be the same as the given line segment expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameLineSegment3DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame line segment to set this to. Not modified.
*/
default void setMatchingFrame(FrameLineSegment3DReadOnly other)
{
 LineSegment3DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this frame quaternion to {@code other}.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameQuaternionReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other quaternion to copy the values from. Not modified.
*/
default void setMatchingFrame(FrameQuaternionReadOnly other)
{
 QuaternionBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this line to be the same as the given line expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameLine3DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame line to set this to. Not modified.
*/
default void setMatchingFrame(FrameLine3DReadOnly other)
{
 Line3DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this frame tuple to {@code other}.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameTuple4DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other tuple to copy the values from. Not modified.
*/
default void setMatchingFrame(FrameTuple4DReadOnly other)
{
 Tuple4DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this frame tuple to {@code other}.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameTuple3DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set to
* {@code other} once transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame tuple to set this to. Not modified.
*/
default void setMatchingFrame(FrameTuple3DReadOnly other)
{
 Tuple3DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

代码示例来源:origin: us.ihmc/euclid-frame

/**
* Sets this line to be the same as the given line expressed in the reference frame of this.
* <p>
* If {@code other} is expressed in the frame as {@code this}, then this method is equivalent to
* {@link #set(FrameLine2DReadOnly)}.
* </p>
* <p>
* If {@code other} is expressed in a different frame than {@code this}, then {@code this} is set
* to {@code other} and then transformed to be expressed in {@code this.getReferenceFrame()}.
* </p>
*
* @param other the other frame line to set this to. Not modified.
*/
default void setMatchingFrame(FrameLine2DReadOnly other)
{
 Line2DBasics.super.set(other);
 other.getReferenceFrame().transformFromThisToDesiredFrame(getReferenceFrame(), this);
}

相关文章