[kit] Make a bunch of data structures public

This commit is contained in:
Eryn Wells 2017-08-08 12:36:33 -07:00
parent c84681559e
commit aa7b1ffe9d
2 changed files with 32 additions and 18 deletions

View file

@ -17,9 +17,25 @@ extension UnsafeMutableRawPointer {
}
/// Metal's float4 type. 4 bytes per float, 16 bytes total, 16 byte aligned.
struct Float4 {
var x: Float = 0
var y: Float = 0
var z: Float = 0
var w: Float = 0
public struct Float4 {
public var x: Float = 0
public var y: Float = 0
public var z: Float = 0
public var w: Float = 0
public init() { }
public init(_ x: Float, _ y: Float, _ z: Float, _ w: Float) {
self.x = x
self.y = y
self.z = z
self.w = w
}
public init(r: Float, g: Float, b: Float, a: Float) {
x = r
y = g
z = b
w = a
}
}