devel/CSGLib/src/ML_Quaternion.cpp
// The coordinate system returned is:
// Up is along the positive Y axis (vUp in global coordinates)
// Forward is along the NEGATIVE Z axis (negative, remember! Its the opengl standard, its what the camera uses, and so it can be what objects use)
// Right is along the positive X axis.
The coordinate system returned is:
Up is along the positive Y axis (vUp in global coordinates)
Forward is along the NEGATIVE Z axis (negative, remember. Its the opengl standard, its what the camera uses, and so it can be what objects use)
Right is along the positive X axis.
The coordinate system returned is : Up is along the positive Y axis ( vUp in global coordinates ) Forward is along the NEGATIVE Z axis ( negative remember . Its the opengl standard its what the camera uses and so it can be what objects use ) Right is along the positive X axis .
mlQuaternion mlQuaternionFromDirection(const mlVector3D & vForward, const mlVector3D & vUp)
{
	mlMatrix3x3 result;
	mlMatrixUtility::MatrixFromDirection(result, vForward, vUp);
	mlQuaternion quat = mlQuaternionFromRotationMatrix(result);
	return quat;
}
mlQuaternion mlQuaternionFromDirection ( const mlVector3D & vForward , const mlVector3D & vUp ) { mlMatrix3x3 result ; mlMatrixUtility :: MatrixFromDirection ( result , vForward , vUp ) ; mlQuaternion quat = mlQuaternionFromRotationMatrix ( result ) ; return quat ; }
The coordinate system returned is:
Up is along the positive Y axis (vUp in global coordinates)
Forward is along the NEGATIVE Z axis (negative, remember!
The coordinate system returned is : Up is along the positive Y axis ( vUp in global coordinates ) Forward is along the NEGATIVE Z axis ( negative remember!