KiCad PCB EDA Suite
|
Defines math related functions. More...
#include <cmath>
#include <cstdint>
#include <cstring>
Go to the source code of this file.
Macros | |
#define | FASTMATH_USE |
#define | L1_CACHE_LINE_SIZE 64 |
#define | INTFLOORF(s) (lrintf( (s) - (0.5f - FLT_EPSILON) )) |
Functions | |
float | Fast_RandFloat () |
int | Fast_rand (void) |
void | Fast_srand (unsigned int seed) |
uint32_t | FloatToBits (float f) |
This part contains some functions from the PBRT 3 source code. | |
float | BitsToFloat (uint32_t ui) |
uint64_t | FloatToBits (double f) |
double | BitsToFloat (uint64_t ui) |
float | NextFloatUp (float v) |
float | NextFloatDown (float v) |
Defines math related functions.
Definition in file 3d_fastmath.h.
#define FASTMATH_USE |
Definition at line 39 of file 3d_fastmath.h.
#define INTFLOORF | ( | s | ) | (lrintf( (s) - (0.5f - FLT_EPSILON) )) |
Definition at line 44 of file 3d_fastmath.h.
#define L1_CACHE_LINE_SIZE 64 |
Definition at line 41 of file 3d_fastmath.h.
|
inline |
Definition at line 106 of file 3d_fastmath.h.
Referenced by NextFloatDown(), and NextFloatUp().
|
inline |
Definition at line 126 of file 3d_fastmath.h.
int Fast_rand | ( | void | ) |
Definition at line 58 of file 3d_fastmath.cpp.
References s_nextRandSeed.
Referenced by POST_SHADER_SSAO::Shade().
float Fast_RandFloat | ( | ) |
Definition at line 45 of file 3d_fastmath.cpp.
References s_randSeed.
Referenced by RAYPACKET::RAYPACKET(), RAYPACKET_InitRays_with2DDisplacement(), and UniformRandomHemisphereDirection().
void Fast_srand | ( | unsigned int | seed | ) |
Definition at line 65 of file 3d_fastmath.cpp.
References s_nextRandSeed.
|
inline |
Definition at line 116 of file 3d_fastmath.h.
|
inline |
This part contains some functions from the PBRT 3 source code.
https://github.com/mmp/pbrt-v3/blob/master/src/core/pbrt.h
Definition at line 96 of file 3d_fastmath.h.
Referenced by NextFloatDown(), and NextFloatUp().
|
inline |
Definition at line 157 of file 3d_fastmath.h.
References BitsToFloat(), and FloatToBits().
Referenced by LAYER_ITEM::Intersect(), LAYER_ITEM::IntersectP(), RAYSEG2D::RAYSEG2D(), RENDER_3D_RAYTRACE_BASE::Reload(), BBOX_2D::ScaleNextDown(), BBOX_3D::ScaleNextDown(), BBOX_2D::ScaleNextUp(), and BBOX_3D::ScaleNextUp().
|
inline |
Definition at line 136 of file 3d_fastmath.h.
References BitsToFloat(), and FloatToBits().
Referenced by LAYER_ITEM::Intersect(), LAYER_ITEM::IntersectP(), RENDER_3D_RAYTRACE_BASE::Reload(), BBOX_2D::ScaleNextDown(), BBOX_3D::ScaleNextDown(), BBOX_2D::ScaleNextUp(), and BBOX_3D::ScaleNextUp().