//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
//**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************//
using System.Runtime.InteropServices;
namespace BansheeEngine
{
/** @addtogroup Math
* @{
*/
///
/// A sphere represented by a center point and a radius.
///
[StructLayout(LayoutKind.Sequential), SerializeObject]
public struct Sphere // Note: Must match C++ struct Sphere
{
[SerializeField]
private float _radius;
[SerializeField]
private Vector3 _center;
///
/// Center point of the sphere.
///
public Vector3 Center
{
get { return _center; }
set { _center = value; }
}
///
/// Radius of the sphere.
///
public float Radius
{
get { return _radius; }
set { _radius = value; }
}
///
/// Creates a new sphere object.
///
/// Center point of the sphere.
/// Radius of the sphere.
public Sphere(Vector3 center, float radius)
{
_center = center;
_radius = radius;
}
};
/** @} */
}