b975111a93
* Add benchmarks and unit tests for GetSurfacePoints*. The benchmarks are very enlightening - the existing implementation of GetSurfacePointsFromRegion (and GetSurfacePointsFromList) is currently measurably *slower* than just calling GetSurfacePoints() many times in a loop. This is due to all of the extra allocation overhead that's currently happening with the way these data structures are built. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Small syntax improvement Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Small update to the benchmark to use filtered results. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Removed accidental extra include. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
|
|
|
|
#include <Tests/SurfaceDataTestFixtures.h>
|
|
#include <SurfaceData/Tests/SurfaceDataTestMocks.h>
|
|
|
|
#include <AzFramework/Components/TransformComponent.h>
|
|
#include <SurfaceDataSystemComponent.h>
|
|
#include <Components/SurfaceDataColliderComponent.h>
|
|
#include <Components/SurfaceDataShapeComponent.h>
|
|
|
|
|
|
namespace UnitTest
|
|
{
|
|
void SurfaceDataTestEnvironment::AddGemsAndComponents()
|
|
{
|
|
AddDynamicModulePaths({ "LmbrCentral" });
|
|
|
|
AddComponentDescriptors({
|
|
AzFramework::TransformComponent::CreateDescriptor(),
|
|
|
|
SurfaceData::SurfaceDataSystemComponent::CreateDescriptor(),
|
|
SurfaceData::SurfaceDataColliderComponent::CreateDescriptor(),
|
|
SurfaceData::SurfaceDataShapeComponent::CreateDescriptor(),
|
|
|
|
MockPhysicsColliderComponent::CreateDescriptor()
|
|
});
|
|
}
|
|
}
|
|
|