diff --git a/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.cpp b/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0ad4d5b00d14798358c9c8d5533165246c88d789 --- /dev/null +++ b/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.cpp @@ -0,0 +1,70 @@ +/*============================================================================*/ +/* ViSTA VR toolkit */ +/* Copyright (c) 1997-2016 RWTH Aachen University */ +/*============================================================================*/ +/* License */ +/* */ +/* This program is free software: you can redistribute it and/or modify */ +/* it under the terms of the GNU Lesser General Public License as published */ +/* by the Free Software Foundation, either version 3 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU Lesser General Public License */ +/* along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/*============================================================================*/ +/* Contributors */ +/* */ +/*============================================================================*/ + +/*============================================================================*/ +/* INCLUDES */ +/*============================================================================*/ +#include "VistaSimpleOpenGLDraw.h" + + +/*============================================================================*/ +/* CONSTRUCTORS / DESTRUCTOR */ +/*============================================================================*/ + +VistaSimpleOpenGLDraw::VistaSimpleOpenGLDraw( + std::function<void()> funcDraw, + const VistaBoundingBox& oBoundingBox) + : IVistaOpenGLDraw() + , m_funcDraw(funcDraw) + , m_oBB(oBoundingBox) +{ + +} + +VistaSimpleOpenGLDraw::~VistaSimpleOpenGLDraw() +{ + +} + + + +/*============================================================================*/ +/* IMPLEMENTATION */ +/*============================================================================*/ + +bool VistaSimpleOpenGLDraw::Do() +{ + m_funcDraw(); + return true; +} + +bool VistaSimpleOpenGLDraw::GetBoundingBox(VistaBoundingBox &bb) +{ + bb = m_oBB; + return true; +} + +/*============================================================================*/ +/* END OF FILE */ +/*============================================================================*/ + diff --git a/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.h b/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.h new file mode 100644 index 0000000000000000000000000000000000000000..c5f57ee59476118ad767249122cc2184907406de --- /dev/null +++ b/VistaCoreLibs/VistaKernel/GraphicsManager/VistaSimpleOpenGLDraw.h @@ -0,0 +1,77 @@ +/*============================================================================*/ +/* ViSTA VR toolkit */ +/* Copyright (c) 1997-2016 RWTH Aachen University */ +/*============================================================================*/ +/* License */ +/* */ +/* This program is free software: you can redistribute it and/or modify */ +/* it under the terms of the GNU Lesser General Public License as published */ +/* by the Free Software Foundation, either version 3 of the License, or */ +/* (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU Lesser General Public License */ +/* along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/*============================================================================*/ +/* Contributors */ +/* */ +/*============================================================================*/ + + +#ifndef _VISTASIMPLEOPENGLDRAW_H +#define _VISTASIMPLEOPENGLDRAW_H + + +/*============================================================================*/ +/* INCLUDES */ +/*============================================================================*/ + +#include "../VistaKernelConfig.h" +#include "VistaOpenGLDraw.h" +#include <functional> + +#include "VistaMath/VistaBoundingBox.h" + +/*============================================================================*/ +/* FORWARD DECLARATIONS */ +/*============================================================================*/ + + +/*============================================================================*/ +/* CLASS DEFINITIONS */ +/*============================================================================*/ + +class VISTAKERNELAPI VistaSimpleOpenGLDraw : public IVistaOpenGLDraw +{ +public: + + VistaSimpleOpenGLDraw(std::function<void()> funcDraw, const VistaBoundingBox& oBoundingBox); + virtual ~VistaSimpleOpenGLDraw(); + + virtual bool Do(); + + virtual bool GetBoundingBox(VistaBoundingBox &bb); + + + +protected: + + VistaBoundingBox m_oBB; + std::function<void()> m_funcDraw; + +private: + + + +}; + +#endif // _VISTASIMPLEOPENGLDRAW_H + + +/*============================================================================*/ +/* END OF FILE */ +/*============================================================================*/ diff --git a/VistaCoreLibs/VistaKernel/GraphicsManager/_SourceFiles.cmake b/VistaCoreLibs/VistaKernel/GraphicsManager/_SourceFiles.cmake index a35ef835bb3fb8bff44b0c4cb888a18c57c9ccab..f81fdfd8978476996cf8231918119828723735e1 100644 --- a/VistaCoreLibs/VistaKernel/GraphicsManager/_SourceFiles.cmake +++ b/VistaCoreLibs/VistaKernel/GraphicsManager/_SourceFiles.cmake @@ -37,6 +37,8 @@ set( DirFiles VistaOpenGLDebug.h VistaOpenGLDraw.cpp VistaOpenGLDraw.h + VistaSimpleOpenGLDraw.cpp + VistaSimpleOpenGLDraw.h VistaOpenGLNode.cpp VistaOpenGLNode.h VistaOpenGLPolyLine.cpp