Skip to content

ludus::foundation::math::ProjectedSolidAnglePolygon

Ludus Wiki · API overview · Browse API

Struct

Per-polygon, per-shading-point state for projected solid angle sampling.
Produced by TryPrepareProjectedSolidAnglePolygon and consumed unchanged by the sampling and density functions. The fields record the paper's representation (supplement A.7, Algorithm 4); callers should treat them as read-only.

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

#include <ludus/foundation/math/projected_solid_angle.hpp>
struct ludus::foundation::math::ProjectedSolidAnglePolygon final

Fields

VerticesXy

Vector2 ludus::foundation::math::ProjectedSolidAnglePolygon::VerticesXy[MAX_PROJECTED_POLYGON_VERTICES][MAX_PROJECTED_POLYGON_VERTICES] {}
Clipped tangent-space vertex xy coordinates, y negated when IsMirrored; counterclockwise around the zenith in the decentral case.

Related types: Vector2

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

Ellipses

Vector2 ludus::foundation::math::ProjectedSolidAnglePolygon::Ellipses[MAX_PROJECTED_POLYGON_VERTICES][MAX_PROJECTED_POLYGON_VERTICES] {}
Ellipse vector u = n_xy / n_z for the edge following each vertex counterclockwise; zero when degenerate.

Related types: Vector2

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

EllipseKinds

ProjectedEllipseKind ludus::foundation::math::ProjectedSolidAnglePolygon::EllipseKinds[MAX_PROJECTED_POLYGON_VERTICES][MAX_PROJECTED_POLYGON_VERTICES] {}
Kind of each entry of Ellipses.

Related types: ProjectedEllipseKind

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

InnerEllipse0

Vector2 ludus::foundation::math::ProjectedSolidAnglePolygon::InnerEllipse0 {}
Inner ellipse adjacent to vertex 0 in the decentral case.

Related types: Vector2

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

IsCentralCase

bool ludus::foundation::math::ProjectedSolidAnglePolygon::IsCentralCase = true
Whether the zenith lies inside the polygon, so every sector is bounded by one outer ellipse (paper Fig. 3a).

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

SectorProjectedSolidAngles

float32 ludus::foundation::math::ProjectedSolidAnglePolygon::SectorProjectedSolidAngles[MAX_PROJECTED_POLYGON_VERTICES][MAX_PROJECTED_POLYGON_VERTICES] {}
Projected solid angle of the polygon within the sector starting at each vertex, in steradians.

Related types: float32

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

ProjectedSolidAngle

float32 ludus::foundation::math::ProjectedSolidAnglePolygon::ProjectedSolidAngle = 0.0F
Total projected solid angle in steradians, in [0, pi]; zero means nothing can be sampled.

Related types: float32

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

VertexCount

uint32 ludus::foundation::math::ProjectedSolidAnglePolygon::VertexCount = 0
Clipped vertex count, zero when no part of the polygon lies above the horizon.

Related types: uint32

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp

IsMirrored

bool ludus::foundation::math::ProjectedSolidAnglePolygon::IsMirrored = false
Whether y was negated so the polygon winds clockwise as seen from the origin.

Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp