Ejemplo n.º 1
0
//----------------------------------------------------------------------------//
void Element::setRotation(const Quaternion& rotation)
{
    d_rotation = rotation;

    ElementEventArgs args(this);
    onRotated(args);
}
Ejemplo n.º 2
0
dtkVrFlystickRecognizer::dtkVrFlystickRecognizer(void) : QObject(), d(new dtkVrFlystickRecognizerPrivate)
{
    d->q = this;
    d->running = false;
    d->activated = true;

    d->last_position = dtkVector3D<double>(0.0, 0.0, 0.0);
    d->last_orientation = dtkQuaternion<double>(0.0, 0.0, 0.0, 1.0);

    connect(d, SIGNAL(moved()), this, SLOT(onMoved()));
    connect(d, SIGNAL(rotated()), this, SLOT(onRotated()));
    connect(d, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int)));
    connect(d, SIGNAL(buttonReleased(int)), this, SLOT(onButtonReleased(int)));
}