00001 /****************************************************************************** 00002 * \file 00003 * 00004 * $Id: but_display.h 2050 2012-12-03 15:38:13Z spanel $ 00005 * 00006 * Copyright (C) Brno University of Technology 00007 * 00008 * This file is part of software developed by dcgm-robotics@FIT group. 00009 * 00010 * Author: Vit Stancl (stancl@fit.vutbr.cz) 00011 * Supervised by: Michal Spanel (spanel@fit.vutbr.cz) 00012 * Date: dd/mm/2011 00013 * 00014 * This file is free software: you can redistribute it and/or modify 00015 * it under the terms of the GNU Lesser General Public License as published by 00016 * the Free Software Foundation, either version 3 of the License, or 00017 * (at your option) any later version. 00018 * 00019 * This file is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU Lesser General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public License 00025 * along with this file. If not, see <http://www.gnu.org/licenses/>. 00026 */ 00027 #pragma once 00028 #ifndef BUT_DISPLAY_H 00029 #define BUT_DISPLAY_H 00030 00031 #include <rviz/display.h> 00032 #include <rviz/view_controller.h> 00033 #include "rviz/properties/forwards.h" 00034 #include "rviz/properties/property.h" 00035 #include "rviz/properties/edit_enum_property.h" 00036 #include "rviz/properties/property_manager.h" 00037 00038 #include <OGRE/OgreSceneNode.h> 00039 #include <OgreManualObject.h> 00040 #include <OgreCamera.h> 00041 00042 #include <string> 00043 00044 #include "example_pane.h" 00045 #include "camera_control_pane.h" 00046 00047 00048 namespace srs_ui_but 00049 { 00050 00051 class CButDisplay:public rviz::Display 00052 { 00053 public: 00055 CButDisplay(const std::string & name, rviz::VisualizationManager * manager); 00056 00058 ~CButDisplay(); 00059 00060 // Overrides from Display 00061 virtual void targetFrameChanged(); 00062 virtual void fixedFrameChanged(); 00063 virtual void createProperties(); 00064 00066 virtual void update(float wall_dt, float ros_dt); 00067 00068 protected: 00069 // Overrides from Display 00070 virtual void onEnable(); 00071 virtual void onDisable(); 00072 00074 bool createGeometry(); 00075 00077 void destroyGeometry(); 00078 00080 void onViewControllerChange( rviz::ViewController * c ); 00081 00082 protected: 00084 Ogre::SceneNode * m_sceneNode; 00085 00087 Ogre::ManualObject * m_manualObject; 00088 00090 CExamplePanel * m_child_window; 00091 00093 CExampleDialog * m_dialog_window; 00094 00096 CExamplePanelControls * m_controls_window; 00097 00099 CCameraControlPane * m_camera_window; 00100 00101 };//classCBasicPlugin 00102 00103 00104 } // namespace srs_ui_but 00105 00106 #endif // BUT_DISPLAY_H