//********************************** 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 * @{ */ /// /// Represents a capsule with a line segment and a radius. /// [StructLayout(LayoutKind.Sequential), SerializeObject] public struct Capsule // Note: Must match C++ struct Capsule { [SerializeField] private LineSegment segment; [SerializeField] private float radius; /// /// Radius that defines the distance of the capsule from its line segment. /// public float Radius { get { return radius; } set { radius = value; } } /// /// Line segment along which the capsule lies. All capsule points are at equal distance from this segment. /// public LineSegment Segment { get { return segment; } set { segment = value; } } /// /// Creates a new capsule object. /// /// Line segment along which the capsule lies. /// Radius that defines the distance of the capsule from its line segment. public Capsule(LineSegment segment, float radius) { this.segment = segment; this.radius = radius; } }; /** @} */ }