-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraytracing.h
More file actions
35 lines (26 loc) · 1.16 KB
/
Copy pathraytracing.h
File metadata and controls
35 lines (26 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef RAYTRACING_Hjdslkjfadjfasljf
#define RAYTRACING_Hjdslkjfadjfasljf
#include <vector>
#include "mesh.h"
//Welcome to your assignment...
//this is an important file, raytracing.cpp is what you need to fill out
extern Mesh MyMesh; //Main mesh
extern std::vector<Vec3Df> MyLightPositions;
extern Vec3Df MyCameraPosition; //currCamera
extern unsigned int WindowSize_X;//window resolution width
extern unsigned int WindowSize_Y;//window resolution height
extern unsigned int RayTracingResolutionX; // largeur fenetre
extern unsigned int RayTracingResolutionY; // largeur fenetre
//use this function for any preprocessing of the mesh.
void init();
//you can use this function to transform a click to an origin and destination
//the last two values will be changed. There is no need to define this function.
//it is defined elsewhere
void produceRay(int x_I, int y_I, Vec3Df & origin, Vec3Df & dest);
//your main function to rewrite
Vec3Df performRayTracing(const Vec3Df & origin, const Vec3Df & dest);
//a function to debug --- you can draw in OpenGL here
void yourDebugDraw();
//want keyboard interaction? Here it is...
void yourKeyboardFunc(char t, int x, int y);
#endif