Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
ToyMaker::LightRenderUnit Struct Reference

Contains the model matrix, mesh, and light emission for a single light object being rendered this frame. More...

#include <render_stage.hpp>

Public Member Functions

 LightRenderUnit (std::shared_ptr< StaticMesh > meshHandle, const LightEmissionData &lightEmissionData, const glm::mat4 &modelMatrix)
 Constructs a new Light Render Unit object.
 
bool operator< (const LightRenderUnit &other) const
 Compares one light unit with another based on its sort key.
 
void setSortKey ()
 Sets the sort key for this object based on its mesh.
 

Public Attributes

std::uint32_t mSortKey {}
 The sort key for this light unit, based on its mesh.
 
std::shared_ptr< StaticMeshmMeshHandle
 The mesh representing the lighting volume for this light.
 
glm::mat4 mModelMatrix
 The matrix which places this renderable light into the scene.
 
LightEmissionData mLightAttributes
 The emissive properties for this light.
 

Detailed Description

Contains the model matrix, mesh, and light emission for a single light object being rendered this frame.

Constructor & Destructor Documentation

◆ LightRenderUnit()

ToyMaker::LightRenderUnit::LightRenderUnit ( std::shared_ptr< StaticMesh > meshHandle,
const LightEmissionData & lightEmissionData,
const glm::mat4 & modelMatrix )
inline

Constructs a new Light Render Unit object.

Parameters
meshHandleThe mesh representing this light's volume.
lightEmissionDataThe emissive properties of this light.
modelMatrixThe matrix which correctly places the light in the scene.

Member Function Documentation

◆ operator<()

bool ToyMaker::LightRenderUnit::operator< ( const LightRenderUnit & other) const
inline

Compares one light unit with another based on its sort key.

Parameters
otherThe light unit this one is being compared to.
Return values
trueThis unit has a lower sort key than the other;
falseThis unit does not have a lower sort key than the other;

The documentation for this struct was generated from the following file: