Cylinder3
public struct Cylinder3<Vector> : GeometricType where Vector : Vector3Type
extension Cylinder3: Equatable where Vector: Equatable, Scalar: Equatable
extension Cylinder3: Hashable where Vector: Hashable, Scalar: Hashable
extension Cylinder3: BoundableType where Vector: Vector3FloatingPoint
extension Cylinder3: VolumetricType where Vector: Vector3FloatingPoint
extension Cylinder3: PointProjectableType where Vector: Vector3FloatingPoint
extension Cylinder3: SignedDistanceMeasurableType where Vector: VectorFloatingPoint
extension Cylinder3: Convex3Type where Vector: Vector3Real
Represents a regular 3-dimensional Cylinder as a pair of end points and a radius.
-
Convenience for
Vector.Scalar
.Declaration
Swift
public typealias Scalar = Vector.Scalar
-
The starting point of this cylinder.
Declaration
Swift
public var start: Vector
-
The end point of this cylinder
Declaration
Swift
public var end: Vector
-
The radius of this cylinder.
Declaration
Swift
public var radius: Scalar
-
Declaration
Swift
public init(start: Vector, end: Vector, radius: Scalar)
-
Declaration
Swift
var asLineSegment: LineSegment<Vector> { get }
-
Declaration
Swift
@inlinable public var bounds: AABB<Vector> { get }
-
Returns
true
if a given vector is fully contained within this cylinder.Points at the perimeter of the cylinder are considered as contained within the cylinder (inclusive).
Declaration
Swift
@inlinable public func contains(_ vector: Vector) -> Bool
-
Projects a given point onto this cylinder, returning the closest point on the outer surface of the cylinder to
vector
.Declaration
Swift
@inlinable public func project(_ vector: Vector) -> Vector
-
Declaration
Swift
@inlinable public func signedDistance(to point: Vector) -> Vector.Scalar
-
Returns the intersection points of a given line along this cylinder’s surface.
Declaration
Swift
public func intersection<Line>( with line: Line ) -> ConvexLineIntersection<Vector> where Line: Line3FloatingPoint, Vector == Line.Vector