Search Results for

    Show / Hide Table of Contents

    Class SamplesBuffer

    Small buffer for samples used to calculate min/max/avg values.

    Inheritance
    SamplesBuffer
    Assembly: FlaxEngine.dll
    File: Engine/Core/Collections/SamplesBuffer.h
    Syntax
    public class SamplesBuffer<T, Size>
    Type Parameters
    T

    Size

    Fields

    _count

    Declaration
    protected int32 _count = 0
    Field Value
    int32

    _data

    Declaration
    protected T _data[Size]
    Field Value
    T

    Methods

    Add(const T& value)

    Adds the specified value to the buffer.

    Declaration
    public void Add(const T& value)
    Parameters
    T value

    The value to add.

    At(int32 index)

    Gets or sets element at the specified index.

    Declaration
    public T At(int32 index) const
    Parameters
    int32 index

    The index.

    Returns
    T

    The element.

    Average()

    Gets the average value in the buffer.

    Declaration
    public T Average() const
    Returns
    T

    Capacity()

    Gets amount of elements that can be added to the collection.

    Declaration
    public int32 Capacity() const
    Returns
    int32

    Clear()

    Clears this collection.

    Declaration
    public void Clear()
    Returns
    void

    Count()

    Gets amount of elements in the collection.

    Declaration
    public int32 Count() const
    Returns
    int32

    First()

    Gets the first element value.

    Declaration
    public T First() const
    Returns
    T

    Get()

    Gets pointer to the first element in the collection.

    Declaration
    public T* Get() const
    Returns
    T

    HasItems()

    Returns true if collection has any elements added.

    Declaration
    public bool HasItems() const
    Returns
    bool

    IsEmpty()

    Returns true if collection is empty.

    Declaration
    public bool IsEmpty() const
    Returns
    bool

    Last()

    Gets last element value.

    Declaration
    public T Last() const
    Returns
    T

    Maximum()

    Gets the maximum value in the buffer.

    Declaration
    public T Maximum() const
    Returns
    T

    Minimum()

    Gets the minimum value in the buffer.

    Declaration
    public T Minimum() const
    Returns
    T

    operator[](int32 index)

    Gets or sets element at the specified index.

    Declaration
    public T operator[](int32 index)
    Parameters
    int32 index

    The index.

    Returns
    T

    The element.

    SetAll(const T value)

    Sets all elements to the given value.

    Declaration
    public void SetAll(const T value)
    Parameters
    T value

    The value.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat