Search Results for

    Show / Hide Table of Contents

    Class SamplesBuffer<T>

    Profiler samples storage buffer. Support recording new frame samples.

    Inheritance
    System.Object
    SamplesBuffer<T>
    Namespace: FlaxEditor.Windows.Profiler
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class SamplesBuffer<T> : Object
    Type Parameters
    T

    Single sample data type.

    Constructors

    SamplesBuffer(Int32)

    Initializes a new instance of the SamplesBuffer<T> class.

    Declaration
    public SamplesBuffer(int capacity = 600)
    Parameters
    System.Int32 capacity

    The maximum buffer capacity.

    Properties

    Count

    Gets the amount of samples in the buffer.

    Declaration
    public int Count { get; }
    Property Value
    System.Int32

    Item[Int32]

    Gets or sets the sample value at the specified index.

    Declaration
    public T this[int index] { get; set; }
    Parameters
    System.Int32 index

    The index.

    Property Value
    T

    The sample value.

    Last

    Gets the last sample value. Check buffer Count before calling this property.

    Declaration
    public T Last { get; }
    Property Value
    T

    Methods

    Add(T)

    Adds the specified sample to the buffer.

    Declaration
    public void Add(T sample)
    Parameters
    T sample

    The sample.

    Add(ref T)

    Adds the specified sample to the buffer.

    Declaration
    public void Add(ref T sample)
    Parameters
    T sample

    The sample.

    Clear()

    Clears this buffer.

    Declaration
    public void Clear()

    Get(Int32)

    Gets the sample at the specified index or the last sample if index is equal to -1.

    Declaration
    public T Get(int index)
    Parameters
    System.Int32 index

    The index.

    Returns
    T

    The sample value

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat