Removes multiple Rendering files from LmbrCentral that are no longer used
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,6 @@
|
||||
|
||||
// LmbrCentral
|
||||
#include <LmbrCentral/Audio/AudioSystemComponentBus.h>
|
||||
#include <LmbrCentral/Rendering/EditorLightComponentBus.h> // for LmbrCentral::EditorLightComponentRequestBus
|
||||
|
||||
static const char* kAutoBackupFolder = "_autobackup";
|
||||
static const char* kHoldFolder = "$tmp_hold"; // conform to the ignored file types $tmp[0-9]*_ regex
|
||||
@@ -2130,52 +2129,13 @@ void CCryEditDoc::ReleaseXmlArchiveArray(TDocMultiArchive& arrXmlAr)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzToolsFramework::EditorEntityContextNotificationBus interface implementation
|
||||
void CCryEditDoc::OnSliceInstantiated(const AZ::Data::AssetId& sliceAssetId, AZ::SliceComponent::SliceInstanceAddress& sliceAddress, const AzFramework::SliceInstantiationTicket& /*ticket*/)
|
||||
void CCryEditDoc::OnSliceInstantiated([[maybe_unused]] const AZ::Data::AssetId& sliceAssetId, [[maybe_unused]] AZ::SliceComponent::SliceInstanceAddress& sliceAddress, [[maybe_unused]] const AzFramework::SliceInstantiationTicket& /*ticket*/)
|
||||
{
|
||||
if (m_envProbeSliceAssetId == sliceAssetId)
|
||||
{
|
||||
const AZ::SliceComponent::EntityList& entities = sliceAddress.GetInstance()->GetInstantiated()->m_entities;
|
||||
const AZ::Uuid editorEnvProbeComponentId("{8DBD6035-583E-409F-AFD9-F36829A0655D}");
|
||||
AzToolsFramework::EntityIdList entityIds;
|
||||
entityIds.reserve(entities.size());
|
||||
for (const AZ::Entity* entity : entities)
|
||||
{
|
||||
if (entity->FindComponent(editorEnvProbeComponentId))
|
||||
{
|
||||
// Update Probe Area size to cover the whole terrain
|
||||
LmbrCentral::EditorLightComponentRequestBus::Event(entity->GetId(), &LmbrCentral::EditorLightComponentRequests::SetProbeAreaDimensions, AZ::Vector3(m_terrainSize, m_terrainSize, m_envProbeHeight));
|
||||
|
||||
// Force update the light to apply cubemap
|
||||
LmbrCentral::EditorLightComponentRequestBus::Event(entity->GetId(), &LmbrCentral::EditorLightComponentRequests::RefreshLight);
|
||||
}
|
||||
entityIds.push_back(entity->GetId());
|
||||
}
|
||||
|
||||
//Detach instantiated env probe entities from engine slice
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceRequestBus::Broadcast(
|
||||
&AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::DetachSliceEntities, entityIds);
|
||||
|
||||
sliceAddress.SetInstance(nullptr);
|
||||
sliceAddress.SetReference(nullptr);
|
||||
SetModifiedFlag(true);
|
||||
SetModifiedModules(eModifiedEntities);
|
||||
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusDisconnect();
|
||||
|
||||
//save after level default slice fully instantiated
|
||||
Save();
|
||||
}
|
||||
GetIEditor()->ResumeUndo();
|
||||
}
|
||||
|
||||
|
||||
void CCryEditDoc::OnSliceInstantiationFailed(const AZ::Data::AssetId& sliceAssetId, const AzFramework::SliceInstantiationTicket& /*ticket*/)
|
||||
void CCryEditDoc::OnSliceInstantiationFailed([[maybe_unused]] const AZ::Data::AssetId& sliceAssetId, [[maybe_unused]] const AzFramework::SliceInstantiationTicket& /*ticket*/)
|
||||
{
|
||||
if (m_envProbeSliceAssetId == sliceAssetId)
|
||||
{
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusDisconnect();
|
||||
AZ_Warning("Editor", false, "Failed to instantiate default environment probe slice.");
|
||||
}
|
||||
GetIEditor()->ResumeUndo();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -200,7 +200,6 @@ protected:
|
||||
QString m_pathName;
|
||||
QString m_slicePathName;
|
||||
QString m_title;
|
||||
AZ::Data::AssetId m_envProbeSliceAssetId;
|
||||
float m_terrainSize;
|
||||
const char* m_envProbeSliceRelativePath = "EngineAssets/Slices/DefaultLevelSetup.slice";
|
||||
const float m_envProbeHeight = 200.0f;
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
#include "ISourceControl.h"
|
||||
#include "UI/QComponentEntityEditorMainWindow.h"
|
||||
|
||||
#include <LmbrCentral/Rendering/EditorLightComponentBus.h>
|
||||
#include <LmbrCentral/Scripting/TagComponentBus.h>
|
||||
#include <LmbrCentral/Scripting/EditorTagComponentBus.h>
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <qevent.h>
|
||||
#include <qmimedata.h>
|
||||
|
||||
#include <LmbrCentral/Rendering/LensFlareAsset.h>
|
||||
#include <LmbrCentral/Rendering/MeshAsset.h>
|
||||
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include <AzCore/Slice/SliceAsset.h>
|
||||
#include <LmbrCentral/Rendering/MaterialAsset.h>
|
||||
#include <LmbrCentral/Rendering/MeshAsset.h>
|
||||
#include <LmbrCentral/Rendering/MaterialHandle.h>
|
||||
|
||||
// Scriptable Ebus Registration
|
||||
#include "Events/ReflectScriptableEvents.h"
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/ComponentBus.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
/*!
|
||||
* DecalComponentRequests::Bus
|
||||
* Messages serviced by the Decal component.
|
||||
*/
|
||||
class DecalComponentRequests
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~DecalComponentRequests() {}
|
||||
|
||||
/**
|
||||
* Makes the decal visible.
|
||||
*/
|
||||
virtual void Show() = 0;
|
||||
|
||||
/**
|
||||
* Hides the decal.
|
||||
*/
|
||||
virtual void Hide() = 0;
|
||||
|
||||
/**
|
||||
* Specify the decal's visibility.
|
||||
* \param visible true to make the decal visible, false to hide it.
|
||||
*/
|
||||
virtual void SetVisibility(bool visible) = 0;
|
||||
};
|
||||
|
||||
using DecalComponentRequestBus = AZ::EBus<DecalComponentRequests>;
|
||||
|
||||
/*!
|
||||
* DecalComponentEditorRequests::Bus
|
||||
* Editor/UI messages serviced by the Decal component.
|
||||
*/
|
||||
class DecalComponentEditorRequests
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
using Bus = AZ::EBus<DecalComponentEditorRequests>;
|
||||
|
||||
virtual ~DecalComponentEditorRequests() {}
|
||||
|
||||
virtual void RefreshDecal() {}
|
||||
};
|
||||
|
||||
/*!
|
||||
* DecalComponentEvents::Bus
|
||||
* Events dispatched by the Decal component.
|
||||
*/
|
||||
class DecalComponentEvents
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
using Bus = AZ::EBus<DecalComponentEvents>;
|
||||
|
||||
virtual ~DecalComponentEvents() {}
|
||||
};
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,195 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
#include <AzCore/Component/ComponentBus.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
class LightConfiguration;
|
||||
|
||||
/*!
|
||||
* EditorLightComponentRequestBus
|
||||
* Editor/UI messages serviced by the light component.
|
||||
*/
|
||||
class EditorLightComponentRequests
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
virtual ~EditorLightComponentRequests() {}
|
||||
|
||||
//! Recreates the render light.
|
||||
virtual void RefreshLight() {}
|
||||
|
||||
//! Sets the active cubemap resource.
|
||||
virtual void SetCubemap(const AZStd::string& /*cubemap*/) {}
|
||||
virtual void SetProjectorTexture(const AZStd::string& /*projectorTexture*/) {}
|
||||
|
||||
//! Retrieves configured cubemap resolution for generation.
|
||||
virtual AZ::u32 GetCubemapResolution() { return 0; }
|
||||
//! Sets cubemap resolution for generation. See LightConfiguration::ResolutionSetting for options.
|
||||
virtual void SetCubemapResolution(AZ::u32 /*resolution*/) = 0;
|
||||
|
||||
//! Retrieves Configuration
|
||||
virtual const LightConfiguration& GetConfiguration() const = 0;
|
||||
|
||||
//! get if it's customized cubemap
|
||||
virtual bool UseCustomizedCubemap() const { return false; }
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Modifiers - these must match the same virtual methods in LightComponentRequests
|
||||
|
||||
// General Light Settings
|
||||
virtual void SetVisible(bool /*isVisible*/) {}
|
||||
virtual bool GetVisible() { return true; }
|
||||
|
||||
// Turned on by default?
|
||||
virtual void SetOnInitially(bool /*onInitially*/) {}
|
||||
virtual bool GetOnInitially() { return true; }
|
||||
|
||||
virtual void SetColor(const AZ::Color& /*newColor*/) {}
|
||||
virtual const AZ::Color GetColor() { return AZ::Color::CreateOne(); }
|
||||
|
||||
virtual void SetDiffuseMultiplier(float /*newMultiplier*/) {}
|
||||
virtual float GetDiffuseMultiplier() { return FLT_MAX; }
|
||||
|
||||
virtual void SetSpecularMultiplier(float /*newMultiplier*/) {}
|
||||
virtual float GetSpecularMultiplier() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAmbient(bool /*isAmbient*/) {}
|
||||
virtual bool GetAmbient() { return true; }
|
||||
|
||||
virtual void SetIndoorOnly(bool /*indoorOnly*/) {}
|
||||
virtual bool GetIndoorOnly() { return false; }
|
||||
|
||||
virtual void SetCastShadowSpec(AZ::u32 /*castShadowSpec*/) {}
|
||||
virtual AZ::u32 GetCastShadowSpec() { return 0; }
|
||||
|
||||
virtual void SetViewDistanceMultiplier(float /*viewDistanceMultiplier*/) {}
|
||||
virtual float GetViewDistanceMultiplier() { return 0.0f; }
|
||||
|
||||
virtual void SetVolumetricFog(bool /*volumetricFog*/) {}
|
||||
virtual bool GetVolumetricFog() { return false; }
|
||||
|
||||
virtual void SetVolumetricFogOnly(bool /*volumetricFogOnly*/) {}
|
||||
virtual bool GetVolumetricFogOnly() { return false; }
|
||||
|
||||
virtual void SetUseVisAreas(bool /*useVisAreas*/) {}
|
||||
virtual bool GetUseVisAreas() { return false; }
|
||||
|
||||
virtual void SetAffectsThisAreaOnly(bool /*affectsThisAreaOnly*/) {}
|
||||
virtual bool GetAffectsThisAreaOnly() { return false; }
|
||||
|
||||
// Point Light Specific Modifiers
|
||||
virtual void SetPointMaxDistance(float /*newMaxDistance*/) {}
|
||||
virtual float GetPointMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetPointAttenuationBulbSize(float /*newAttenuationBulbSize*/) {}
|
||||
virtual float GetPointAttenuationBulbSize() { return FLT_MAX; }
|
||||
|
||||
// Area Light Specific Modifiers
|
||||
virtual void SetAreaMaxDistance(float /*newMaxDistance*/) {}
|
||||
virtual float GetAreaMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaWidth(float /*newWidth*/) {}
|
||||
virtual float GetAreaWidth() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaHeight(float /*newHeight*/) {}
|
||||
virtual float GetAreaHeight() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaFOV(float /*newFOV*/) {}
|
||||
virtual float GetAreaFOV() { return FLT_MAX; }
|
||||
|
||||
// Project Light Specific Modifiers
|
||||
virtual void SetProjectorMaxDistance(float /*newMaxDistance*/) {}
|
||||
virtual float GetProjectorMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorAttenuationBulbSize(float /*newAttenuationBulbSize*/) {}
|
||||
virtual float GetProjectorAttenuationBulbSize() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorFOV(float /*newFOV*/) {}
|
||||
virtual float GetProjectorFOV() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorNearPlane(float /*newNearPlane*/) {}
|
||||
virtual float GetProjectorNearPlane() { return FLT_MAX; }
|
||||
|
||||
// Environment Probe Settings
|
||||
virtual void SetProbeAreaDimensions(const AZ::Vector3& newDimensions) { (void)newDimensions; }
|
||||
virtual const AZ::Vector3 GetProbeAreaDimensions() { return AZ::Vector3::CreateOne(); }
|
||||
|
||||
virtual void SetProbeSortPriority(AZ::u32 newPriority) { (void)newPriority; }
|
||||
virtual AZ::u32 GetProbeSortPriority() { return 0; }
|
||||
|
||||
virtual void SetProbeBoxProjected(bool isProbeBoxProjected) { (void)isProbeBoxProjected; }
|
||||
virtual bool GetProbeBoxProjected() { return false; }
|
||||
|
||||
virtual void SetProbeBoxHeight(float newHeight) { (void)newHeight; }
|
||||
virtual float GetProbeBoxHeight() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeBoxLength(float newLength) { (void)newLength; }
|
||||
virtual float GetProbeBoxLength() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeBoxWidth(float newWidth) { (void)newWidth; }
|
||||
virtual float GetProbeBoxWidth() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeAttenuationFalloff(float newAttenuationFalloff) { (void)newAttenuationFalloff; }
|
||||
virtual float GetProbeAttenuationFalloff() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeFade(float fade) { (void)fade; }
|
||||
virtual float GetProbeFade() { return 1.0f; }
|
||||
|
||||
// Environment Light Specific Modifiers (probes)
|
||||
virtual void SetProbeArea(const AZ::Vector3& /*probeArea*/) {}
|
||||
virtual AZ::Vector3 GetProbeArea() { return AZ::Vector3::CreateZero(); }
|
||||
|
||||
virtual void SetAttenuationFalloffMax(float /*attenFalloffMax*/) {}
|
||||
virtual float GetAttenuationFalloffMax() { return 0; }
|
||||
|
||||
virtual void SetBoxHeight(float /*boxHeight*/) {}
|
||||
virtual float GetBoxHeight() { return 0.0f; }
|
||||
|
||||
virtual void SetBoxWidth(float /*boxWidth*/) {}
|
||||
virtual float GetBoxWidth() { return 0.0f; }
|
||||
|
||||
virtual void SetBoxLength(float /*boxLength*/) {}
|
||||
virtual float GetBoxLength() { return 0.0f; }
|
||||
|
||||
virtual void SetBoxProjected(bool /*boxProjected*/) {}
|
||||
virtual bool GetBoxProjected() { return false; }
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Shadow parameters
|
||||
virtual void SetShadowBias(float /*shadowBias*/) {}
|
||||
virtual float GetShadowBias() { return 0.0f; }
|
||||
|
||||
virtual void SetShadowSlopeBias(float /*shadowSlopeBias*/) {}
|
||||
virtual float GetShadowSlopeBias() { return 0.0f; }
|
||||
|
||||
virtual void SetShadowResScale(float /*shadowResScale*/) {}
|
||||
virtual float GetShadowResScale() { return 0.0f; }
|
||||
|
||||
virtual void SetShadowUpdateMinRadius(float /*shadowUpdateMinRadius*/) {}
|
||||
virtual float GetShadowUpdateMinRadius() { return 0.0f; }
|
||||
|
||||
virtual void SetShadowUpdateRatio(float /*shadowUpdateRatio*/) {}
|
||||
virtual float GetShadowUpdateRatio() { return 0.0f; }
|
||||
|
||||
// Animation parameters
|
||||
virtual void SetAnimIndex(AZ::u32 /*animIndex*/) {}
|
||||
virtual AZ::u32 GetAnimIndex() { return 0; }
|
||||
|
||||
virtual void SetAnimSpeed(float /*animSpeed*/) {}
|
||||
virtual float GetAnimSpeed() { return 0.0f; }
|
||||
|
||||
virtual void SetAnimPhase(float /*animPhase*/) {}
|
||||
virtual float GetAnimPhase() { return 0.0f; }
|
||||
};
|
||||
|
||||
using EditorLightComponentRequestBus = AZ::EBus<EditorLightComponentRequests>;
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Math/Aabb.h>
|
||||
#include <LmbrCentral/Rendering/MeshAsset.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
/*!
|
||||
* Messages for handling SVOGI registration.
|
||||
*/
|
||||
class GiRegistration
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// EBusTraits overrides
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
// static const bool LocklessDispatch = true
|
||||
|
||||
//Upsert will unpack the mesh, transform, world aabb and material and upsert to the gi system.
|
||||
//If something is already registered on this entityId it will be removed then reinserted.
|
||||
virtual void UpsertToGi(AZ::EntityId entityId, AZ::Transform transform, AZ::Aabb worldAabb,
|
||||
AZ::Data::Asset<MeshAsset> meshAsset, _smart_ptr<IMaterial> material) = 0;
|
||||
//Remove will remove any data associated with the entityId.
|
||||
virtual void RemoveFromGi(AZ::EntityId entityId) = 0;
|
||||
};
|
||||
|
||||
using GiRegistrationBus = AZ::EBus<GiRegistration>;
|
||||
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
class LensFlareAsset
|
||||
: public AZ::Data::AssetData
|
||||
{
|
||||
friend class LensFlareAssetHandler;
|
||||
|
||||
public:
|
||||
AZ_RTTI(LensFlareAsset, "{CF44D1F0-F178-4A3D-A9E6-D44721F50C20}", AZ::Data::AssetData);
|
||||
AZ_CLASS_ALLOCATOR(LensFlareAsset, AZ::SystemAllocator, 0);
|
||||
|
||||
const AZStd::vector<AZStd::string>& GetPaths() { return m_flarePaths; }
|
||||
|
||||
private:
|
||||
void AddPath(AZStd::string&& newPath) { m_flarePaths.emplace_back(std::move(newPath)); }
|
||||
|
||||
AZStd::vector<AZStd::string> m_flarePaths;
|
||||
};
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,164 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
#include <AzCore/Component/ComponentBus.h>
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
class LightConfiguration;
|
||||
|
||||
/*!
|
||||
* LightComponentRequestBus
|
||||
* Messages serviced by the light component.
|
||||
*/
|
||||
class LightComponentRequests
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
enum class State
|
||||
{
|
||||
Off = 0,
|
||||
On,
|
||||
};
|
||||
|
||||
virtual ~LightComponentRequests() {}
|
||||
|
||||
//! Control light state.
|
||||
virtual void SetLightState([[maybe_unused]] State state) {}
|
||||
|
||||
//! Turns light on. Returns true if the light was successfully turned on
|
||||
virtual bool TurnOnLight() { return false; }
|
||||
|
||||
//! Turns light off. Returns true if the light was successfully turned off
|
||||
virtual bool TurnOffLight() { return false; }
|
||||
|
||||
//! Toggles light state.
|
||||
virtual void ToggleLight() {}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Modifiers - these must match the same virutal methods in LightComponentEditorRequests
|
||||
|
||||
// General Settings Modifiers
|
||||
virtual void SetVisible(bool isVisible) { (void)isVisible; }
|
||||
virtual bool GetVisible() { return true; }
|
||||
|
||||
virtual void SetColor(const AZ::Color& newColor) { (void)newColor; };
|
||||
virtual const AZ::Color GetColor() { return AZ::Color::CreateOne(); }
|
||||
|
||||
virtual void SetDiffuseMultiplier(float newMultiplier) { (void)newMultiplier; };
|
||||
virtual float GetDiffuseMultiplier() { return FLT_MAX; }
|
||||
|
||||
virtual void SetSpecularMultiplier(float newMultiplier) { (void)newMultiplier; };
|
||||
virtual float GetSpecularMultiplier() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAmbient(bool isAmbient) { (void)isAmbient; }
|
||||
virtual bool GetAmbient() { return true; }
|
||||
|
||||
// Point Light Specific Modifiers
|
||||
virtual void SetPointMaxDistance(float newMaxDistance) { (void)newMaxDistance; };
|
||||
virtual float GetPointMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetPointAttenuationBulbSize(float newAttenuationBulbSize) { (void)newAttenuationBulbSize; };
|
||||
virtual float GetPointAttenuationBulbSize() { return FLT_MAX; }
|
||||
|
||||
// Area Light Specific Modifiers
|
||||
virtual void SetAreaMaxDistance(float newMaxDistance) { (void)newMaxDistance; };
|
||||
virtual float GetAreaMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaWidth(float newWidth) { (void)newWidth; };
|
||||
virtual float GetAreaWidth() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaHeight(float newHeight) { (void)newHeight; };
|
||||
virtual float GetAreaHeight() { return FLT_MAX; }
|
||||
|
||||
virtual void SetAreaFOV(float newFOV) { (void)newFOV; };
|
||||
virtual float GetAreaFOV() { return FLT_MAX; }
|
||||
|
||||
// Project Light Specific Modifiers
|
||||
virtual void SetProjectorMaxDistance(float newMaxDistance) { (void)newMaxDistance; };
|
||||
virtual float GetProjectorMaxDistance() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorAttenuationBulbSize(float newAttenuationBulbSize) { (void)newAttenuationBulbSize; };
|
||||
virtual float GetProjectorAttenuationBulbSize() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorFOV(float newFOV) { (void)newFOV; };
|
||||
virtual float GetProjectorFOV() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProjectorNearPlane(float newNearPlane) { (void)newNearPlane; };
|
||||
virtual float GetProjectorNearPlane() { return FLT_MAX; }
|
||||
|
||||
// Environment Probe Settings
|
||||
virtual void SetProbeAreaDimensions(const AZ::Vector3& newDimensions) { (void)newDimensions; }
|
||||
virtual const AZ::Vector3 GetProbeAreaDimensions() { return AZ::Vector3::CreateOne(); }
|
||||
|
||||
virtual void SetProbeSortPriority(AZ::u32 newPriority) { (void)newPriority; }
|
||||
virtual AZ::u32 GetProbeSortPriority() { return 0; }
|
||||
|
||||
virtual void SetProbeBoxProjected(bool isProbeBoxProjected) { (void)isProbeBoxProjected; }
|
||||
virtual bool GetProbeBoxProjected() { return false; }
|
||||
|
||||
virtual void SetProbeBoxHeight(float newHeight) { (void)newHeight; }
|
||||
virtual float GetProbeBoxHeight() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeBoxLength(float newLength) { (void)newLength; }
|
||||
virtual float GetProbeBoxLength() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeBoxWidth(float newWidth) { (void)newWidth; }
|
||||
virtual float GetProbeBoxWidth() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeAttenuationFalloff(float newAttenuationFalloff) { (void)newAttenuationFalloff; }
|
||||
virtual float GetProbeAttenuationFalloff() { return FLT_MAX; }
|
||||
|
||||
virtual void SetProbeFade(float fade) { (void)fade; }
|
||||
virtual float GetProbeFade() { return 1.0f; }
|
||||
////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
using LightComponentRequestBus = AZ::EBus<LightComponentRequests>;
|
||||
|
||||
/*!
|
||||
* LightComponentNotificationBus
|
||||
* Events dispatched by the light component.
|
||||
*/
|
||||
class LightComponentNotifications
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~LightComponentNotifications() {}
|
||||
|
||||
// Sent when the light is turned on.
|
||||
virtual void LightTurnedOn() {}
|
||||
|
||||
// Sent when the light is turned off.
|
||||
virtual void LightTurnedOff() {}
|
||||
};
|
||||
|
||||
using LightComponentNotificationBus = AZ::EBus < LightComponentNotifications >;
|
||||
|
||||
/*!
|
||||
* LightSettingsNotifications
|
||||
* Events dispatched by the light component or light component editor when settings have changed.
|
||||
*/
|
||||
class LightSettingsNotifications
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~LightSettingsNotifications() {}
|
||||
|
||||
virtual void AnimationSettingsChanged() = 0;
|
||||
};
|
||||
|
||||
using LightSettingsNotificationsBus = AZ::EBus < LightSettingsNotifications >;
|
||||
|
||||
} // namespace LmbrCentral
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
|
||||
struct IMaterial;
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class BehaviorContext;
|
||||
}
|
||||
namespace LmbrCentral
|
||||
{
|
||||
//! Wraps a IMaterial pointer in a way that BehaviorContext can use it
|
||||
class MaterialHandle
|
||||
{
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(MaterialHandle, AZ::SystemAllocator, 0);
|
||||
AZ_TYPE_INFO(MaterialHandle, "{BF659DC6-ACDD-4062-A52E-4EC053286F4F}");
|
||||
|
||||
MaterialHandle()
|
||||
{
|
||||
}
|
||||
|
||||
MaterialHandle(const MaterialHandle& handle)
|
||||
: m_material(handle.m_material)
|
||||
{
|
||||
}
|
||||
|
||||
~MaterialHandle()
|
||||
{
|
||||
}
|
||||
|
||||
MaterialHandle& operator=(const MaterialHandle& rhs)
|
||||
{
|
||||
m_material = rhs.m_material;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IMaterial* m_material;
|
||||
|
||||
static void Reflect(AZ::BehaviorContext* behaviorContext);
|
||||
static void Reflect(AZ::SerializeContext* serializeContext);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/ComponentBus.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/std/containers/set.h>
|
||||
|
||||
struct IRenderMesh;
|
||||
|
||||
namespace LmbrCentral
|
||||
{
|
||||
/*
|
||||
* MeshModificationRequestBus
|
||||
* Requests for a render mesh to be sent for editing.
|
||||
*/
|
||||
class MeshModificationRequests
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void RequireSendingRenderMeshForModification(size_t lodIndex, size_t primitiveIndex) = 0;
|
||||
|
||||
virtual void StopSendingRenderMeshForModification(size_t lodIndex, size_t primitiveIndex) = 0;
|
||||
|
||||
protected:
|
||||
~MeshModificationRequests() = default;
|
||||
};
|
||||
|
||||
using MeshModificationRequestBus = AZ::EBus<MeshModificationRequests>;
|
||||
|
||||
/*
|
||||
* MeshModificationRequestHelper
|
||||
* Helper class to manage storing indices for the render meshes to edit.
|
||||
*/
|
||||
class MeshModificationRequestHelper
|
||||
: public MeshModificationRequestBus::Handler
|
||||
, public AZ::TickBus::Handler
|
||||
{
|
||||
public:
|
||||
struct MeshLODPrimIndex
|
||||
{
|
||||
size_t lodIndex;
|
||||
size_t primitiveIndex;
|
||||
|
||||
bool operator<(const MeshLODPrimIndex& right) const
|
||||
{
|
||||
return (lodIndex < right.lodIndex)
|
||||
|| (lodIndex == right.lodIndex && primitiveIndex < right.primitiveIndex);
|
||||
}
|
||||
};
|
||||
|
||||
void Connect(MeshModificationRequestBus::BusIdType busId)
|
||||
{
|
||||
MeshModificationRequestBus::Handler::BusConnect(busId);
|
||||
AZ::TickBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
bool IsConnected()
|
||||
{
|
||||
return MeshModificationRequestBus::Handler::BusIsConnected();
|
||||
}
|
||||
|
||||
void Disconnect()
|
||||
{
|
||||
AZ::TickBus::Handler::BusDisconnect();
|
||||
MeshModificationRequestBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
void RequireSendingRenderMeshForModification(size_t lodIndex, size_t primitiveIndex) override
|
||||
{
|
||||
m_meshesToSendForEditing.insert({ lodIndex, primitiveIndex });
|
||||
}
|
||||
|
||||
void StopSendingRenderMeshForModification(size_t lodIndex, size_t primitiveIndex) override
|
||||
{
|
||||
m_meshesToSendForEditing.erase({ lodIndex, primitiveIndex });
|
||||
}
|
||||
|
||||
const AZStd::set<MeshLODPrimIndex>& MeshesToEdit() const
|
||||
{
|
||||
return m_meshesToSendForEditing;
|
||||
}
|
||||
|
||||
bool GetMeshModified() const
|
||||
{
|
||||
return m_meshModified;
|
||||
}
|
||||
|
||||
void SetMeshModified(bool value)
|
||||
{
|
||||
m_meshModified = value;
|
||||
}
|
||||
|
||||
private:
|
||||
void OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) override
|
||||
{
|
||||
m_meshModified = false;
|
||||
}
|
||||
|
||||
int GetTickOrder() override
|
||||
{
|
||||
return AZ::TICK_PRE_RENDER;
|
||||
}
|
||||
|
||||
AZStd::set<MeshLODPrimIndex> m_meshesToSendForEditing;
|
||||
bool m_meshModified = false;
|
||||
};
|
||||
|
||||
/*
|
||||
* MeshModificationNotificationBus
|
||||
* Sends an event when the render mesh data should be edited.
|
||||
*/
|
||||
class MeshModificationNotifications
|
||||
: public AZ::ComponentBus
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::mutex;
|
||||
|
||||
virtual void ModifyMesh([[maybe_unused]] size_t lodIndex, [[maybe_unused]] size_t primitiveIndex, [[maybe_unused]] IRenderMesh* renderMesh) {}
|
||||
|
||||
protected:
|
||||
~MeshModificationNotifications() = default;
|
||||
};
|
||||
|
||||
using MeshModificationNotificationBus = AZ::EBus<MeshModificationNotifications>;
|
||||
}// namespace LmbrCentral
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
set(FILES
|
||||
include/LmbrCentral/Rendering/EditorCameraCorrectionBus.h
|
||||
include/LmbrCentral/Rendering/EditorLightComponentBus.h
|
||||
include/LmbrCentral/Shape/EditorPolygonPrismShapeComponentBus.h
|
||||
include/LmbrCentral/Shape/EditorSplineComponentBus.h
|
||||
include/LmbrCentral/Shape/EditorTubeShapeComponentBus.h
|
||||
|
||||
@@ -27,13 +27,8 @@ set(FILES
|
||||
include/LmbrCentral/Dependency/DependencyMonitor.h
|
||||
include/LmbrCentral/Dependency/DependencyMonitor.inl
|
||||
include/LmbrCentral/Dependency/DependencyNotificationBus.h
|
||||
include/LmbrCentral/Rendering/DecalComponentBus.h
|
||||
include/LmbrCentral/Rendering/LightComponentBus.h
|
||||
include/LmbrCentral/Rendering/MaterialAsset.h
|
||||
include/LmbrCentral/Rendering/MaterialHandle.h
|
||||
include/LmbrCentral/Rendering/MeshAsset.h
|
||||
include/LmbrCentral/Rendering/MeshModificationBus.h
|
||||
include/LmbrCentral/Rendering/GiRegistrationBus.h
|
||||
include/LmbrCentral/Rendering/RenderBoundsBus.h
|
||||
include/LmbrCentral/Scripting/EditorTagComponentBus.h
|
||||
include/LmbrCentral/Scripting/GameplayNotificationBus.h
|
||||
|
||||
Reference in New Issue
Block a user