| 283 | } |
| 284 | |
| 285 | void MeshData::NormalizeBlendWeights() |
| 286 | { |
| 287 | ASSERT(Positions.Count() == BlendWeights.Count()); |
| 288 | for (int32 i = 0; i < Positions.Count(); i++) |
| 289 | { |
| 290 | Float4& weights = BlendWeights.Get()[i]; |
| 291 | const float sum = weights.SumValues(); |
| 292 | const float invSum = sum > ZeroTolerance ? 1.0f / sum : 0.0f; |
| 293 | weights *= invSum; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | void MeshData::Merge(MeshData& other) |
| 298 | { |
no test coverage detected