#include "ovaCNeurofeedbackSwitch.h" REGISTER_OBJECT_FACTORY(CNeurofeedbackSwitch, "ovaCNeurofeedbackSwitch"); CNeurofeedbackSwitch::CNeurofeedbackSwitch(OMK::Controller& controller, const OMK::ObjectDescriptor& objectDesc) :OMK::SimulatedObject(controller, objectDesc) { } CNeurofeedbackSwitch::~CNeurofeedbackSwitch() { } void CNeurofeedbackSwitch::init() { _FarAway_[0] = 1000; _FarAway_[1] = 1000; _FarAway_[2] = 1000; _Position_[0] = 0; _Position_[1] = 0; _Position_[2] = 0; sendValuedEvent("OpenViBE_ball", g_sManipulate3DEntity_SetPosition, PositionType(_FarAway_)); sendValuedEvent("OpenViBE_passive_ball", g_sManipulate3DEntity_SetPosition, PositionType(_FarAway_)); registerForSignal(g_sVrpnButtonStateUpdate); } void CNeurofeedbackSwitch::compute() { } bool CNeurofeedbackSwitch::processEvent(OMK::Event* pEvent) { if (pEvent->eventId == g_sVrpnButtonStateUpdate) { VrpnButtonStateEvent* event = dynamic_cast (pEvent); if (event) { const VrpnButtonState& vrpnButtonState = event->value; if (vrpnButtonState.first