#include "ShVariable.hpp"
#include "ShAttrib.hpp"
#include "ShFuncImpl.hpp"
Include dependency graph for ShFunc.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | ShUtil |
Functions | |
| template<int N, typename T> | |
| ShGeneric< N, T > | smoothstep (const ShGeneric< N, T > &a, const ShGeneric< N, T > &b, const ShGeneric< N, T > x) |
| Cubic interpolated step between 0 and 1. | |
| template<int N, typename T> | |
| ShGeneric< N, T > | hashlcg (const ShGeneric< N, T > &p) |
| Parallel linear congruential generator. | |
| template<int N, typename T> | |
| ShGeneric< N, T > | hashmrg (const ShGeneric< N, T > &p) |
| MRG style pseudorandom vector generator. | |
| template<typename T> | |
| ShGeneric< 3, T > | changeBasis (const ShGeneric< 3, T > &b0, const ShGeneric< 3, T > &b1, const ShGeneric< 3, T > &b2, const ShGeneric< 3, T > &v) |
| Given 3 orthonormal basis vectors b0, b1, b2, specified relative to a coordinate space C, this does a change of basis on a vector v in space C to the orthonormal basis. | |
Definition in file ShFunc.hpp.
|
||||||||||
|
Parallel linear congruential generator. This does not work very well right now. Use hashmrg instead.
Definition at line 58 of file ShFuncImpl.hpp. References SH::exp(), SH::frac(), SH::mad(), and SH::pow(). |
|
||||||||||
|
MRG style pseudorandom vector generator. Generates a random vector using a multiple-recursive generator style. (LCG on steroids) Treat x,y,z,w as seeds a0, a1, a2, a3 and repeatedly apply an = b * (an-1, an-2, an-3, an-4), where b is a vector Take as output (an, an-1, an-2, an3) after suitable number of iterations. This appears to reduce correlation in the output components when input components are similar, but the behaviour needs to be studied further.
Definition at line 88 of file ShFuncImpl.hpp. References SH::dot(), SH::exp(), SH::frac(), and SH::pow(). Referenced by ShUtil::ShNoise< M, T, P >::cellnoise(), and ShUtil::ShNoise< M, T, P >::perlin(). |
|
||||||||||||||||||||
|
Cubic interpolated step between 0 and 1. Returns 0 if x < a, 1 if x > b, cubic interpolation between 0 and 1 otherwise Definition at line 40 of file ShFuncImpl.hpp. References SH::clamp(), and SH::mad(). |
1.4.2