setter for culling mask

This commit is contained in:
Brandon Mak 2022-10-28 14:10:08 +08:00
parent 5ab2ebbff4
commit baa77e5d37
2 changed files with 20 additions and 14 deletions

View File

@ -47,7 +47,7 @@ namespace SHADE
MakeDirty();
}
void SHLightComponent::ModifyLayer(uint8_t layerIndex, bool value) noexcept
void SHLightComponent::ModifyCullingMask(uint8_t layerIndex, bool value) noexcept
{
if (value)
lightData.cullingMask |= (1u << layerIndex);
@ -58,6 +58,11 @@ namespace SHADE
}
void SHLightComponent::SetCullingMask(uint32_t value) noexcept
{
lightData.cullingMask = value;
}
void SHLightComponent::SetAllLayers(void) noexcept
{
lightData.cullingMask = std::numeric_limits<uint32_t>::max();

View File

@ -35,19 +35,20 @@ namespace SHADE
/*-----------------------------------------------------------------------*/
/* SETTERS AND GETTERS */
/*-----------------------------------------------------------------------*/
void SetPosition (SHVec3 position) noexcept; // serialized
void SetType (SH_LIGHT_TYPE type) noexcept; // serialized
void SetDirection (SHVec3 direction) noexcept; // serialized
void SetColor (SHVec4 color) noexcept; // serialized
void ModifyLayer (uint8_t layerIndex, bool value) noexcept; // serialized
void SetAllLayers (void) noexcept; // serialized
void ClearAllLayers (void) noexcept; // serialized
void MakeDirty (void) noexcept;
void ClearDirtyFlag (void) noexcept;
void Unbind (void) noexcept;
void SetBound (uint32_t inIndexInBuffer) noexcept;
void SetActive (bool flag) noexcept; // serialized
void SetStrength (float value) noexcept; // serialized
void SetPosition (SHVec3 position) noexcept; // serialized
void SetType (SH_LIGHT_TYPE type) noexcept; // serialized
void SetDirection (SHVec3 direction) noexcept; // serialized
void SetColor (SHVec4 color) noexcept; // serialized
void ModifyCullingMask (uint8_t layerIndex, bool value) noexcept; // serialized
void SetCullingMask (uint32_t value) noexcept;
void SetAllLayers (void) noexcept; // serialized
void ClearAllLayers (void) noexcept; // serialized
void MakeDirty (void) noexcept;
void ClearDirtyFlag (void) noexcept;
void Unbind (void) noexcept;
void SetBound (uint32_t inIndexInBuffer) noexcept;
void SetActive (bool flag) noexcept; // serialized
void SetStrength (float value) noexcept; // serialized
SHLightData const& GetLightData (void) const noexcept;