Esempio n. 1
0
void Matrix44::setRotation(double radians, Vector axis){
    assert(axis.size() == 3);
    Matrix44 r   = Matrix44();
    Matrix44 aux = Matrix44();;
    aux.setIdentity();
    aux.setPosition(m[3],m[7],m[11]);
    r.setRotationMatrix(radians, axis);
    operator=(r*aux);
}
Esempio n. 2
0
Vector Matrix44::rotateVector(Vector v){
    assert(v.size() == 3);
    Matrix44 aux = *this;
    aux.setPosition(0,0,0);
    return aux * v;
}