d9ba0af645
* First pass at encapsulating SurfacePointList. The biggest challenge in optimizing SurfacePointList(s) usage is the overall memory management associated with it. There are M surface points with N surface mask entries created for every input point, which leads to a lot of container reallocation and memory shuffling when processing multiple input points. By encapsulating the list, it should become easier to preallocate the entries, as well as keep "helper data" around for managing the bookkeeping to associate the input points with the output points. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Small fixes and TODO reminders. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Encapsulate surface point creation and separate EnumeratePoints out from modifications. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Start removing SurfacePoint from the exposed API. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Changed SurfacePointList to split out the surface point storage to allow for span<> usage over time. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Removed entity id Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Removed SurfacePoint from SurfaceData, changed all remaining uses to AzFramework::SurfaceData::SurfacePoint. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Encapsulated SurfaceTagWeightMap and renamed to SurfaceTagWeights. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Fixed make file. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Better commenting and parameter naming. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Renamed methods to be more descriptive. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
110 lines
2.9 KiB
CMake
110 lines
2.9 KiB
CMake
#
|
|
# 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
|
|
#
|
|
#
|
|
|
|
ly_add_target(
|
|
NAME SurfaceData.Static STATIC
|
|
NAMESPACE Gem
|
|
FILES_CMAKE
|
|
surfacedata_files.cmake
|
|
INCLUDE_DIRECTORIES
|
|
PRIVATE
|
|
Source
|
|
PUBLIC
|
|
Include
|
|
BUILD_DEPENDENCIES
|
|
PRIVATE
|
|
Gem::LmbrCentral
|
|
PUBLIC
|
|
AZ::AzCore
|
|
AZ::AzFramework
|
|
Gem::Atom_RPI.Public
|
|
Gem::Atom_Feature_Common.Static
|
|
)
|
|
|
|
ly_add_target(
|
|
NAME SurfaceData ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
|
|
NAMESPACE Gem
|
|
FILES_CMAKE
|
|
surfacedata_shared_files.cmake
|
|
INCLUDE_DIRECTORIES
|
|
PRIVATE
|
|
Source
|
|
PUBLIC
|
|
Include
|
|
BUILD_DEPENDENCIES
|
|
PUBLIC
|
|
Gem::SurfaceData.Static
|
|
Gem::LmbrCentral
|
|
RUNTIME_DEPENDENCIES
|
|
Gem::LmbrCentral
|
|
)
|
|
|
|
# the above module is for use in all client/server types
|
|
ly_create_alias(NAME SurfaceData.Servers NAMESPACE Gem TARGETS Gem::SurfaceData)
|
|
ly_create_alias(NAME SurfaceData.Clients NAMESPACE Gem TARGETS Gem::SurfaceData)
|
|
|
|
if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
|
|
|
ly_add_target(
|
|
NAME SurfaceData.Editor GEM_MODULE
|
|
|
|
NAMESPACE Gem
|
|
FILES_CMAKE
|
|
surfacedata_editor_files.cmake
|
|
COMPILE_DEFINITIONS
|
|
PRIVATE
|
|
SURFACEDATA_EDITOR
|
|
INCLUDE_DIRECTORIES
|
|
PRIVATE
|
|
Source
|
|
PUBLIC
|
|
Include
|
|
BUILD_DEPENDENCIES
|
|
PRIVATE
|
|
AZ::AzToolsFramework
|
|
Gem::SurfaceData.Static
|
|
Gem::LmbrCentral.Editor
|
|
RUNTIME_DEPENDENCIES
|
|
Gem::LmbrCentral.Editor
|
|
)
|
|
# the above module is for use in dev tool situations
|
|
ly_create_alias(NAME SurfaceData.Builders NAMESPACE Gem TARGETS Gem::SurfaceData.Editor)
|
|
ly_create_alias(NAME SurfaceData.Tools NAMESPACE Gem TARGETS Gem::SurfaceData.Editor)
|
|
|
|
endif()
|
|
|
|
################################################################################
|
|
# Tests
|
|
################################################################################
|
|
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
|
|
|
ly_add_target(
|
|
NAME SurfaceData.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
|
|
NAMESPACE Gem
|
|
FILES_CMAKE
|
|
surfacedata_tests_files.cmake
|
|
INCLUDE_DIRECTORIES
|
|
PRIVATE
|
|
.
|
|
Tests
|
|
Source
|
|
BUILD_DEPENDENCIES
|
|
PRIVATE
|
|
AZ::AzTest
|
|
Gem::SurfaceData.Static
|
|
Gem::LmbrCentral
|
|
)
|
|
ly_add_googletest(
|
|
NAME Gem::SurfaceData.Tests
|
|
)
|
|
ly_add_googlebenchmark(
|
|
NAME Gem::SurfaceData.Benchmarks
|
|
TARGET Gem::SurfaceData.Tests
|
|
)
|
|
endif()
|