Ellipsoid
public struct Ellipsoid<Vector> : GeometricType where Vector : VectorType
extension Ellipsoid: Equatable where Vector: Equatable, Scalar: Equatable
extension Ellipsoid: Hashable where Vector: Hashable, Scalar: Hashable
extension Ellipsoid: Encodable where Vector: Encodable, Scalar: Encodable
extension Ellipsoid: Decodable where Vector: Decodable, Scalar: Decodable
extension Ellipsoid: BoundableType where Vector: VectorAdditive
extension Ellipsoid: VolumetricType where Vector: VectorReal
extension Ellipsoid: ConvexType where Vector: VectorReal
Represents an N-dimensional ellipsoid as a center with an N-dimensional radii vector which describes the axis of the ellipsoid.
-
Convenience for
Vector.Scalar
Declaration
Swift
public typealias Scalar = Vector.Scalar
-
This ellipsoid’s center.
Declaration
Swift
public var center: Vector
-
The axis-aligned axis (or radii) for this ellipsoid.
Declaration
Swift
public var radius: Vector
-
Declaration
Swift
public init(center: Vector, radius: Vector)
-
Returns an
Ellipsoid
with center.zero
and radius.one
.Declaration
Swift
static var unit: `Self` { get }
-
Returns
true
if the given point is contained within this ellipse.The method returns
true
for points that lie on the outermost perimeter of the ellipse (inclusive).Declaration
Swift
@inlinable public func contains(_ point: Vector) -> Bool
-
Precondition
radius.minimalComponent > 0
Declaration
Swift
@inlinable public func intersection<Line>( with line: Line ) -> ConvexLineIntersection<Vector> where Line: LineFloatingPoint, Vector == Line.Vector