示例#1
0
int main (int argc, char * const argv[]) 
{
    printf("RNG Tests\n");
    fflush(stdout);

    mkdir(output_path.c_str(), 0777);

    Timer total_run_timer;
    total_run_timer.start();

    rng.seedCurrentTime();

#if 1
    testUniformSquare();
    testUniformCircle();
    testUniformSurfaceUnitSphere();
    testUniformSurfaceUnitHalfSphere();
    testUniformConeDirection();
    testUniformVolumeUnitSphere();
    testCosineDistribution();
    testCosineHalfSphere();

    testBasicTriangle2D();
    testBasicTriangle3D();
#else
    testUniformCircle();
#endif
    
    total_run_timer.stop();
    printf("Done - Run time = %f seconds\n", total_run_timer.elapsed());
    fflush(stdout);
    return 0;
}