Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
noa7 committed Dec 11, 2023
2 parents 2575e13 + 34b3135 commit 4743d0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sources/engine/Stride.Rendering/Rendering/BlendShape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,29 @@ public class BlendShape

public BlendShape()
{
// Name = name;
}

public Dictionary<float, Shape> Shapes { get; private set; }


public void AddShape(Shape shape, float weight)
{
if (shape != null)
{
(Shapes ??= new Dictionary<float, Shape>())[Math.Clamp(0f, 1f, weight)] = shape;
}
}



public int GetShapeCount()
{
return Shapes == null ? 0 : Shapes.Count;
}

public Shape GetShapeAtIndex(int index)
{
return Shapes == null ? null : Shapes[index];
}

public float[] GetShapeWeightsArray()
public float[] GetShapeWeightsArray()
{
if (Shapes == null) return null;
float[] weights = new float[Shapes.Count];
Shapes.Keys.CopyTo(weights, 0);
return weights;
Expand Down
3 changes: 3 additions & 0 deletions sources/tools/Stride.Importer.FBX/Stride.Importer.FBX.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@
<Reference Include="BulletSharp">
<HintPath>..\..\..\deps\BulletPhysics\BulletSharp.NetStandard.dll</HintPath>
</Reference>
<Reference Include="Stride.Rendering">
<HintPath>..\..\engine\Stride.Rendering\bin\Debug\net6.0\Stride.Rendering.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(StrideSdkTargets)" />
<ImportGroup Label="ExtensionTargets">
Expand Down

0 comments on commit 4743d0d

Please sign in to comment.