but_materialtest1.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * \file
00003  *
00004  * $Id:$
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_MATERIALTEST1_H
00029 #define BUT_MATERIALTEST1_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 #include <OGRE/OgreSceneNode.h>
00038 #include <OgreManualObject.h>
00039 #include <OgreCamera.h>
00040 #include <string>
00041 #include <OGRE/OgreTexture.h>
00042 #include "ros_rtt_texture.h"
00043 #include <wx/wx.h>
00044 
00045 namespace rviz
00046 {
00047   class WindowManagerInterface;
00048 }
00049 
00050 namespace srs_ui_but
00051 {
00052 
00053 
00054 class CButMaterialTest1 : public rviz::Display
00055 {
00056 public:
00057   class CControllPane : public wxPanel
00058   {
00059   public:
00061     typedef boost::signal< void (bool) > tSigCheckboxState;
00062 
00064     typedef boost::signal< void ( std::string ) > tSigSave;
00065 
00066   public:
00068     CControllPane(wxWindow *parent, const wxString& title, rviz::WindowManagerInterface * wmi );
00069 
00071     void OnChckToggle(wxCommandEvent& event);
00072 
00074     virtual void OnSave(wxCommandEvent& event);
00075 
00077     tSigCheckboxState & getSigChckBox(){ return m_sigCheckBox; }
00078 
00080     tSigSave & getSigSave(){ return m_sigSave; }
00081 
00082   protected:
00084     rviz::WindowManagerInterface * m_wmi;
00085 
00087     wxCheckBox * m_chkb;
00088 
00090     wxButton * m_button;
00091 
00093     tSigCheckboxState m_sigCheckBox;
00094 
00096     tSigSave m_sigSave;
00097   private:
00098     DECLARE_EVENT_TABLE()
00099   }; // class CControllPane
00100 
00101 public:
00103   CButMaterialTest1(const std::string & name,rviz::VisualizationManager * manager);
00104 
00106     ~CButMaterialTest1();
00107 
00108     //OverridesfromDisplay
00109     virtual void targetFrameChanged(){}
00110     virtual void fixedFrameChanged(){}
00111     virtual void createProperties(){}
00112 
00114     virtual void update (float wall_dt, float ros_dt);
00115 
00116 protected:
00117     //overridesfromDisplay
00118     virtual void onEnable();
00119     virtual void onDisable();
00120 
00122     bool createGeometry(const ros::NodeHandle & nh);
00123 
00125     void destroyGeometry();
00126 
00128     //void setTimerPeriod(float period);
00129 
00131     void onTimerPublish(const ros::TimerEvent&);
00132 
00134     void onPublishStateChanged(bool state);
00135 
00137     void onSave( std::string filename );
00138 
00140     void createMaterials(Ogre::Camera * camera);
00141 
00142 protected:
00144     Ogre::SceneNode * m_sceneNode;
00145 
00147     std::string m_camCastPublisherName;
00148 
00150     ros::Publisher m_camCastPublisher;
00151 
00153     ros::Timer m_timer;
00154 
00156     double m_timerPeriod;
00157 
00159     bool m_bPublish;
00160 
00162     CControllPane * m_pane;
00163 
00164 };//class CButCamCast
00165 
00166 } // namespace srs_ui_but
00167 
00168 #endif // BUT_MATERIALTEST1_H
00169 
00170 


srs_ui_but
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Michal Spanel (spanel@fit.vutbr.cz), Tomas Lokaj
autogenerated on Mon Oct 6 2014 08:49:30