LightsprintSDK 2021.08.08
|
#include <RRSolver.h>
Public Member Functions | |
SmoothingParameters () | |
Public Attributes | |
float | vertexWeldDistance |
float | maxSmoothAngle |
float | ignoreSmallerAngle |
float | ignoreSmallerArea |
Illumination smoothing parameters.
|
inline |
Sets default values at creation time.
float rr::RRSolver::SmoothingParameters::vertexWeldDistance |
Distance in world units. Vertices with lower or equal distance (and angle between vertex normals smaller than maxSmoothAngle) will be internally stitched into one vertex. Zero stitches only identical vertices, negative value generates no action. Non-stitched vertices at the same location create illumination discontinuity.
Sideeffect: non-negative values protect solver against INF and NaN vertices. In ideal situation where geometry doesn't need stitching, doesn't contain NaNs and INFs and adapter doesn't split vertices (Collada adapter does), set negative value to make calculation faster.
float rr::RRSolver::SmoothingParameters::maxSmoothAngle |
Angle in radians, vertices are stitched and illumination smoothed only if difference between vertex normals is <=abs(maxSmoothAngle).
float rr::RRSolver::SmoothingParameters::ignoreSmallerAngle |
Makes needle-like triangles with equal or smaller angle (rad) ignored. Default 0 removes only completely degenerated triangles. 0.001 is a reasonable value to put extremely needle like triangles off calculation, which may help in some situations.
float rr::RRSolver::SmoothingParameters::ignoreSmallerArea |
Makes smaller and equal size triangles ignored. Default 0 removes only completely degenerated triangles. For typical game interior scenes and world in 1m units, 1e-10 is a reasonable value to put extremely small triangles off calculation, which may help in some situations.