本文整理了Java中us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames.attachVariableChangedListener()
方法的一些代码示例,展示了YoFramePoint2dInMultipleFrames.attachVariableChangedListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFramePoint2dInMultipleFrames.attachVariableChangedListener()
方法的具体详情如下:
包路径:us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames
类名称:YoFramePoint2dInMultipleFrames
方法名:attachVariableChangedListener
暂无
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public YoFramePoint2d buildUpdatedYoFramePointForVisualizationOnly()
{
if (yoFramePointInWorld == null)
{
final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
if (!isReferenceFrameRegistered(worldFrame))
registerReferenceFrame(worldFrame);
yoFramePointInWorld = new YoFramePoint2d(namePrefix, worldFrame.getName(), worldFrame, registry);
attachVariableChangedListener(new VariableChangedListener()
{
private final FramePoint2d localFramePoint = new FramePoint2d();
private final YoFramePoint2d point = yoFramePointInWorld;
@Override
public void variableChanged(YoVariable<?> v)
{
getFrameTuple2dIncludingFrame(localFramePoint);
point.setAndMatchFrame(localFramePoint);
}
});
}
return yoFramePointInWorld;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoFramePoint2D buildUpdatedYoFramePointForVisualizationOnly()
{
if (yoFramePointInWorld == null)
{
final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
if (!isReferenceFrameRegistered(worldFrame))
registerReferenceFrame(worldFrame);
yoFramePointInWorld = new YoFramePoint2D(namePrefix, worldFrame.getName(), worldFrame, registry);
attachVariableChangedListener(new VariableChangedListener()
{
private final FramePoint2D localFramePoint = new FramePoint2D();
private final YoFramePoint2D point = yoFramePointInWorld;
@Override
public void notifyOfVariableChange(YoVariable<?> v)
{
localFramePoint.setIncludingFrame(YoFramePoint2dInMultipleFrames.this);
point.setMatchingFrame(localFramePoint);
}
});
}
return yoFramePointInWorld;
}
内容来源于网络,如有侵权,请联系作者删除!