|
Defines |
|
#define | _GR_FUNCTIONS_ 1 |
|
#define | GRAssert(condition) (condition) ? (void)0 : GRAssertHelper(__FILE__, __LINE__); |
|
#define | likely(x) (x) |
|
#define | unlikely(x) (x) |
Functions |
|
double | GRMin (double a, double b) |
|
double | GRMax (double a, double b) |
|
int | GRAbs (int x) |
|
double | GRLerp (double factor, double a, double b) |
|
double | GRHermite (double x) |
|
float | GRPowerHeuristic (float pdf1, float pdf2) |
|
bool | GRisnan (float val) |
|
double | GRDegRad (double a) |
|
double | GRRadDeg (double a) |
|
int | GRClamp (int x, int min, int max) |
|
int | GRFloor (double x) |
| Vector3 | GRReflect (const Vector3 &v_out, const Vector3 &n) |
| Vector3 | GRRefract (const Vector3 &v_out, const Vector3 &n, double eta) |
| rgb | GRNormalReflectance (const rgb &eta) |
| rgb | GRFresnelReflectance (const rgb &eta, double cos_theta) |
|
Vector3 | GRRandDir (double uRand1, double uRand2) |
|
void | GRCosineSampleHemisphere (double r1, double r2, const ONB &uvw, Vector3 &v) |
|
bool | isBigEndian () |
|
template<class T> |
| void | swapBytes (T &t) |
|
void | GRError (const char *format,...) |
|
void | GRWarning (const char *format,...) |
|
void | GRAssertHelper (char *filename, int line_number) |
|
void | GRLowercase (char *original) |
|
bool | GRFileExtension (const char *original, char *extension_buf) |
|
bool | GRFileName (const char *original, char *filename_buf) |