public static ExpandBoundingBox ( BEPUutilities.BoundingBox &boundingBox, System.Vector3 &sweep ) : void | ||
boundingBox | BEPUutilities.BoundingBox | Bounding box to expand. |
sweep | System.Vector3 | Sweep to expand the bounding box with. |
return | void |
public static void ExpandBoundingBox(ref BoundingBox boundingBox, ref Vector3 sweep)
{
if (sweep.X > 0)
boundingBox.Max.X += sweep.X;
else
boundingBox.Min.X += sweep.X;
if (sweep.Y > 0)
boundingBox.Max.Y += sweep.Y;
else
boundingBox.Min.Y += sweep.Y;
if (sweep.Z > 0)
boundingBox.Max.Z += sweep.Z;
else
boundingBox.Min.Z += sweep.Z;
}