VolumetricType
public protocol VolumetricType : GeometricType
Protocol for geometric types that have an internal volumetric area that can be queried with Vectors for containment checks.
-
The comparable vector type associated with this
VolumetricType
.Declaration
Swift
associatedtype Vector : VectorComparable
-
Returns
true
iffvector
lies within the ‘inside’ area of this volumetric shape.For 2D geometries this equates to querying against the inner area of the shape, and for 3D geometries the volume.
Generalizes to any N-dimensional type.
Declaration
Swift
func contains(_ vector: Vector) -> Bool
-
contains(x:
Extension methody: )
-
contains(x:
Extension methody: z: )