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

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

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

ReferenceFrame.isWorldFrame介绍

[英]Tests if this reference frame is #getWorldFrame().
[中]测试此参考框架是否为#getWorldFrame()。

代码示例

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

/**
* Checks if this frame is equal to {@link #getWorldFrame()}.
*
* @throws RuntimeException if this is not {@link #getWorldFrame()}.
*/
public void checkIsWorldFrame() throws RuntimeException
{
 checkIfRemoved();
 if (!isWorldFrame())
 {
   throw new RuntimeException("Frame " + this + " is not world frame.");
 }
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicLineSegment(String name, YoFramePoint3D startPoint, YoFramePoint3D endPoint, double scale, AppearanceDefinition appearance,
              boolean drawArrowhead)
{
 this(name, startPoint.getYoX(), startPoint.getYoY(), startPoint.getYoZ(), endPoint.getYoX(), endPoint.getYoY(), endPoint.getYoZ(), scale, appearance,
    drawArrowhead);
 if (!startPoint.getReferenceFrame().isWorldFrame() || !endPoint.getReferenceFrame().isWorldFrame())
 {
   System.err.println("Warning: Should be in a World Frame to create a YoGraphicLineSegment. startPoint = " + startPoint + ", endPoint = " + endPoint);
 }
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicCylinder(String name, YoFramePoint3D startPoint, YoFrameVector3D frameVector, AppearanceDefinition appearance, double lineThickness)
{
 this(name, startPoint.getYoX(), startPoint.getYoY(), startPoint.getYoZ(), frameVector.getYoX(), frameVector.getYoY(), frameVector.getYoZ(), appearance,
    lineThickness);
 if (!startPoint.getReferenceFrame().isWorldFrame() || !frameVector.getReferenceFrame().isWorldFrame())
 {
   System.err.println("Warning: Should be in a World Frame to create a YoGraphicCylinder. startPoint = " + startPoint + ", frameVector = " + frameVector);
 }
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public YoGraphicVector(String name, YoFramePoint3D startPoint, YoFrameVector3D frameVector, double scale, AppearanceDefinition appearance,
           boolean drawArrowhead)
{
 this(name, startPoint.getYoX(), startPoint.getYoY(), startPoint.getYoZ(), frameVector.getYoX(), frameVector.getYoY(), frameVector.getYoZ(), scale,
    appearance, drawArrowhead);
 if (!startPoint.getReferenceFrame().isWorldFrame() || !frameVector.getReferenceFrame().isWorldFrame())
 {
   System.err.println("Warning: Should be in a World Frame to create a YoGraphicVector. startPoint = " + startPoint + ", frameVector = " + frameVector);
 }
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

/**
* Sets the next ball to the given location, and gives it the given appearance. If all the balls
* have been set, then does nothing.
*
* @param location FramePoint to set the next ball to.
* @param appearance Appearance to give the next ball.
*/
public void setBall(FramePoint3DReadOnly location, AppearanceDefinition appearance, int ballIndex)
{
 //TODO: PDN, note that with current implementation of JME, you can only "set" the appearance once. After that, it will ignore all appearance sets
 if (!location.getReferenceFrame().isWorldFrame())
   throw new RuntimeException(location + " must be in a World Frame!");
 setBall(location.getX(), location.getY(), location.getZ(), appearance, ballIndex);
}

代码示例来源:origin: us.ihmc/ihmc-graphics-description

public void setToReferenceFrame(ReferenceFrame referenceFrame)
{
 if (referenceFrame == null)
   throw new RuntimeException("referenceFrame == null");
 RigidBodyTransform transformToWorld = new RigidBodyTransform();
 ReferenceFrame ancestorFrame = referenceFrame;
 // March up the parents until you get to the world:
 while (!ancestorFrame.isWorldFrame())
 {
   RigidBodyTransform transformToAncestor = ancestorFrame.getTransformToParent();
   RigidBodyTransform tempTransform3D = new RigidBodyTransform(transformToAncestor);
   tempTransform3D.multiply(transformToWorld);
   transformToWorld = tempTransform3D;
   ReferenceFrame newAncestorFrame = ancestorFrame.getParent();
   if (newAncestorFrame == null)
    throw new RuntimeException("No ancestor path to world. referenceFrame = " + referenceFrame + ", most ancient = " + ancestorFrame);
   ancestorFrame = newAncestorFrame;
 }
 setTransformToWorld(transformToWorld);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

if (!scanPointsFrame.isWorldFrame())

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

currentRow = descriptionSheet.createRow(currentRowIndex++);
currentRow.createCell(currentCellIndex++).setCellValue("Parent frame:");
String parentFrameName = gridReferenceFrame.isWorldFrame() ? "null" : gridReferenceFrame.getParent().getName();
currentRow.createCell(currentCellIndex++).setCellValue(parentFrameName);
if (!gridReferenceFrame.isWorldFrame())
  poseToParent.changeFrame(gridToWrite.getReferenceFrame().getParent());
RigidBodyTransform transformToParent = new RigidBodyTransform();

相关文章