MPPFloatBuffer
class MPPFloatBuffer: NSObject, NSCopyingA wrapper class to store pointer to a float array and its size.
-
Initializes a new
FloatBufferby copying the elements of the given pointer to a float array. Ifdata=NULL, all elements of the buffer are initialized to zero.Declaration
Swift
init(data: UnsafePointer<CFloat>?, length: UInt)Parameters
dataA pointer to a float array whose values are to be copied into the buffer.
lengthLength of the float array.
Return Value
A new instance of
FloatBufferinitialized with the elements of the given float array. -
Initializes a
FloatBufferof the specified length with zeros.Declaration
Swift
init(length: UInt)Parameters
lengthNumber of elements the
FloatBuffercan hold.Return Value
A new instance of
FloatBufferof the given length and all elements initialized to zero. -
Pointer to float array wrapped by
FloatBuffer.Declaration
Swift
var data: UnsafeMutablePointer<CFloat> { get } -
Capacity of the array in number of elements.
Declaration
Swift
var length: UInt { get } -
Clears the
FloatBufferby setting all elements to zeroDeclaration
Swift
func clear()