add bounding volume constructor overloads to copy from other instances

This commit is contained in:
Gered 2013-08-25 16:32:58 -04:00
parent 2ccdb391bc
commit 14edf14d39
2 changed files with 15 additions and 3 deletions

View file

@ -24,6 +24,12 @@ namespace Blarg.GameFramework
get { return Math.Abs(Max.Z - Min.Z); }
}
public BoundingBox(BoundingBox other)
{
Min = other.Min;
Max = other.Max;
}
public BoundingBox(Vector3 min, Vector3 max)
: this(ref min, ref max)
{

View file

@ -9,6 +9,12 @@ namespace Blarg.GameFramework
public Vector3 Center;
public float Radius;
public BoundingSphere(BoundingSphere other)
{
Center = other.Center;
Radius = other.Radius;
}
public BoundingSphere(Vector3 center, float radius)
: this(ref center, radius)
{