Files
o3de/Gems/WhiteBox/Code/Include/WhiteBox/WhiteBoxBus.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

41 lines
1.4 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/EBus/EBus.h>
#include <AzCore/std/smart_ptr/unique_ptr.h>
namespace WhiteBox
{
class RenderMeshInterface;
//! Function object alias for creating a RenderMeshInterface.
//! @note Used by SetRenderMeshInterfaceBuilder in WhiteBoxRequests.
using RenderMeshInterfaceBuilderFn = AZStd::function<AZStd::unique_ptr<RenderMeshInterface>()>;
//! White Box system level requests.
class WhiteBoxRequests : public AZ::EBusTraits
{
public:
// EBusTraits overrides ...
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
//! Create a render mesh for use with white box data.
virtual AZStd::unique_ptr<RenderMeshInterface> CreateRenderMeshInterface() = 0;
//! Control what concrete implementation of RenderMeshInterface CreateRenderMeshInterface returns.
virtual void SetRenderMeshInterfaceBuilder(RenderMeshInterfaceBuilderFn builder) = 0;
protected:
~WhiteBoxRequests() = default;
};
using WhiteBoxRequestBus = AZ::EBus<WhiteBoxRequests>;
} // namespace WhiteBox