ovassvepCBasicPainter.h 1.3 KB
Newer Older
1
#pragma once
OpenViBE Posse's avatar
OpenViBE Posse committed
2 3 4

#include <Ogre.h>

5
#if (OGRE_VERSION_MAJOR > 1) || ((OGRE_VERSION_MAJOR == 1) && (OGRE_VERSION_MINOR >= 9))
6 7
#include "Overlay/OgreOverlay.h"
#include "Overlay/OgreOverlayContainer.h"
8 9
#endif

OpenViBE Posse's avatar
OpenViBE Posse committed
10 11 12 13 14 15 16 17
#define SSVEP_DEFAULT_COLOUR Ogre::ColourValue(1.0f, 1.0f, 1.0f)

namespace OpenViBESSVEP
{
	class CApplication;

	class Point
	{
18 19 20
	public:
		Point(float _x, float _y) :
			x(_x), y(_y) {};
OpenViBE Posse's avatar
OpenViBE Posse committed
21

22
		float x, y;
OpenViBE Posse's avatar
OpenViBE Posse committed
23 24 25 26
	};

	class CBasicPainter
	{
27 28 29 30 31 32 33 34
	public:
		CBasicPainter(CApplication* poApplication);
		~CBasicPainter() {};

		Ogre::ManualObject* paintRectangle(Ogre::RealRect oRectangle, Ogre::ColourValue oColour = SSVEP_DEFAULT_COLOUR, int iPlane = 1);
		Ogre::ManualObject* paintTriangle(Point oP1, Point oP2, Point oP3, Ogre::ColourValue oColour = SSVEP_DEFAULT_COLOUR, int iPlane = 1);
		Ogre::ManualObject* paintCircle(Ogre::Real rX, Ogre::Real rY, Ogre::Real rR, Ogre::ColourValue = SSVEP_DEFAULT_COLOUR, bool bFilled = true, int iPlane = 1);

35
		void paintText(const std::string& sID, const std::string& sText, Ogre::Real rX, Ogre::Real rY, Ogre::Real rWidth, Ogre::Real rHeight, const Ogre::ColourValue& oColour);
36 37 38 39 40 41 42

	protected:
		CApplication* m_poApplication;
		Ogre::OverlayManager* m_poOverlayManager;
		Ogre::OverlayContainer* m_poOverlayContainer;
		Ogre::SceneManager* m_poSceneManager;
		Ogre::AxisAlignedBox m_oAABInf;
OpenViBE Posse's avatar
OpenViBE Posse committed
43 44
	};
}