Search Results for

    Show / Hide Table of Contents

    Class SkinnedMeshDrawData

    Data storage for the skinned meshes rendering

    Inheritance
    SkinnedMeshDrawData
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Models/SkinnedMeshDrawData.h
    Syntax
    public class SkinnedMeshDrawData

    Constructors

    ~SkinnedMeshDrawData()

    Finalizes an instance of the SkinnedMeshDrawData class.

    Declaration
    public ~SkinnedMeshDrawData()

    SkinnedMeshDrawData()

    Initializes a new instance of the SkinnedMeshDrawData class.

    Declaration
    public SkinnedMeshDrawData()

    Fields

    BoneMatrices

    The bone matrices buffer. Contains prepared skeletal bones transformations (stored as 4x3, 3 Vector4 behind each other).

    Declaration
    public GPUBuffer* BoneMatrices = nullptr
    Field Value
    GPUBuffer

    BonesCount

    The bones count.

    Declaration
    public int32 BonesCount = 0
    Field Value
    int32

    Data

    The CPU data buffer with the bones transformations (ready to be flushed with the GPU).

    Declaration
    public Array<byte> Data
    Field Value
    Array<byte>

    PrevBoneMatrices

    The bone matrices buffer used during the previous update. Used by per-bone motion blur.

    Declaration
    public GPUBuffer* PrevBoneMatrices = nullptr
    Field Value
    GPUBuffer

    Methods

    IsDirty()

    Determines whether this instance has been modified and needs to be flushed with GPU buffer.

    Declaration
    public bool IsDirty() const
    Returns
    bool

    IsReady()

    Determines whether this instance is ready for rendering.

    Declaration
    public bool IsReady() const
    Returns
    bool

    OnDataChanged(bool dropHistory)

    After bones Data has been modified externally. Updates the bone matrices data for the GPU buffer. Ensure to call Flush before rendering.

    Declaration
    public void OnDataChanged(bool dropHistory)
    Parameters
    bool dropHistory

    True if drop previous update bones used for motion blur, otherwise will keep them and do the update.

    OnFlush()

    After bones Data has been send to the GPU buffer.

    Declaration
    public void OnFlush()

    SetData(const Matrix* bones, bool dropHistory)

    Sets the bone matrices data for the GPU buffer. Ensure to call Flush before rendering.

    Declaration
    public void SetData(const Matrix* bones, bool dropHistory)
    Parameters
    Matrix bones

    The bones data.

    bool dropHistory

    True if drop previous update bones used for motion blur, otherwise will keep them and do the update.

    Setup(int32 bonesCount)

    Setups the data container for the specified bones amount.

    Declaration
    public void Setup(int32 bonesCount)
    Parameters
    int32 bonesCount

    The bones count.

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