Search Results for

    Show / Hide Table of Contents

    Class SkinnedMesh

    Represents part of the skinned model that is made of vertices and can be rendered using custom material, transformation and skeleton bones hierarchy.

    Inheritance
    Object
    ScriptingObject
    MeshBase
    SkinnedMesh
    Inherited Members
    MeshBase::_box
    MeshBase::_cachedIndexBuffer
    MeshBase::_cachedIndexBufferCount
    MeshBase::_cachedVertexBufferCount
    MeshBase::_cachedVertexBuffers
    MeshBase::_cachedVertexLayouts
    MeshBase::_collisionProxy
    ScriptingObject::_gcHandle
    MeshBase::_hasBounds
    ScriptingObject::_id
    MeshBase::_index
    MeshBase::_indexBuffer
    MeshBase::_lodIndex
    MeshBase::_materialSlotIndex
    MeshBase::_model
    MeshBase::_sphere
    MeshBase::_triangles
    ScriptingObject::_type
    MeshBase::_use16BitIndexBuffer
    MeshBase::_vertexBuffers
    MeshBase::_vertices
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    MeshBase::DEPRECATED("Use Release instead.") void Unload()
    ScriptingObject::DestroyManaged()
    MeshBase::DownloadData(Span<MeshBufferType> types, Array<BytesContainer, FixedAllocation<4>>& buffers, Array<GPUVertexLayout* , FixedAllocation<4>>& layouts, bool forceGpu=false)
    MeshBase::DownloadDataCPU(MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout* *layout=nullptr)
    MeshBase::DownloadDataGPU(MeshBufferType type, BytesContainer& result, GPUVertexLayout* *layout=nullptr)
    MeshBase::DownloadDataGPUAsync(MeshBufferType type, BytesContainer& result, GPUVertexLayout* *layout=nullptr)
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    MeshBase::GetBox()
    ScriptingObject::GetClass()
    MeshBase::GetCollisionProxy()
    MeshBase::GetDrawCallGeometry(struct DrawCall& drawCall)
    ScriptingObject::GetID()
    MeshBase::GetIndex()
    MeshBase::GetIndexBuffer()
    MeshBase::GetLODIndex()
    ScriptingObject::GetManagedInstance()
    MeshBase::GetMaterialSlotIndex()
    MeshBase::GetModelBase()
    ScriptingObject::GetOrCreateManagedInstance()
    MeshBase::GetSphere()
    MeshBase::GetTriangleCount()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    MeshBase::GetVertexBuffer(int32 index)
    MeshBase::GetVertexCount()
    MeshBase::GetVertexLayout()
    ScriptingObject::HasManagedInstance()
    MeshBase::HasVertexColors()
    MeshBase::Init(uint32 vertices, uint32 triangles, const Array<const void* , FixedAllocation<MODEL_MAX_VB>>& vbData, const void* ibData, bool use16BitIndexBuffer, Array<GPUVertexLayout* , FixedAllocation<MODEL_MAX_VB>> vbLayout)
    MeshBase::Intersects(const Ray& ray, const Matrix& world, Real& distance, Vector3& normal)
    MeshBase::Intersects(const Ray& ray, const Transform& transform, Real& distance, Vector3& normal)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    MeshBase::IsInitialized()
    ScriptingObject::IsRegistered()
    MeshBase::Link(ModelBase* model, int32 lodIndex, int32 index)
    MeshBase::MeshBase(const SpawnParams& params)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    MeshBase::Render(GPUContext* context)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    MeshBase::SetBounds(const BoundingBox& box)
    MeshBase::SetBounds(const BoundingBox& box, const BoundingSphere& sphere)
    ScriptingObject::SetManagedInstance(MObject* instance)
    MeshBase::SetMaterialSlotIndex(int32 value)
    SkinnedMesh
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    ScriptingObject::UnregisterObject()
    MeshBase::UpdateTriangles(uint32 triangleCount, const uint32* ib)
    MeshBase::UpdateTriangles(uint32 triangleCount, const uint16* ib)
    MeshBase::UpdateTriangles(uint32 triangleCount, const void* ib, bool use16BitIndices)
    MeshBase::Use16BitIndexBuffer()
    MeshBase::~MeshBase()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Models/SkinnedMesh.h
    Syntax
    public class SkinnedMesh : public MeshBase

    Constructors

    DEPRECATED("Use Init intead.")

    Load mesh data and Initialize GPU buffers [Deprecated in v1.10]

    Declaration
    public DEPRECATED("Use Init intead.") bool Load(uint32 vertices
    Parameters
    "Use Init intead." SkinnedMesh_DEPRECATED__Use_Init_intead___

    Fields

    ib

    Declaration
    public uint32 void void* ib
    Field Value
    uint32 void void

    triangles

    Declaration
    public uint32 triangles
    Field Value
    uint32

    use16BitIndexBuffer

    Declaration
    public uint32 void void bool use16BitIndexBuffer
    Field Value
    uint32 void void bool

    vb0

    Declaration
    public uint32 void* vb0
    Field Value
    uint32 void

    Methods

    Draw(const RenderContext& renderContext, const DrawInfo& info, float lodDitherFactor)

    Draws the mesh.

    Declaration
    public void Draw(const RenderContext& renderContext, const DrawInfo& info, float lodDitherFactor) const
    Parameters
    RenderContext renderContext

    The rendering context.

    DrawInfo info

    The packed drawing info data.

    float lodDitherFactor

    The LOD transition dither factor.

    Draw(const RenderContextBatch& renderContextBatch, const DrawInfo& info, float lodDitherFactor)

    Draws the mesh.

    Declaration
    public void Draw(const RenderContextBatch& renderContextBatch, const DrawInfo& info, float lodDitherFactor) const
    Parameters
    RenderContextBatch renderContextBatch

    The rendering context batch.

    DrawInfo info

    The packed drawing info data.

    float lodDitherFactor

    The LOD transition dither factor.

    Release()

    Releases the mesh data (GPU buffers and local cache).

    Declaration
    public virtual void Release() override
    Overrides
    MeshBase::Release()

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const Float3* vertices, const uint16* triangles, const Int4* blendIndices, const Float4* blendWeights, const Float3* normals=nullptr, const Float3* tangents=nullptr, const Float2* uvs=nullptr, const Color32* colors=nullptr)

    Updates the model mesh (used by the virtual models created with Init rather than Load). Can be used only for virtual assets (see IsVirtual() and CreateVirtualAsset()). Mesh data will be cached and uploaded to the GPU with a delay.

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const Float3* vertices, const uint16* triangles, const Int4* blendIndices, const Float4* blendWeights, const Float3* normals=nullptr, const Float3* tangents=nullptr, const Float2* uvs=nullptr, const Color32* colors=nullptr)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    Float3 vertices

    The mesh vertices positions. Cannot be null.

    uint16 triangles

    The mesh index buffer (clockwise triangles). Uses 32-bit stride buffer. Cannot be null.

    Int4 blendIndices

    The skeletal bones indices to use for skinning.

    Float4 blendWeights

    The skeletal bones weights to use for skinning (matches blendIndices).

    Float3 normals

    The normal vectors (per vertex).

    Float3 tangents

    The normal vectors (per vertex). Use null to compute them from normal vectors.

    Float2 uvs

    The texture coordinates (per vertex).

    Color32 colors

    The vertex colors (per vertex).

    Returns
    bool

    True if failed, otherwise false.

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const Float3* vertices, const uint32* triangles, const Int4* blendIndices, const Float4* blendWeights, const Float3* normals=nullptr, const Float3* tangents=nullptr, const Float2* uvs=nullptr, const Color32* colors=nullptr)

    Updates the model mesh (used by the virtual models created with Init rather than Load). Can be used only for virtual assets (see IsVirtual() and CreateVirtualAsset()). Mesh data will be cached and uploaded to the GPU with a delay.

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const Float3* vertices, const uint32* triangles, const Int4* blendIndices, const Float4* blendWeights, const Float3* normals=nullptr, const Float3* tangents=nullptr, const Float2* uvs=nullptr, const Color32* colors=nullptr)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    Float3 vertices

    The mesh vertices positions. Cannot be null.

    uint32 triangles

    The mesh index buffer (clockwise triangles). Uses 32-bit stride buffer. Cannot be null.

    Int4 blendIndices

    The skeletal bones indices to use for skinning.

    Float4 blendWeights

    The skeletal bones weights to use for skinning (matches blendIndices).

    Float3 normals

    The normal vectors (per vertex).

    Float3 tangents

    The normal vectors (per vertex). Use null to compute them from normal vectors.

    Float2 uvs

    The texture coordinates (per vertex).

    Color32 colors

    The vertex colors (per vertex).

    Returns
    bool

    True if failed, otherwise false.

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const int32* ib)

    Updates the model mesh (used by the virtual models created with Init rather than Load). [Deprecated in v1.10]

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const int32* ib)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    VB0SkinnedElementType vb

    The vertex buffer data.

    int32 ib

    The index buffer in clockwise order.

    Returns
    bool

    True if failed, otherwise false.

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const uint16* ib)

    Updates the model mesh (used by the virtual models created with Init rather than Load). [Deprecated in v1.10]

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const uint16* ib)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    VB0SkinnedElementType vb

    The vertex buffer data.

    uint16 ib

    The index buffer, clockwise order.

    Returns
    bool

    True if failed, otherwise false.

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const uint32* ib)

    Updates the model mesh (used by the virtual models created with Init rather than Load). [Deprecated in v1.10]

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const uint32* ib)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    VB0SkinnedElementType vb

    The vertex buffer data.

    uint32 ib

    The index buffer in clockwise order.

    Returns
    bool

    True if failed, otherwise false.

    UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const void* ib, bool use16BitIndices)

    Updates the model mesh (used by the virtual models created with Init rather than Load). [Deprecated in v1.10]

    Declaration
    public bool UpdateMesh(uint32 vertexCount, uint32 triangleCount, const VB0SkinnedElementType* vb, const void* ib, bool use16BitIndices)
    Parameters
    uint32 vertexCount

    The amount of vertices in the vertex buffer.

    uint32 triangleCount

    The amount of triangles in the index buffer.

    VB0SkinnedElementType vb

    The vertex buffer data.

    void ib

    The index buffer in clockwise order.

    bool use16BitIndices

    True if index buffer uses 16-bit index buffer, otherwise 32-bit.

    Returns
    bool

    True if failed, otherwise false.

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