![]() |
rtVTK
0.6.0
|
00001 00002 /****************************************************************************** 00003 * Copyright (c) 2012, Grove City College 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions are 00008 * met: 00009 * 00010 * * Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * * Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * * Neither the name of Grove City College nor the names of its 00019 * contributors may be used to endorse or promote products derived 00020 * from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00023 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00025 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00026 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 */ 00035 00036 00037 #ifndef PluginTemplate_PluginTemplate_h 00038 #define PluginTemplate_PluginTemplate_h 00039 00040 #include <QObject> 00041 00042 00044 // Forward declarations 00045 00046 class QCheckBox; 00047 class QGridLayout; 00048 class QSpacerItem; 00049 00050 namespace Core 00051 { 00052 00053 class Mesh; 00054 00055 } 00056 00057 namespace uiCore 00058 { 00059 00060 class Camera; 00061 00062 } // namespace uiCore 00063 00064 namespace rtVTK 00065 { 00066 00067 class MainWindow; 00068 00069 } // namespace rtVTK 00070 00071 00073 // Class definition 00074 00075 namespace PluginTemplate 00076 { 00077 00078 class PluginTemplate : public QObject 00079 { 00080 Q_OBJECT 00081 00082 public: 00083 PluginTemplate( rtVTK::MainWindow* const, 00084 const uiCore::Camera&, 00085 const Core::Mesh&, 00086 QWidget*); 00087 00088 ~PluginTemplate(); 00089 00091 void init(); 00092 void resize(uint, uint); 00093 void render(); 00094 void closer(); 00095 void idle(); 00096 bool traceRay(int, int); 00097 00098 signals: 00100 void sgnlRender(); 00101 00102 public slots: 00104 void slotToggleCheckBox(); 00105 00106 private: 00108 uint width; 00109 uint height; 00110 00112 const uiCore::Camera& camera; 00113 00115 const Core::Mesh& mesh; 00116 00118 QGridLayout* glayout_PluginTemplate; 00119 QCheckBox* cb_checkBox; 00120 QSpacerItem* vspacer_vspace; 00121 00122 }; 00123 00124 } // namespace PluginTemplate 00125 00126 #endif // PluginTemplate_PluginTemplate_h