// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/String.h"
#include "Engine/Core/Collections/Array.h"
#include "Engine/Core/Math/Vector3.h"
///
/// The blend shape vertex data optimized for runtime meshes morphing.
///
struct BlendShapeVertex
{
///
/// The position offset.
///
Float3 PositionDelta;
///
/// The normal vector offset (tangent Z).
///
Float3 NormalDelta;
///
/// The index of the vertex in the mesh to blend.
///
uint32 VertexIndex;
};
template<>
struct TIsPODType
{
enum { Value = true };
};
///
/// Data container for the blend shape.
///
class BlendShape
{
public:
///
/// The name of the blend shape.
///
String Name;
///
/// The weight of the blend shape.
///
float Weight;
///
/// True if blend shape contains deltas for normal vectors of the mesh, otherwise calculations related to tangent space can be skipped.
///
bool UseNormals;
///
/// The minimum index of the vertex in all blend shape vertices. Used to optimize blend shapes updating.
///
uint32 MinVertexIndex;
///
/// The maximum index of the vertex in all blend shape vertices. Used to optimize blend shapes updating.
///
uint32 MaxVertexIndex;
///
/// The list of shape vertices.
///
Array Vertices;
};