54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <XCEngine/Core/Math/Vector3.h>
|
|
#include <XCEngine/Rendering/FrameData/RenderCameraData.h>
|
|
#include <XCEngine/Rendering/FrameData/VisibleRenderItem.h>
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace XCEngine {
|
|
namespace Components {
|
|
class CameraComponent;
|
|
class GameObject;
|
|
class LightComponent;
|
|
class Scene;
|
|
} // namespace Components
|
|
|
|
namespace Rendering {
|
|
|
|
RenderCameraData BuildRenderCameraData(
|
|
const Components::CameraComponent& camera,
|
|
uint32_t viewportWidth,
|
|
uint32_t viewportHeight);
|
|
|
|
void AppendRenderItemsForGameObject(
|
|
Components::GameObject& gameObject,
|
|
const Math::Vector3& cameraPosition,
|
|
std::vector<VisibleRenderItem>& outVisibleItems);
|
|
|
|
bool CompareVisibleRenderItemsStable(
|
|
const VisibleRenderItem& lhs,
|
|
const VisibleRenderItem& rhs);
|
|
|
|
std::vector<VisibleRenderItem> CollectRenderItemsForEntityIds(
|
|
const Components::Scene& scene,
|
|
const std::vector<uint64_t>& entityIds,
|
|
const Math::Vector3& cameraPosition);
|
|
|
|
bool IsUsableLight(const Components::LightComponent* light);
|
|
|
|
bool IsLightVisibleForCullingMask(
|
|
const Components::LightComponent& light,
|
|
uint32_t cullingMask);
|
|
|
|
Math::Vector3 BuildRenderLightDirection(
|
|
const Components::LightComponent& light);
|
|
|
|
Components::LightComponent* FindMainDirectionalLight(
|
|
const Components::Scene& scene,
|
|
uint32_t cullingMask = 0xFFFFFFFFu);
|
|
|
|
} // namespace Rendering
|
|
} // namespace XCEngine
|