KiCad PCB EDA Suite
|
Defines math related functions. More...
Go to the source code of this file.
Functions | |
SFVEC3F | SphericalToCartesian (float aInclination, float aAzimuth) |
https://en.wikipedia.org/wiki/Spherical_coordinate_system | |
SFVEC3F | UniformRandomHemisphereDirection () |
SFVEC3F | CosWeightedRandomHemisphereDirection (const SFVEC3F &n) |
bool | Refract (const SFVEC3F &aInVector, const SFVEC3F &aNormal, float aRin_over_Rout, SFVEC3F &aOutVector) |
Based on: https://github.com/mmp/pbrt-v3/blob/master/src/core/reflection.h See also: http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_3_Refractions_and_Beers_Law.shtml. | |
float | mapf (float x, float in_min, float in_max, float out_min, float out_max) |
float | RGBtoGray (const SFVEC3F &aColor) |
SFVEC3F | MaterialDiffuseToColorCAD (const SFVEC3F &aDiffuseColor) |
float | QuadricEasingInOut (float t) |
float | BezierBlend (float t) |
Defines math related functions.
Definition in file 3d_math.h.
|
inline |
Definition at line 179 of file 3d_math.h.
Referenced by TRACK_BALL::Interpolate().
|
inline |
Definition at line 133 of file 3d_math.h.
Referenced by RENDER_3D_OPENGL::setupMaterials().
Definition at line 147 of file 3d_math.h.
References RGBtoGray().
Referenced by RENDER_3D_RAYTRACE_BASE::addModels(), MODEL_3D::Draw(), and MODEL_3D::MODEL_3D().
|
inline |
Definition at line 163 of file 3d_math.h.
Referenced by TRACK_BALL::Interpolate().
|
inline |
Based on: https://github.com/mmp/pbrt-v3/blob/master/src/core/reflection.h See also: http://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_3_Refractions_and_Beers_Law.shtml.
aInVector | incoming vector. |
aNormal | normal in the intersection point. |
aRin_over_Rout | incoming refraction index / out refraction index. |
aOutVector | the refracted vector. |
Definition at line 112 of file 3d_math.h.
Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().
|
inline |
Definition at line 140 of file 3d_math.h.
Referenced by RENDER_3D_RAYTRACE_BASE::getModelMaterial(), and MaterialDiffuseToColorCAD().
|
inline |
https://en.wikipedia.org/wiki/Spherical_coordinate_system
aInclination | θ ∈ [0, π] |
aAzimuth | φ ∈ [0, 2π] |
Definition at line 43 of file 3d_math.h.
Referenced by init_lights(), and RENDER_3D_RAYTRACE_BASE::Reload().
|
inline |
Definition at line 55 of file 3d_math.h.
References Fast_RandFloat().
Referenced by RENDER_3D_RAYTRACE_BASE::shadeHit().