Skip to content

Instantly share code, notes, and snippets.

@m0tive
Created March 24, 2011 11:31
Show Gist options
  • Save m0tive/884919 to your computer and use it in GitHub Desktop.
Save m0tive/884919 to your computer and use it in GitHub Desktop.
class Transform
{
public:
calcMatrix(); // builds a matrix from m_T and m_R
setFromMatrix(const Matrix& mat); // sets m_T and m_R
getRotation();
setRotation(const Quat& r);
getTranslation();
setTranslation(const Vect3& t);
rotate(const Quat& r);
translate(const Vect3& t);
protected:
Quat m_R;
Vect3 m_T
}
@m0tive
Copy link
Author

m0tive commented Mar 24, 2011

You don't have a quat transfrom. Quat can only describe rotation.

You have a rotation and a translation (and if your brave, a scale), which are combined together to make a matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment