us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames.attachVariableChangedListener()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(91)

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

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;
}

相关文章