Fix game build
This commit is contained in:
@@ -531,6 +531,17 @@ void MeshData::TransformBuffer(const Matrix& matrix)
|
||||
}
|
||||
}
|
||||
|
||||
void MeshData::NormalizeBlendWeights()
|
||||
{
|
||||
ASSERT(Positions.Count() == BlendWeights.Count());
|
||||
for (int32 i = 0; i < Positions.Count(); i++)
|
||||
{
|
||||
const float sum = BlendWeights[i].SumValues();
|
||||
const float invSum = sum > ZeroTolerance ? 1.0f / sum : 0.0f;
|
||||
BlendWeights[i] *= invSum;
|
||||
}
|
||||
}
|
||||
|
||||
void MeshData::Merge(MeshData& other)
|
||||
{
|
||||
// Merge index buffer (and remap indices)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Common.h"
|
||||
#include "Engine/Core/Math/BoundingSphere.h"
|
||||
#include "Engine/Core/Math/BoundingBox.h"
|
||||
#include "Engine/Core/Math/Int4.h"
|
||||
@@ -281,16 +280,7 @@ public:
|
||||
/// <summary>
|
||||
/// Normalizes the blend weights. Requires to have vertices with positions and blend weights setup.
|
||||
/// </summary>
|
||||
void NormalizeBlendWeights()
|
||||
{
|
||||
ASSERT(Positions.Count() == BlendWeights.Count());
|
||||
for (int32 i = 0; i < Positions.Count(); i++)
|
||||
{
|
||||
const float sum = BlendWeights[i].SumValues();
|
||||
const float invSum = sum > ZeroTolerance ? 1.0f / sum : 0.0f;
|
||||
BlendWeights[i] *= invSum;
|
||||
}
|
||||
}
|
||||
void NormalizeBlendWeights();
|
||||
|
||||
/// <summary>
|
||||
/// Merges this mesh data with the specified other mesh.
|
||||
|
||||
Reference in New Issue
Block a user