Hemisphere.cc File Reference

#include <esg/geometry/Hemisphere.h>

Go to the source code of this file.

Defines

#define ESG_ANGLES_TO_VECTOR(a, cosE, sinE, d)


Define Documentation

#define ESG_ANGLES_TO_VECTOR a,
cosE,
sinE,
 ) 
 

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().


Generated on Wed Jun 28 12:24:33 2006 for esg by  doxygen 1.4.6