Beispiel #1
0
float3x4 operator *(const float3x4 &lhs, const TranslateOp &rhs)
{
	float3x4 r = lhs;
	r.SetTranslatePart(lhs.TransformPos(rhs.Offset()));

	// Our optimized form of multiplication must be the same as this.
	mathassert(r.Equals(lhs * (float3x4)rhs));
	return r;
}
Beispiel #2
0
float3x4 operator *(const float3x4 &lhs, const TranslateOp &rhs)
{
	float3x4 r = lhs;
	r.SetTranslatePart(lhs.TransformPos(DIR_TO_FLOAT3(rhs.Offset())));

	// Our optimized form of multiplication must be the same as this.
	assume4(r.Equals(lhs * (float3x4)rhs), lhs, rhs, r, lhs * (float3x4)rhs);
	return r;
}
Beispiel #3
0
void Ray::Transform(const float3x4 &transform)
{
    pos = transform.TransformPos(pos);
    dir = transform.TransformDir(dir);
}