40f41689ee
This represents the very beginnings of the Terrain System presented in Sig-Content RFC 4 ( https://github.com/o3de/sig-content/blob/main/rfcs/rfc-4-terrain-system.md ). There is some basic working functionality in this PR, but the system as a whole should not be considered working yet. The gem is disabled by default in all projects. All of the code below is contained in the Terrain Gem, which is disabled by default. The following components exist and can be experimented with, but should not be expected to be functionally complete yet: Terrain World - level component for enabling terrain Terrain World Debugger - level component for enabling terrain debugging features Terrain Layer Spawner - component for defining a region of terrain Terrain Height Gradient List - component for defining a list of gradients to use as terrain heights Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
57 lines
1.9 KiB
C++
57 lines
1.9 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 <EditorComponents/EditorTerrainWorldDebuggerComponent.h>
|
|
#include <AzCore/Serialization/SerializeContext.h>
|
|
#include <AzCore/Serialization/EditContext.h>
|
|
|
|
namespace Terrain
|
|
{
|
|
void EditorTerrainWorldDebuggerComponent::Reflect(AZ::ReflectContext* context)
|
|
{
|
|
BaseClassType::Reflect(context);
|
|
|
|
AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context);
|
|
|
|
if (serializeContext)
|
|
{
|
|
serializeContext->Class<EditorTerrainWorldDebuggerComponent, BaseClassType>()
|
|
->Version(0)
|
|
;
|
|
|
|
if (auto editContext = serializeContext->GetEditContext())
|
|
{
|
|
editContext->Class<EditorTerrainWorldDebuggerComponent>(
|
|
"Terrain World Debugger", "")
|
|
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
|
->Attribute(AZ::Edit::Attributes::Category, "Terrain")
|
|
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/TerrainWorldDebugger.svg")
|
|
->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg")
|
|
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZStd::vector<AZ::Crc32>({ AZ_CRC_CE("Level") }))
|
|
;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void EditorTerrainWorldDebuggerComponent::Init()
|
|
{
|
|
BaseClassType::Init();
|
|
}
|
|
|
|
void EditorTerrainWorldDebuggerComponent::Activate()
|
|
{
|
|
BaseClassType::Activate();
|
|
}
|
|
|
|
AZ::u32 EditorTerrainWorldDebuggerComponent::ConfigurationChanged()
|
|
{
|
|
return BaseClassType::ConfigurationChanged();
|
|
}
|
|
}
|