void ViewController::initialize( DisplayContext* context )
{
  context_ = context;

  std::stringstream ss;
  static int count = 0;
  ss << "ViewControllerCamera" << count++;
  camera_ = context_->getSceneManager()->createCamera( ss.str() );
  context_->getSceneManager()->getRootSceneNode()->attachObject( camera_ );

  setValue( formatClassId( getClassId() ));
  setReadOnly( true );

  // Do subclass initialization.
  onInitialize();

  cursor_ = getDefaultCursor();

  standard_cursors_[Default] = getDefaultCursor();
  standard_cursors_[Rotate2D] = makeIconCursor( "package://rviz/icons/rotate.svg" );
  standard_cursors_[Rotate3D] = makeIconCursor( "package://rviz/icons/rotate_cam.svg" );
  standard_cursors_[MoveXY] = makeIconCursor( "package://rviz/icons/move2d.svg" );
  standard_cursors_[MoveZ] = makeIconCursor( "package://rviz/icons/move_z.svg" );
  standard_cursors_[Zoom] = makeIconCursor( "package://rviz/icons/zoom.svg" );
  standard_cursors_[Crosshair] = makeIconCursor( "package://rviz/icons/crosshair.svg" );

  updateNearClipDistance();
  updateStereoProperties();

  if (!RenderSystem::get()->isStereoSupported())
  {
    stereo_enable_->setBool(false);
    stereo_enable_->hide();
  }
}
示例#2
0
WNDCLASSEX Dispatcher::makeWndClass(LPCTSTR name) {
	WNDCLASSEX cls = { sizeof(WNDCLASSEX) };
	fillWndClass(cls, name);
	cls.hCursor = getDefaultCursor();
	cls.hbrBackground = getDefaultBackground();
	return cls;
}
示例#3
0
void MeasureTool::onInitialize()
{
    line_ = new Line(context_->getSceneManager());

    std_cursor_ = getDefaultCursor();
    hit_cursor_ = makeIconCursor( "package://rviz/icons/crosshair.svg" );
}
void PointTool::onInitialize()
{
  hit_cursor_ = cursor_;
  std_cursor_ = getDefaultCursor();
}
示例#5
0
文件: focus_tool.cpp 项目: CURG/rviz
void FocusTool::onInitialize()
{
  std_cursor_ = getDefaultCursor();
  hit_cursor_ = makeIconCursor( "package://rviz/icons/crosshair.svg" );
}