added Ray::randomRay() to generated a ray with origin at (0,0,0) and a random direction
git-svn-id: svn://anubis/fart/trunk@254 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
5eeee5fd90
commit
bc27be0f85
3 files changed
+25
-3
No files matched your search
+8
-2
@@ -1,15 +1,19 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <unistd.h> /* sysconf() */
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h> /* rand(), srand() */
|
||||
#include <time.h> /* time() */
|
||||
#include <getopt.h>
|
||||
#include <sys/time.h> /* gettimeofday() */
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "Scene.h"
|
||||
#include "distrib/distrib.h"
|
||||
#include "BMP.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void usage(const char * progname)
|
||||
@@ -163,6 +167,8 @@ int main(int argc, char * argv[])
|
||||
usage(argv[0]);
|
||||
}
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
const char * filename = argv[optind];
|
||||
client_options.push_back(filename);
|
||||
Scene scene(scene_options, filename);
|
||||
|
||||
Reference in new issue
Block a user