Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://www.youtube.com/user/thecplusplusguy
- //watch the video for explonation
- //ray-sphere and ray-plane collision detection.
- //if you find a bug, let me know
- #include <SDL/SDL.h>
- #include <GL/gl.h>
- #include <GL/glu.h>
- #include <cstdlib>
- #include <vector>
- #include <string>
- #include <algorithm>
- #include <fstream>
- #include <cstdio>
- #include <iostream>
- #include <cmath>
- #include "objloader.h"
- #ifndef FUNCTION_H
- #define FUNCTION_H
- void drawCube(float size);
- void drawSkybox(float size);
- void initskybox();
- void killskybox();
- void lockCamera();
- void moveCamera(float,float);
- void moveCamerraUp(float,float);
- void Control(float,float,bool);
- void UpdateCamera();
- unsigned int loadTexture(const char*);
- bool raysphere(float xc,float yc, float zc,float xd,float yd, float zd,float xs,float ys, float zs,float r);
- bool rayplane(float nx,float ny,float nz,float xs,float ys,float zs,float xd,float yd,float zd,coordinate p1,coordinate p2,coordinate p3,coordinate p4);
- float trianglearea(coordinate p1,coordinate p2,coordinate p3);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement