Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Enlighten::RectangleLight::CachedData

    └>Enlighten::InputLightBase

Cached data for rectangle light.

Variables

NameDescription
Geo::v128 m_Colour

Colour.

Geo::v128 m_Direction

Forward direction.

bool m_HasChanged

Whether the light has changed since it was last given to the extended direct lighting api.

Geo::u32 m_HasVisibilityData

Has visibility data?

float m_Height

Height.

const eLightType m_LightType

Type of input light corresponding to an eLightType enum value.

Geo::u64 m_Padding

Unused (this class is usually extended by one that starts with multiple v128s)

Geo::u32 m_PaddingA

Unused padding.

Geo::u32 m_PaddingB

Unused padding.

Geo::u32 m_PaddingC

Unused padding.

Geo::v128 m_Position

Position.

Geo::v128 m_RightDirection

Right direction.

Geo::v128 m_UpDirection

Up direction.

const Geo::u8 * m_VisibilityData

Visibility data.

Geo::u64 m_VisibilityData64

Visibility data.

float m_Width

Width.

Functions

NameDescription
CachedData(const RectangleLight &, const void *)

Constructor.

CalcEdgeContribution(Geo::v128, Geo::v128, Geo::v128, const Geo::v128 &)

Note - the 4th v128 parameter has to be passed as a reference as the vs2008 compiler can't pass more than 3 v128s as values and preserve alignment.

DistanceFilter(float)

Return true if this light affects a system at the specified distance from the viewer.

Hash(Helpers::Hasher &, Geo::u32, Geo::u32)

Hash the light data.

InputLightBase(eLightType)

Constructor.

InputLightBase(eLightType, bool)

Constructor.

IsIntersectingCluster(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Complex light V normalBoundingBox intersection test.

IsIntersectingClusterGroup(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Light v ClusterGroup Bounding box intersection test.

IsIntersectingSystem(const Geo::v128 &, const Geo::v128 &)

Simple Light V system BoundingBox intersection test.

ShadeFourSamples(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, Geo::u32, Geo::v128 &, Geo::v128 &, Geo::v128 &, Geo::v128 &)

Shades the given samples.

ShadePoint(Geo::v128, Geo::v128)

This computes the illumination on samplePos/sampleNormal from the area light description.

ShadeQuad(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, Geo::u32, Geo::u32)

Shades the given quad.

ShadeQuadIntensities(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &, const Geo::v128 &)

Shades the given quads.


Anchor
a1c15eb65447ce53b55805cc58808e492
a1c15eb65447ce53b55805cc58808e492

Enlighten::RectangleLight::CachedData::CachedData

...

public: CachedData
(
    const RectangleLight & rectangleLight,
    const void * perDusterVisibility
)

...

Constructor.


Anchor
ac39a2ef8821c70181f22024f6de382b8
ac39a2ef8821c70181f22024f6de382b8

GEO_CONTROLLED_INLINE float Enlighten::RectangleLight::CachedData::CalcEdgeContribution

...

public: GEO_CONTROLLED_INLINE float CalcEdgeContribution
(
    Geo::v128 v0,
    Geo::v128 v1,
    Geo::v128 samplePos,
    const Geo::v128 & sampleNormal
) const

...

Note - the 4th v128 parameter has to be passed as a reference as the vs2008 compiler can't pass more than 3 v128s as values and preserve alignment.


Anchor
a8c141f069d3b871bbe1903146fb8808d
a8c141f069d3b871bbe1903146fb8808d

GEO_CONTROLLED_INLINE bool Enlighten::InputLightBase::DistanceFilter

...

public: GEO_CONTROLLED_INLINE bool DistanceFilter
(
    float viewDistance
) const

...

Return true if this light affects a system at the specified distance from the viewer.


Anchor
aa4f988f2930ff60be8867598df001036
aa4f988f2930ff60be8867598df001036

void Enlighten::RectangleLight::CachedData::Hash

...

public: void Hash
(
    Helpers::Hasher & hash,
    Geo::u32 clusterVisSize,
    Geo::u32 quadVisSize
)

...

Hash the light data.


Anchor
a1e800e092db44a3676d766c6b1317085
a1e800e092db44a3676d766c6b1317085

Enlighten::InputLightBase::InputLightBase

...

protected: InputLightBase
(
    eLightType lightType
)

...

Constructor.


Anchor
a8f8299daadfb542d3d6821951b936188
a8f8299daadfb542d3d6821951b936188

Enlighten::InputLightBase::InputLightBase

...

protected: InputLightBase
(
    eLightType lightType,
    bool hasChanged
)

...

Constructor.


Anchor
abb1ecc26de8734a18af29302b095728c
abb1ecc26de8734a18af29302b095728c

GEO_CONTROLLED_INLINE bool Enlighten::RectangleLight::CachedData::IsIntersectingCluster

...

public: GEO_CONTROLLED_INLINE bool IsIntersectingCluster
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax,
    const Geo::v128 & minNormalFlipped,
    const Geo::v128 & maxNormalFlipped
) const

...

Complex light V normalBoundingBox intersection test.


Anchor
a59cd5404ad4c92bd2e994a200248c219
a59cd5404ad4c92bd2e994a200248c219

GEO_CONTROLLED_INLINE bool Enlighten::RectangleLight::CachedData::IsIntersectingClusterGroup

...

public: GEO_CONTROLLED_INLINE bool IsIntersectingClusterGroup
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax,
    const Geo::v128 & minNormalFlipped,
    const Geo::v128 & maxNormalFlipped
) const

...

Light v ClusterGroup Bounding box intersection test.


Anchor
a551c5e9eaabe2c16cc50e4cd7927a33d
a551c5e9eaabe2c16cc50e4cd7927a33d

GEO_CONTROLLED_INLINE bool Enlighten::RectangleLight::CachedData::IsIntersectingSystem

...

public: GEO_CONTROLLED_INLINE bool IsIntersectingSystem
(
    const Geo::v128 & bbMin,
    const Geo::v128 & bbMax
) const

...

Simple Light V system BoundingBox intersection test.


Anchor
a9914d459cba378e72739e9b86e2e683d
a9914d459cba378e72739e9b86e2e683d

GEO_CONTROLLED_INLINE void Enlighten::RectangleLight::CachedData::ShadeFourSamples

...

public: GEO_CONTROLLED_INLINE void ShadeFourSamples
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    Geo::u32 sampleIdx,
    Geo::v128 & colourOut0,
    Geo::v128 & colourOut1,
    Geo::v128 & colourOut2,
    Geo::v128 & colourOut3
) const

...

Shades the given samples.


Anchor
a76627456a43ff6aa493ade3c55371de0
a76627456a43ff6aa493ade3c55371de0

GEO_CONTROLLED_INLINE Geo::v128 Enlighten::RectangleLight::CachedData::ShadePoint

...

public: GEO_CONTROLLED_INLINEGeo::v128 ShadePoint
(
    Geo::v128 samplePos,
    Geo::v128 sampleNormal
) const

...

This computes the illumination on samplePos/sampleNormal from the area light description.

It uses a bit of stokes theorem to integrate the area of the rectangle by clipping and integrating around it's contour.


Anchor
a2f247ae15e8d9a5938f0256923466382
a2f247ae15e8d9a5938f0256923466382

GEO_CONTROLLED_INLINE Geo::v128 Enlighten::RectangleLight::CachedData::ShadeQuad

...

public: GEO_CONTROLLED_INLINEGeo::v128 ShadeQuad
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    Geo::u32 clusterIdx,
    Geo::u32 quadIdx
) const

...

Shades the given quad.


Anchor
ac0215a953b7d75f2fadd71ea0a070390
ac0215a953b7d75f2fadd71ea0a070390

GEO_CONTROLLED_INLINE Geo::v128 Enlighten::RectangleLight::CachedData::ShadeQuadIntensities

...

public: GEO_CONTROLLED_INLINEGeo::v128 ShadeQuadIntensities
(
    const Geo::v128 & positionsX,
    const Geo::v128 & positionsY,
    const Geo::v128 & positionsZ,
    const Geo::v128 & normalsX,
    const Geo::v128 & normalsY,
    const Geo::v128 & normalsZ,
    const Geo::v128 & visibility
) const

...

Shades the given quads.