Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glTranslated(m_rotationCenter.x, 0, 0);
- glTranslated(0, m_rotationCenter.y, 0);
- glTranslated(0, 0, m_rotationCenter.z);
- glScalef( scale, scale, scale );
- glTranslated(-m_rotationCenter.x, 0, 0);
- glTranslated(0, -m_rotationCenter.y, 0);
- glTranslated(0, 0, -m_rotationCenter.z);
- glTranslated(m_rotationCenter.x-xTrans, 0, 0);
- glTranslated(0, m_rotationCenter.y+yTrans, 0);
- glTranslated(0, 0, m_rotationCenter.z+zTrans);
- glRotated( xRot, 1.0, 0.0, 0.0 );
- glRotated( yRot, 0.0, 1.0, 0.0 );
- glRotated( zRot, 0.0, 0.0, 1.0 );
- glTranslated(-m_rotationCenter.x+xTrans, 0, 0);
- glTranslated(0, -m_rotationCenter.y-yTrans, 0);
- glTranslated(0, 0, -m_rotationCenter.z-zTrans);
- glTranslated( -xTrans, 0.0, 0.0 );
- glTranslated( 0.0, yTrans, 0.0 );
- glTranslated( 0.0, 0.0, zTrans);
- Vector3f bX = m_rotation.getAX() * m_scale.x;
- Vector3f bY = m_rotation.getAY() * m_scale.y;
- Vector3f bZ = m_rotation.getAZ() * m_scale.z;
- Vector3f orig = m_rotation.rotate(m_origin * m_scale);
- m_transform= Transform (
- Vector4f(bX.x, bX.y, bX.z, 0),
- Vector4f(bY.x, bY.y, bY.z, 0),
- Vector4f(bZ.x, bZ.y, bZ.z, 0),
- Vector4f(m_position.x - orig.x, m_position.y - orig.y, m_position.z - orig.z, 1)
- );
Add Comment
Please, Sign In to add comment