Search Results for

    Show / Hide Table of Contents

    Class ParticleLayout

    The particle attributes layout descriptor.

    Inheritance
    ParticleLayout
    Assembly: FlaxEngine.dll
    File: Engine/Particles/ParticlesData.h
    Syntax
    public class ParticleLayout

    Fields

    Attributes

    The attributes set.

    Declaration
    public Array<ParticleAttribute, FixedAllocation<PARTICLE_ATTRIBUTES_MAX_COUNT>> Attributes
    Field Value
    Array<ParticleAttribute, FixedAllocation<PARTICLE_ATTRIBUTES_MAX_COUNT>>

    Size

    The total particle data stride size (in bytes). Defines the required memory amount for a single particle.

    Declaration
    public int32 Size
    Field Value
    int32

    Methods

    AddAttribute(const StringView& name, ParticleAttribute::ValueTypes valueType)

    Adds the attribute with the given name and value type.

    Declaration
    public int32 AddAttribute(const StringView& name, ParticleAttribute::ValueTypes valueType)
    Parameters
    StringView name

    The name.

    ParticleAttribute::ValueTypes valueType

    The value type.

    Returns
    int32

    The attribute index or -1 if cannot find it.

    Clear()

    Clears the layout data.

    Declaration
    public void Clear()

    FindAttribute(const StringView& name)

    Finds the attribute by the name.

    Declaration
    public int32 FindAttribute(const StringView& name) const
    Parameters
    StringView name

    The name.

    Returns
    int32

    The attribute index or -1 if cannot find it.

    FindAttribute(const StringView& name, ParticleAttribute::ValueTypes valueType)

    Finds the attribute by the name and type.

    Declaration
    public int32 FindAttribute(const StringView& name, ParticleAttribute::ValueTypes valueType) const
    Parameters
    StringView name

    The name.

    ParticleAttribute::ValueTypes valueType

    The type.

    Returns
    int32

    The attribute index or -1 if cannot find it.

    FindAttributeOffset(const StringView& name, int32 fallbackValue = 0)

    Finds the attribute offset by the name.

    Declaration
    public int32 FindAttributeOffset(const StringView& name, int32 fallbackValue = 0) const
    Parameters
    StringView name

    The name.

    int32 fallbackValue

    The fallback value to return if attribute is missing.

    Returns
    int32

    The attribute offset or fallback value if cannot find it.

    FindAttributeOffset(const StringView& name, ParticleAttribute::ValueTypes valueType, int32 fallbackValue = 0)

    Finds the attribute offset by the name.

    Declaration
    public int32 FindAttributeOffset(const StringView& name, ParticleAttribute::ValueTypes valueType, int32 fallbackValue = 0) const
    Parameters
    StringView name

    The name.

    ParticleAttribute::ValueTypes valueType

    The type.

    int32 fallbackValue

    The fallback value to return if attribute is missing.

    Returns
    int32

    The attribute offset or fallback value if cannot find it.

    GetAttributeOffset(int32 index, int32 fallbackValue=-1)

    Gets the attribute offset by the attribute index.

    Declaration
    public int32 GetAttributeOffset(int32 index, int32 fallbackValue=-1) const
    Parameters
    int32 index

    The attribute index.

    int32 fallbackValue

    The fallback value to return if attribute is missing.

    Returns
    int32

    The attribute offset or fallback value if cannot find it.

    UpdateLayout()

    Updates the attributes layout (calculates offset) and updates the total size of the layout.

    Declaration
    public void UpdateLayout()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat