예제 #1
0
Matrix33F BaseTransform::orientation() const
{
	Matrix33F r;
	Vector3F angs = rotationAngles();
	r.rotateEuler(angs.x, angs.y, angs.z, m_rotationOrder);
	angs = rotationBaseAngles();
	Matrix33F b;
	b.rotateEuler(angs.x, angs.y, angs.z, m_rotationOrder);
	r.multiply(b);
	return r;
}
예제 #2
0
Vector3F BaseTransform::rotatePlane(RotateAxis a) const
{
	Matrix33F base;
	base.rotateEuler(rotationBaseAngles().x, rotationBaseAngles().y, rotationBaseAngles().z);
	if(a == AZ) return base.transform(Vector3F::ZAxis);
	
	Matrix33F r;
	if(a == AY) {
		r.rotateEuler(0.f, 0.f, rotationAngles().z);
		r.multiply(base);
		return r.transform(Vector3F::YAxis);
	}
	
	r = orientation();
	return r.transform(Vector3F::XAxis);
}