Files
o3de/Gems/WhiteBox/Code/Source/WhiteBoxComponent.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

56 lines
1.8 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 "Rendering/WhiteBoxRenderData.h"
#include "WhiteBox/WhiteBoxComponentBus.h"
#include <AzCore/Component/Component.h>
#include <AzCore/Component/TransformBus.h>
#include <AzCore/Math/Transform.h>
namespace WhiteBox
{
class RenderMeshInterface;
//! Runtime representation of White Box.
class WhiteBoxComponent
: public AZ::Component
, public WhiteBoxComponentRequestBus::Handler
, private AZ::TransformNotificationBus::Handler
{
public:
AZ_COMPONENT(WhiteBoxComponent, "{6CFD4D82-FA68-4C18-BE67-43FC2B755B64}", AZ::Component)
static void Reflect(AZ::ReflectContext* context);
WhiteBoxComponent();
WhiteBoxComponent(const WhiteBoxComponent&) = delete;
WhiteBoxComponent& operator=(const WhiteBoxComponent&) = delete;
WhiteBoxComponent(WhiteBoxComponent&&) = default;
WhiteBoxComponent& operator=(WhiteBoxComponent&&) = default;
~WhiteBoxComponent();
// WhiteBoxComponentRequestBus ...
bool WhiteBoxIsVisible() const override;
void GenerateWhiteBoxMesh(const WhiteBoxRenderData& whiteBoxRenderData);
private:
// AZ::Component ...
void Activate() override;
void Deactivate() override;
// TransformNotificationBus ...
void OnTransformChanged(const AZ::Transform& local, const AZ::Transform& world) override;
WhiteBoxRenderData m_whiteBoxRenderData; //!< Intermediate format to store White Box render data.
AZStd::unique_ptr<RenderMeshInterface> m_renderMesh; //!< The render mesh to use for White Box rendering.
};
} // namespace WhiteBox