#include <SLGLOVRWorkaround.h>
Definition at line 217 of file SLGLOVRWorkaround.h.
◆ DistortionFn()
float LensConfig::DistortionFn |
( |
float |
r | ) |
const |
|
inline |
◆ DistortionFnInverse()
float LensConfig::DistortionFnInverse |
( |
float |
r | ) |
const |
|
inline |
Definition at line 269 of file SLGLOVRWorkaround.h.
271 assert((r <= 20.0f));
274 float delta = r * 0.25f;
281 for (
int i = 0; i < 20; i++)
283 float sUp =
s + delta;
284 float sDown =
s - delta;
The SLScene class represents the top level instance holding the scene structure.
float DistortionFn(float r) const
◆ DistortionFnInverseApprox()
float LensConfig::DistortionFnInverseApprox |
( |
float |
r | ) |
const |
|
inline |
Definition at line 308 of file SLGLOVRWorkaround.h.
319 scale = 1.0f / (
InvK[0] + rsq * (
InvK[1] + rsq * (
InvK[2] + rsq *
InvK[3])));
328 float scaledRsq = (float)(NumSegments - 1) * rsq / (
MaxInvR *
MaxInvR);
@ Distortion_CatmullRom10
float EvalCatmullRom10Spline(float const *K, float scaledVal)
float InvK[NumCoefficients]
◆ DistortionFnScaleRadiusSquared()
float LensConfig::DistortionFnScaleRadiusSquared |
( |
float |
rsq | ) |
const |
|
inline |
Definition at line 220 of file SLGLOVRWorkaround.h.
227 scale = (
K[0] + rsq * (
K[1] + rsq * (
K[2] + rsq *
K[3])));
230 scale = 1.0f / (
K[0] + rsq * (
K[1] + rsq * (
K[2] + rsq *
K[3])));
239 float scaledRsq = (float)(NumSegments - 1) * rsq / (
MaxR *
MaxR);
◆ DistortionFnScaleRadiusSquaredChroma()
SLVec3f LensConfig::DistortionFnScaleRadiusSquaredChroma |
( |
float |
rsq | ) |
const |
|
inline |
◆ SetToIdentity()
void LensConfig::SetToIdentity |
( |
| ) |
|
|
inline |
◆ SetUpInverseApprox()
void LensConfig::SetUpInverseApprox |
( |
| ) |
|
|
inline |
Definition at line 339 of file SLGLOVRWorkaround.h.
359 sampleR[1] = maxR * 0.4f;
360 sampleR[2] = maxR * 0.8f;
361 sampleR[3] = maxR * 1.5f;
362 for (
int i = 0; i < 4; i++)
364 sampleRSq[i] = sampleR[i] * sampleR[i];
366 sampleFit[i] = sampleR[i] / sampleInv[i];
378 const int maxCheck = 20;
379 for (
int i = 0; i < maxCheck; i++ )
381 float checkR = (float)i * maxR / (
float)maxCheck;
384 float error = fabsf ( realInv - testInv ) / maxR;
385 OVR_ASSERT ( error < 0.1f );
395 for (
int i = 1; i < NumSegments; i++)
397 float scaledRsq = (float)i;
398 float rsq = scaledRsq *
MaxInvR *
MaxInvR / (float)(NumSegments - 1);
399 float r = sqrtf(rsq);
406 const int maxCheck = 20;
407 for (
int i = 0; i <= maxCheck; i++ )
409 float checkR = (float)i *
MaxInvR / (
float)maxCheck;
412 float error = fabsf ( realInv - testInv ) /
MaxR;
413 OVR_ASSERT ( error < 0.01f );
bool FitCubicPolynomial(float *pResult, const float *pFitX, const float *pFitY)
float DistortionFnInverse(float r) const
float DistortionFnInverseApprox(float r) const
◆ ChromaticAberration
float LensConfig::ChromaticAberration[4] |
◆ Eqn
◆ InvK
◆ MaxInvR
float LensConfig::MaxInvR |
◆ MaxR
◆ MetersPerTanAngleAtCenter
float LensConfig::MetersPerTanAngleAtCenter |
The documentation for this struct was generated from the following file: