Files
o3de/Gems/SceneLoggingExample/Code/Processors/ExportTrackingProcessor.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

54 lines
1.7 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
*
*/
#pragma once
#include <AzCore/std/string/string.h>
#include <SceneAPI/SceneCore/Components/ExportingComponent.h>
#include <SceneAPI/SceneCore/Events/ExportEventContext.h>
namespace AZ
{
namespace SceneAPI
{
namespace Containers
{
class Scene;
class SceneGraph;
class SceneManifest;
}
}
}
namespace SceneLoggingExample
{
// The ExportTrackingProcessor class demonstrates how to use the ExportingComponent to listen to scene export events.
// It also shows how to collect data from a graph by traversing the graph in a hierarchical way.
class ExportTrackingProcessor
: public AZ::SceneAPI::SceneCore::ExportingComponent
{
public:
AZ_COMPONENT(ExportTrackingProcessor, "{EAD9C07A-60D5-4E48-8465-72034D326368}", AZ::SceneAPI::SceneCore::ExportingComponent);
ExportTrackingProcessor();
~ExportTrackingProcessor() override = default;
static void Reflect(AZ::ReflectContext* context);
protected:
AZ::SceneAPI::Events::ProcessingResult PrepareForExport(AZ::SceneAPI::Events::PreExportEventContext& context);
AZ::SceneAPI::Events::ProcessingResult ContextCallback(AZ::SceneAPI::Events::ICallContext& context);
uint8_t GetPriority() const override;
void LogGraph(const AZ::SceneAPI::Containers::SceneGraph& graph, const AZStd::string& nodePath) const;
const AZ::SceneAPI::Containers::SceneManifest* m_manifest = nullptr;
};
} // namespace SceneLoggingExample