Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvEditor::Core::EditorRenderer Class Reference

#include <EditorRenderer.h>

Public Member Functions

 EditorRenderer (Context &p_context)
 
void InitMaterials ()
 
void PreparePickingMaterial (OvCore::ECS::Actor &p_actor)
 
OvMaths::FMatrix4 CalculateCameraModelMatrix (OvCore::ECS::Actor &p_actor)
 
void RenderScene (const OvMaths::FVector3 &p_cameraPosition, const OvRendering::LowRenderer::Camera &p_camera, const OvRendering::Data::Frustum *p_customFrustum=nullptr)
 
void RenderSceneForActorPicking ()
 
void RenderUI ()
 
void RenderCameras ()
 
void RenderGizmo (const OvMaths::FVector3 &p_position, const OvMaths::FQuaternion &p_rotation, OvEditor::Core::EGizmoOperation p_operation, bool p_pickable=false)
 
void RenderModelToStencil (const OvMaths::FMatrix4 &p_worldMatrix, OvRendering::Resources::Model &p_model)
 
void RenderModelOutline (const OvMaths::FMatrix4 &p_worldMatrix, OvRendering::Resources::Model &p_model)
 
void RenderActorAsSelected (OvCore::ECS::Actor &p_actor, bool p_toStencil)
 
void RenderCameraFrustum (OvCore::ECS::Components::CCamera &p_camera)
 
void RenderActorCollider (OvCore::ECS::Actor &p_actor)
 
void RenderLightBounds (OvCore::ECS::Components::CLight &p_light)
 
void RenderAmbientBoxVolume (OvCore::ECS::Components::CAmbientBoxLight &p_ambientBoxLight)
 
void RenderAmbientSphereVolume (OvCore::ECS::Components::CAmbientSphereLight &p_ambientSphereLight)
 
void RenderBoundingSpheres (OvCore::ECS::Components::CModelRenderer &p_modelRenderer)
 
void RenderModelAsset (OvRendering::Resources::Model &p_model)
 
void RenderTextureAsset (OvRendering::Resources::Texture &p_texture)
 
void RenderMaterialAsset (OvCore::Resources::Material &p_material)
 
void RenderGrid (const OvMaths::FVector3 &p_viewPos, const OvMaths::FVector3 &p_color)
 
void UpdateLights (OvCore::SceneSystem::Scene &p_scene)
 
void UpdateLightsInFrustum (OvCore::SceneSystem::Scene &p_scene, const OvRendering::Data::Frustum &p_frustum)
 

Detailed Description

Handle the rendering of the editor

Constructor & Destructor Documentation

◆ EditorRenderer()

OvEditor::Core::EditorRenderer::EditorRenderer ( Context p_context)

Create the EditorRenderer

Parameters
p_context

Member Function Documentation

◆ CalculateCameraModelMatrix()

OvMaths::FMatrix4 OvEditor::Core::EditorRenderer::CalculateCameraModelMatrix ( OvCore::ECS::Actor p_actor)

Calculate the model matrix for a camera attached to the given actor

Parameters
p_actor

◆ InitMaterials()

void OvEditor::Core::EditorRenderer::InitMaterials ( )

Initialize custom materials

◆ PreparePickingMaterial()

void OvEditor::Core::EditorRenderer::PreparePickingMaterial ( OvCore::ECS::Actor p_actor)

Prepare the picking material by send it the color corresponding to the given actor

Parameters
p_actor

◆ RenderActorAsSelected()

void OvEditor::Core::EditorRenderer::RenderActorAsSelected ( OvCore::ECS::Actor p_actor,
bool  p_toStencil 
)

Render the actor as a selected actor (Outline)

Parameters
p_actor
p_toStencil

◆ RenderActorCollider()

void OvEditor::Core::EditorRenderer::RenderActorCollider ( OvCore::ECS::Actor p_actor)

Render an actor collider

◆ RenderAmbientBoxVolume()

void OvEditor::Core::EditorRenderer::RenderAmbientBoxVolume ( OvCore::ECS::Components::CAmbientBoxLight p_ambientBoxLight)

Render ambient box volume

◆ RenderAmbientSphereVolume()

void OvEditor::Core::EditorRenderer::RenderAmbientSphereVolume ( OvCore::ECS::Components::CAmbientSphereLight p_ambientSphereLight)

Render ambient sphere volume

◆ RenderBoundingSpheres()

void OvEditor::Core::EditorRenderer::RenderBoundingSpheres ( OvCore::ECS::Components::CModelRenderer p_modelRenderer)

Render the the bounding spheres of the given model renderer

◆ RenderCameraFrustum()

void OvEditor::Core::EditorRenderer::RenderCameraFrustum ( OvCore::ECS::Components::CCamera p_camera)

Render the camera frustum

◆ RenderCameras()

void OvEditor::Core::EditorRenderer::RenderCameras ( )

Render every scene cameras

◆ RenderGizmo()

void OvEditor::Core::EditorRenderer::RenderGizmo ( const OvMaths::FVector3 p_position,
const OvMaths::FQuaternion p_rotation,
OvEditor::Core::EGizmoOperation  p_operation,
bool  p_pickable = false 
)

Render a gizmo at position

Parameters
p_position
p_rotation
p_operation
p_pickable(Determine the shader to use to render the gizmo)

◆ RenderGrid()

void OvEditor::Core::EditorRenderer::RenderGrid ( const OvMaths::FVector3 p_viewPos,
const OvMaths::FVector3 p_color 
)

Render the grid

◆ RenderLightBounds()

void OvEditor::Core::EditorRenderer::RenderLightBounds ( OvCore::ECS::Components::CLight p_light)

Render light bounds

◆ RenderMaterialAsset()

void OvEditor::Core::EditorRenderer::RenderMaterialAsset ( OvCore::Resources::Material p_material)

Render material

◆ RenderModelAsset()

void OvEditor::Core::EditorRenderer::RenderModelAsset ( OvRendering::Resources::Model p_model)

Render model

◆ RenderModelOutline()

void OvEditor::Core::EditorRenderer::RenderModelOutline ( const OvMaths::FMatrix4 p_worldMatrix,
OvRendering::Resources::Model p_model 
)

Render a model outline using the data stored in the stencil buffer

◆ RenderModelToStencil()

void OvEditor::Core::EditorRenderer::RenderModelToStencil ( const OvMaths::FMatrix4 p_worldMatrix,
OvRendering::Resources::Model p_model 
)

Render a model to the stencil buffer

◆ RenderScene()

void OvEditor::Core::EditorRenderer::RenderScene ( const OvMaths::FVector3 p_cameraPosition,
const OvRendering::LowRenderer::Camera p_camera,
const OvRendering::Data::Frustum p_customFrustum = nullptr 
)

Render the scene

Parameters
p_cameraPosition
p_camera

◆ RenderSceneForActorPicking()

void OvEditor::Core::EditorRenderer::RenderSceneForActorPicking ( )

Render the scene for actor picking (Unlit version of the scene with colors indicating actor IDs)

◆ RenderTextureAsset()

void OvEditor::Core::EditorRenderer::RenderTextureAsset ( OvRendering::Resources::Texture p_texture)

Render texture

◆ RenderUI()

void OvEditor::Core::EditorRenderer::RenderUI ( )

Render the User Interface

◆ UpdateLights()

void OvEditor::Core::EditorRenderer::UpdateLights ( OvCore::SceneSystem::Scene p_scene)

Update the light SSBO with the current scene

Parameters
p_scene

◆ UpdateLightsInFrustum()

void OvEditor::Core::EditorRenderer::UpdateLightsInFrustum ( OvCore::SceneSystem::Scene p_scene,
const OvRendering::Data::Frustum p_frustum 
)

Update the light SSBO with the current scene (Lights outside of the given frustum are culled)

Parameters
p_scene

The documentation for this class was generated from the following files: