Instance Methodheckj.voxels 0.2.6Voxels
z(_:)
Returns the intersection of the bounds sliced along the Z axis.
func z(_ range: ClosedRange<Int>) -> VoxelBounds
Parameters
- range
the slice of vertex indices along the Z axis.
Returns the intersection of the bounds sliced along the Z axis.
func z(_ range: ClosedRange<Int>) -> VoxelBounds
the slice of vertex indices along the Z axis.
import Voxels
A Swift library for storage, manipulation, export, and 3D rendering of Voxel data.
struct VoxelBounds
The coordinate bounds of a set of voxels.
@frozen struct ClosedRange<Bound> where Bound : Comparable
An interval from a lower bound up to, and including, an upper bound.
@frozen struct Int
A signed integer value type.
init(_ seqOfIndex: [VoxelIndex])
init(_ only: VoxelIndex)
init(min: [Int], max: [Int])
init(min: (Int, Int, Int), max: (Int, Int, Int))
init(min: VoxelIndex, max: VoxelIndex)
static let empty: VoxelBounds
var description: String { get }
var endIndex: Int { get }
let max: VoxelIndex
let min: VoxelIndex
var size: Int { get }
var startIndex: Int { get }
subscript(index: Int) -> VoxelIndex { get }
func _unchecked_delinearize(_ strideIndex: Int) -> VoxelIndex
func _unchecked_linearize(_ vi: VoxelIndex) -> Int
func adding(_ newPoint: VoxelIndex) -> VoxelBounds
func contains(_ point: VoxelIndex) -> Bool
func contains(_ bounds: VoxelBounds) -> Bool
func delinearize(_ strideIndex: Int) throws -> VoxelIndex
func expand(_ amount: Int = 1) -> VoxelBounds
Expands the bounds by increasing both the maximum and minimum away from the bounds midpoint.
func index(after i: Int) -> Int
func insetQuadrant(_ amount: Int = 1) -> VoxelBounds
Insets the bounds by decreasing the maximum size by the amount you provide, collapsing down to the minimum bounds.
func linearize(_ vi: VoxelIndex) throws -> Int
func makeIterator() -> VoxelBoundsIterator
func x(_ range: ClosedRange<Int>) -> VoxelBounds
Returns the intersection of the bounds sliced along the X axis.
func y(_ range: ClosedRange<Int>) -> VoxelBounds
Returns the intersection of the bounds sliced along the Y axis.
struct VoxelBoundsIterator
typealias Index = Int
typealias Iterator = VoxelBoundsIterator