本文整理了Java中us.ihmc.yoVariables.variable.YoFrameLineSegment2D.<init>()
方法的一些代码示例,展示了YoFrameLineSegment2D.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameLineSegment2D.<init>()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoFrameLineSegment2D
类名称:YoFrameLineSegment2D
方法名:<init>
[英]Creates a new YoFrameLineSegment2D.
[中]创建新的YoFrameLineSegment2D。
代码示例来源:origin: us.ihmc/ihmc-graphics-description
private YoArtifactLineSegment2d(String name, YoDouble startX, YoDouble startY, YoDouble endX, YoDouble endY, Color color, double arrowHeadWidth, double arrowHeadHeight)
{
this(name, new YoFrameLineSegment2D(startX, startY, endX, endY, ReferenceFrame.getWorldFrame()), color, arrowHeadWidth, arrowHeadHeight);
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given
* {@link YoVariableRegistry}.
* <p>
* This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate
* of the registry that was used to create {@code this}, this method searches for the duplicated
* {@code YoVariable}s and use them to duplicate {@code this}.
* </p>
*
* @param newRegistry YoVariableRegistry to duplicate {@code this} to.
* @return the duplicate of {@code this}.
*/
public YoFrameLineSegment2D duplicate(YoVariableRegistry newRegistry)
{
return new YoFrameLineSegment2D(firstEndpoint.duplicate(newRegistry), secondEndpoint.duplicate(newRegistry));
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
private static YoArtifactLineSegment2d yoArtifactLineSegment2DFromMessage(String name, YoVariable<?>[] vars, double[] consts,
AppearanceDefinition appearance)
{
YoFrameLineSegment2D segment = new YoFrameLineSegment2D((YoDouble) vars[0], (YoDouble) vars[1], (YoDouble) vars[2], (YoDouble) vars[3],
ReferenceFrame.getWorldFrame());
return new YoArtifactLineSegment2d(name, segment, appearance.getColor().get());
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public YoArtifactLineSegment2d(String name, YoFramePoint2D start, YoFramePoint2D end, Color color)
{
this(name, new YoFrameLineSegment2D(start.getYoX(), start.getYoY(), end.getYoX(), end.getYoY(), ReferenceFrame.getWorldFrame()), color);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
@Override
public Artifact createArtifact()
{
MutableColor color3f = appearance.getColor();
YoDouble endPointX = new YoDouble(getName() + "ArtifactEndPointX", base.getYoX().getYoVariableRegistry());
YoDouble endPointY = new YoDouble(getName() + "ArtifactEndPointY", base.getYoY().getYoVariableRegistry());
base.getYoX().addVariableChangedListener(v -> endPointX.set(base.getX() + vector.getX()));
base.getYoY().addVariableChangedListener(v -> endPointY.set(base.getY() + vector.getY()));
vector.getYoX().addVariableChangedListener(v -> endPointX.set(base.getX() + vector.getX()));
vector.getYoY().addVariableChangedListener(v -> endPointY.set(base.getY() + vector.getY()));
return new YoArtifactLineSegment2d(getName(),
new YoFrameLineSegment2D(base.getYoX(), base.getYoY(), endPointX, endPointY, ReferenceFrame.getWorldFrame()),
color3f.get());
}
代码示例来源:origin: us.ihmc/simulation-construction-set-test
radii.set(1.0, 0.7);
YoFrameLineSegment2D lineSegment = new YoFrameLineSegment2D("segmentGuy", "", ReferenceFrame.getWorldFrame(), registry);
lineSegment.getYoFirstEndpointX().set(1.0);
lineSegment.getYoFirstEndpointY().set(1.0);
内容来源于网络,如有侵权,请联系作者删除!