add bounding volume constructor overloads to copy from other instances
This commit is contained in:
parent
2ccdb391bc
commit
14edf14d39
|
@ -24,6 +24,12 @@ namespace Blarg.GameFramework
|
||||||
get { return Math.Abs(Max.Z - Min.Z); }
|
get { return Math.Abs(Max.Z - Min.Z); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BoundingBox(BoundingBox other)
|
||||||
|
{
|
||||||
|
Min = other.Min;
|
||||||
|
Max = other.Max;
|
||||||
|
}
|
||||||
|
|
||||||
public BoundingBox(Vector3 min, Vector3 max)
|
public BoundingBox(Vector3 min, Vector3 max)
|
||||||
: this(ref min, ref max)
|
: this(ref min, ref max)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,12 @@ namespace Blarg.GameFramework
|
||||||
public Vector3 Center;
|
public Vector3 Center;
|
||||||
public float Radius;
|
public float Radius;
|
||||||
|
|
||||||
|
public BoundingSphere(BoundingSphere other)
|
||||||
|
{
|
||||||
|
Center = other.Center;
|
||||||
|
Radius = other.Radius;
|
||||||
|
}
|
||||||
|
|
||||||
public BoundingSphere(Vector3 center, float radius)
|
public BoundingSphere(Vector3 center, float radius)
|
||||||
: this(ref center, radius)
|
: this(ref center, radius)
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue