Skip to content

Commit 5d6c818

Browse files
committed
Temporarily allow checking isEmpty
These need to be converted into collections at some point.
1 parent f8d19e6 commit 5d6c818

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/GateEngine/Resources/Geometry/Raw/RawLines.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public struct RawLines: Sendable {
1111
var colors: [Float]
1212
var indices: [UInt16]
1313

14+
public var isEmpty: Bool {
15+
return indices.isEmpty
16+
}
17+
1418
public init() {
1519
positions = []
1620
colors = []

Sources/GateEngine/Resources/Geometry/Raw/RawPoints.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public struct RawPoints: Codable, Equatable, Hashable {
1212
var positions: [Float]
1313
var colors: [Float]
1414
var indices: [UInt16]
15+
16+
public var isEmpty: Bool {
17+
return indices.isEmpty
18+
}
1519

1620
public init() {
1721
self.positions = []

0 commit comments

Comments
 (0)