#include <esg/geometry/Hemisphere.h>
Go to the source code of this file.
Defines | |
#define | ESG_ANGLES_TO_VECTOR(a, cosE, sinE, d) |
|
Value: { \ double cos_a = cos(a); \ Vector3 aux(_xAxis); \ aux.scale(cos_a); \ (d).set(_yAxis); \ (d).scaleAdd((a<M_PI) ? sqrt(1-cos_a*cos_a) : -sqrt(1-cos_a*cos_a), aux); \ aux.set(_zAxis); /* ^^^^^^^^ fast sin(a) ^^^^^^^^^ */ \ aux.scale(cosE); \ (d).scaleAdd(sinE, aux); \ } Definition at line 278 of file Hemisphere.cc. Referenced by Hemisphere::samplePriorToPoweredZenith(), Hemisphere::samplePriorToZenith(), and Hemisphere::sampleUniformly(). |