SurfaceTagWeights optimization (#7436)
* Add comparison operators to SurfaceTagWeight. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Changed AddSurfaceTagWeight to always combine weights. This simplifies the API a bit and defines the behavior if someone ever tries to add a duplicate tag. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Added benchmarks for measuring the performance-critical APIs. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Changed SurfaceTagWeights to a fixed_vector. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -179,7 +179,7 @@ namespace SurfaceData
|
||||
if (m_shapeBounds.Contains(position) && shape->IsPointInside(position))
|
||||
{
|
||||
// If the point is inside our shape, add all our modifier tags with a weight of 1.0f.
|
||||
weights.AddSurfaceWeightsIfGreater(m_configuration.m_modifierTags, 1.0f);
|
||||
weights.AddSurfaceTagWeights(m_configuration.m_modifierTags, 1.0f);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user