Пример #1
0
/** Rotate around in world coordinates
 * @param angle the angle to rotate in radians
 * @param axis the vector to rotate around
 */
void Position::rotate(float angle, const Vector3f& axis)
{
	// create rotation matrix
	Matrix44f rotMat;
	rotMat.createRotationMatrix(angle, axis.getX(), axis.getY(), axis.getZ());

	// transform the up vector
	up.transform(rotMat);

	// transform the forward vector
	forward.transform(rotMat);
}