/***************************************************************************
                          cursor3d.cpp  -  description
                             -------------------
    begin                : Mon Jul 3 2006
    copyright            : (C) 2006 by Krippel Harald
    email                : neuro.harald@surfeu.at
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "cursor3d.h"
#include "main.h"
#include "glcontrol.h"

cursor3d::cursor3d(){
  x=0;
  y=0;
  poi[0]=0.0f;
  poi[1]=0.0f;
  poi[2]=0.0f;
  on=0;
}

cursor3d::~cursor3d(){
}

void cursor3d::update()
{
      g_gl->getPoint(x,y,&poi);
}

void cursor3d::GetPosition ( sgCoord  *cursorpos )
{
       sgSetCoord(cursorpos,poi[0],poi[1],poi[2],0.0f,0.0f,0.0f);
}

void cursor3d::TurnOn()
{
     on=1;
}

void cursor3d::TurnOff()
{
     on=0;
}
