Anyone know where i could find function that does the LookAt? Meaning, it creates a rotation matrix that points to a specific point in 3D space. There is function like gluLookAt that does this but i need it for my bone editing mode Google has not helped much, other than this:
http://www.euclideanspace.com/maths/...okat/index.htm
Code:
void LookAt(const vector3& dir, const vector3& up, matrix33& m) { 
        vector3 z(dir); 
        z.norm(); 
        vector3 x( up * z ); // x = up cross z 
        x.norm(); 
        vector3 y( z * x ); // y = z cross x 
        m.set_components(x,y,z ); 
}
I'll post here if i can get that translated but help or ready source is appreciated