3d67be162c
* New Heightfield Components Signed-off-by: John Jones-Steele <jjjoness@amazon.com> * Misc PR fixes * Fixed linux build failure from bad #include * Renamed "Terrain Physics Collider" to "Terrain Physics Heightfield Collider" per physics team feedback * Fixed 1/5 -> 1/4 typo in a comment * Added missing member copies in HeightfieldShapeConfiguration Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Addressed PR feedback Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Changes from review Signed-off-by: John Jones-Steele <jjjoness@amazon.com> * Remove tabs accidently added Signed-off-by: John Jones-Steele <jjjoness@amazon.com> * Fixed overly complicated scaling math. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Added comments to make it more obvious what's happening on CreateEnd / DestroyBegin. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> * Moved Heightfield CreatePxGeometryFromConfig into its own function Signed-off-by: John Jones-Steele <jjjoness@amazon.com> Co-authored-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
61 lines
2.3 KiB
C++
61 lines
2.3 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 <AzCore/Memory/SystemAllocator.h>
|
|
#include <AzCore/Module/Module.h>
|
|
|
|
#include <TerrainModule.h>
|
|
#include <Components/TerrainSystemComponent.h>
|
|
#include <Components/TerrainWorldComponent.h>
|
|
#include <Components/TerrainWorldDebuggerComponent.h>
|
|
#include <Components/TerrainWorldRendererComponent.h>
|
|
#include <Components/TerrainHeightGradientListComponent.h>
|
|
#include <Components/TerrainLayerSpawnerComponent.h>
|
|
#include <Components/TerrainSurfaceGradientListComponent.h>
|
|
#include <Components/TerrainSurfaceDataSystemComponent.h>
|
|
#include <Components/TerrainPhysicsColliderComponent.h>
|
|
#include <TerrainRenderer/Components/TerrainSurfaceMaterialsListComponent.h>
|
|
#include <TerrainRenderer/Components/TerrainMacroMaterialComponent.h>
|
|
|
|
namespace Terrain
|
|
{
|
|
TerrainModule::TerrainModule()
|
|
: AZ::Module()
|
|
{
|
|
m_descriptors.insert(m_descriptors.end(), {
|
|
TerrainSurfaceMaterialsListComponent::CreateDescriptor(),
|
|
TerrainSystemComponent::CreateDescriptor(),
|
|
TerrainWorldComponent::CreateDescriptor(),
|
|
TerrainWorldDebuggerComponent::CreateDescriptor(),
|
|
TerrainWorldRendererComponent::CreateDescriptor(),
|
|
TerrainHeightGradientListComponent::CreateDescriptor(),
|
|
TerrainLayerSpawnerComponent::CreateDescriptor(),
|
|
TerrainMacroMaterialComponent::CreateDescriptor(),
|
|
TerrainSurfaceGradientListComponent::CreateDescriptor(),
|
|
TerrainSurfaceDataSystemComponent::CreateDescriptor(),
|
|
TerrainPhysicsColliderComponent::CreateDescriptor()
|
|
});
|
|
}
|
|
|
|
AZ::ComponentTypeList TerrainModule::GetRequiredSystemComponents() const
|
|
{
|
|
return AZ::ComponentTypeList{
|
|
azrtti_typeid<TerrainSystemComponent>(),
|
|
azrtti_typeid<TerrainSurfaceDataSystemComponent>(),
|
|
};
|
|
}
|
|
}
|
|
|
|
#if !defined(TERRAIN_EDITOR)
|
|
// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
|
|
// The first parameter should be GemName_GemIdLower
|
|
// The second should be the fully qualified name of the class above
|
|
AZ_DECLARE_MODULE_CLASS(Gem_Terrain, Terrain::TerrainModule)
|
|
#endif
|
|
|