add bounding volume constructor overloads to copy from other instances
This commit is contained in:
parent
2ccdb391bc
commit
14edf14d39
|
@ -24,8 +24,14 @@ 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)
|
||||
: this(ref min, ref max)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -46,7 +52,7 @@ namespace Blarg.GameFramework
|
|||
}
|
||||
|
||||
public BoundingBox(Vector3 center, float halfWidth)
|
||||
: this(ref center, halfWidth)
|
||||
: this(ref center, halfWidth)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,14 @@ 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)
|
||||
: this(ref center, radius)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue