public static idBounds FromBoundsTranslation(idBounds bounds, Vector3 origin, Matrix axis, Vector3 translation)
{
idBounds result;
if(axis != Matrix.Identity)
{
result = FromTransformedBounds(bounds, origin, axis);
}
else
{
result = new idBounds(bounds.Min + origin, bounds.Max + origin);
}
if(translation.X < 0.0f)
{
bounds.Min.X += translation.X;
}
else
{
bounds.Max.X += translation.X;
}
if(translation.Y < 0.0f)
{
bounds.Min.Y += translation.Y;
}
else
{
bounds.Max.Y += translation.Y;
}
if(translation.Z < 0.0f)
{
bounds.Min.Z += translation.Z;
}
else
{
bounds.Max.Z += translation.Z;
}
return bounds;
}