Exemple #1
0
void Placeable::SetOrientationAndScale(const float3x3 &tm)
{
    assume(tm.IsColOrthogonal());
    assume(!tm.HasNegativeScale());
    Transform newtrans = transform.Get();
    newtrans.SetRotationAndScale(tm);
    transform.Set(newtrans, AttributeChange::Default);
}
Exemple #2
0
void Quat::Set(const float3x3 &m)
{
	assume(m.IsColOrthogonal());
	assume(m.HasUnitaryScale());
	assume(!m.HasNegativeScale());
	SetQuatFrom(*this, m);

#ifdef MATH_ASSERT_CORRECTNESS
	// Test that the conversion float3x3->Quat->float3x3 is correct.
	mathassert(this->ToFloat3x3().Equals(m, 0.01f));
#endif
}