/*======================================================================================

	Program:		Range Imaging Toolkit (RITK)
	Module:			ritkOpenGLEntity.h
	Version:		$Revision: 1817 $
	Date:			$Date: 2011-09-30 16:52:28 +0200 (Fri, 30 Sep 2011) $

	Copyright (c) 2010-2011
	Pattern Recognition Lab, 
    University Erlangen-Nuremberg, Germany
    All rights reserved.

	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 RITKCopyright.txt for more information.

	http://www5.informatik.uni-erlangen.de/research/software/ritk

========================================================================================*/

#ifndef OPENGLENTITY_H__
#define OPENGLENTITY_H__

#include <QObject>
#include <QDockWidget>

#include "ritkVisualization.h"

#include <itkVector.h>


namespace ritk
{

/**	@ingroup	Visualization
 *	@class		OpenGLEntity
 *	@author		Jakob Wasza
 *	@brief		Base class for all entities to be drawn in an OpenGL widget
 *
 *	@details
 */
class VISUALIZATION_EXPORT OpenGLEntity : public QObject
{
	Q_OBJECT

public:
	/// Constructor
	OpenGLEntity();
	/// Destructor
	virtual ~OpenGLEntity();

	/// Render the entity
	virtual void Render()=0;

	/// Control the entity @todo Check the const qualifier
	virtual QDockWidget* GetControlUnit() const =0;

	/**	@name	Bounding box [xmin,ymin,zmin, xmax,ymax,zmax] */
	//@{
	typedef float						RealType;
	typedef itk::Vector<RealType, 6>	BoundingBoxType;
	virtual BoundingBoxType				GetBoundingBox() const =0;
	//@}

signals:
	/// Signal that is emitted if the internal status of the entity changes
	void StatusChanged();
};

} // namespace ritk


#endif // OPENGLENTITY_H__
