本文整理了Java中us.ihmc.graphicsDescription.yoGraphics.plotting.YoArtifactLineSegment2d
类的一些代码示例,展示了YoArtifactLineSegment2d
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoArtifactLineSegment2d
类的具体详情如下:
包路径:us.ihmc.graphicsDescription.yoGraphics.plotting.YoArtifactLineSegment2d
类名称:YoArtifactLineSegment2d
暂无
代码示例来源: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/IHMCGraphicsDescription
public YoArtifactLineSegment2d(String name, YoFrameLineSegment2d lineSegment, Color color, double arrowHeadWidth, double arrowHeadHeight)
{
super(name, new double[0], color,
lineSegment.getYoFirstEndpointX(), lineSegment.getYoFirstEndpointY(), lineSegment.getYoSecondEndpointX(), lineSegment.getYoSecondEndpointY());
this.lineSegment = lineSegment;
this.drawArrow = true;
instatiateArrowObjects(arrowHeadWidth, arrowHeadHeight);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
@Override
public YoArtifact duplicate(YoVariableRegistry newRegistry)
{
return new YoArtifactLineSegment2d(getName(), lineSegment.duplicate(newRegistry), color, arrowHeadWidth, arrowHeadHeight);
}
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
yoLineOfRotation = new YoFrameLineSegment2d(caption, "", "", worldFrame, registry);
YoArtifactLineSegment2d lineOfRotationArtifact =
new YoArtifactLineSegment2d(caption, yoLineOfRotation, Color.GREEN, 0.01, 0.01);
lineOfRotationArtifact.setVisible(VISUALIZE);
yoGraphicsListRegistry.registerArtifact(listName, lineOfRotationArtifact);
代码示例来源:origin: us.ihmc/IHMCGraphicsDescription
@Override
public Artifact createArtifact()
{
Color3f color3f = appearance.getColor();
return new YoArtifactLineSegment2d(getName(), new YoFrameLineSegment2d(baseX, baseY, x, y, ReferenceFrame.getWorldFrame()), new Color(color3f.getX(), color3f.getY(), color3f.getZ()));
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public YoArtifactLineSegment2d(String name, YoFrameLineSegment2D lineSegment, Color color, double arrowHeadWidth, double arrowHeadHeight)
{
super(name, new double[0], color,
lineSegment.getYoFirstEndpointX(), lineSegment.getYoFirstEndpointY(), lineSegment.getYoSecondEndpointX(), lineSegment.getYoSecondEndpointY());
this.lineSegment = lineSegment;
this.drawArrow = true;
instatiateArrowObjects(arrowHeadWidth, arrowHeadHeight);
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public SimpleDesiredHeadingControlModuleVisualizer(ProcessedSensorsInterface processedSensors, YoVariableRegistry registry,
YoGraphicsListRegistry yoGraphicsListRegistry)
{
this.processedSensors = processedSensors;
desiredHeadingLine = new YoFrameLineSegment2d("desiredHeadingLine", "", ReferenceFrame.getWorldFrame(), registry);
finalHeadingLine = new YoFrameLineSegment2d("finalHeadingLine", "", ReferenceFrame.getWorldFrame(), registry);
if (yoGraphicsListRegistry != null)
{
ArtifactList artifactList = new ArtifactList("Simple Desired Heading");
YoArtifactLineSegment2d yoFrameLineSegment2dArtifact = new YoArtifactLineSegment2d("Desired Heading Line", desiredHeadingLine, Color.MAGENTA);
artifactList.add(yoFrameLineSegment2dArtifact);
yoFrameLineSegment2dArtifact = new YoArtifactLineSegment2d("Final Heading Line", finalHeadingLine, Color.ORANGE);
artifactList.add(yoFrameLineSegment2dArtifact);
yoGraphicsListRegistry.registerArtifactList(artifactList);
}
}
代码示例来源:origin: us.ihmc/IHMCGraphicsDescription
ReferenceFrame.getWorldFrame());
return new YoArtifactLineSegment2d(name, segment, appearance.getColor().get());
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
Artifact lineOfRotationArtifact = new YoArtifactLineSegment2d(namePrefix + "LineOfRotation", yoLineOfRotation, Color.ORANGE, 0.005, 0.01);
lineOfRotationArtifact.setVisible(false);
yoGraphicsListRegistry.registerArtifact(getClass().getSimpleName(), lineOfRotationArtifact);
代码示例来源: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
plotter.addArtifact(new LineArtifact("03", new Point2D(2, 0), new Point2D(3, 1)));
plotter.addArtifact(new YoArtifactOval("circle", center, radii, Color.RED));
plotter.addArtifact(new YoArtifactLineSegment2d("lineSegment1", lineSegment, Color.DARK_GRAY, 0.1, 0.1));
plotter.addArtifact(new YoArtifactLine2d("line1", line, Color.GREEN));
plotter.addArtifact(new YoArtifactPolygon("emptyPolygon1", polygon, Color.MAGENTA, false));
内容来源于网络,如有侵权,请联系作者删除!