public static idBounds FromPointTranslation(Vector3 point, Vector3 translation)
{
idBounds result = new idBounds();
if(translation.X < 0.0f)
{
result.Min.X = point.X + translation.X;
result.Max.X = point.X;
}
else
{
result.Min.X = point.X;
result.Max.X = point.X + translation.X;
}
if(translation.Y < 0.0f)
{
result.Min.Y = point.Y + translation.Y;
result.Max.Y = point.Y;
}
else
{
result.Min.Y = point.Y;
result.Max.Y = point.Y + translation.Y;
}
if(translation.Z < 0.0f)
{
result.Min.Z = point.Z + translation.Z;
result.Max.Z = point.Z;
}
else
{
result.Min.Z = point.Z;
result.Max.Z = point.Z + translation.Z;
}
return result;
}