ovassvepCTrainerFlickeringObject.h 1.12 KB
Newer Older
1
#pragma once
Jussi Lindgren's avatar
Jussi Lindgren committed
2

Jozef Legeny's avatar
Jozef Legeny committed
3
#include <openvibe/ov_all.h>
Jussi Lindgren's avatar
Jussi Lindgren committed
4
#include <toolkit/ovtk_all.h>
Jussi Lindgren's avatar
Jussi Lindgren committed
5 6 7 8 9 10 11
#include <Ogre.h>

#include "../ovassvepCSSVEPFlickeringObject.h"
#include "../ovassvepCBasicPainter.h"

/**
 */
12 13 14 15
namespace SSVEP {
class CTrainerApplication;

class CTrainerFlickeringObject final : public CSSVEPFlickeringObject
Jussi Lindgren's avatar
Jussi Lindgren committed
16
{
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
public:
	static CTrainerFlickeringObject* createTrainerFlickeringObject(size_t targetId);
	static void initialize(CTrainerApplication* application);

	static void connectToNode(Ogre::SceneNode* /*sceneNode*/) { }
	void setTarget(const bool isTarget) const { m_pointer->setVisible(isTarget); }
	bool isTarget() const { return m_pointer->getVisible(); }

private:
	static CTrainerApplication* m_application;
	static Ogre::SceneNode* m_parentNode;
	static CBasicPainter* m_painter;
	static float m_targetWidth;
	static float m_targetHeight;
	static Ogre::ColourValue m_lightColor;
	static Ogre::ColourValue m_darkColor;

	CTrainerFlickeringObject(float posX, float posY, Ogre::ColourValue colour, uint8_t litFrames, uint8_t darkFrames);


	Ogre::SceneNode* m_elementNode = nullptr;
	Ogre::MovableObject* m_pointer = nullptr;
};
}  // namespace SSVEP