-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsphere.h
44 lines (36 loc) · 1.21 KB
/
sphere.h
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
36
37
38
39
40
41
42
43
44
/*
* Filename : sphere.h
* Last Modified: 19 June 2020
* Owner : Group 20
*
* Description:
* to be updated ...
*
* Other:
* This file is formatted with a tab indent size of 4 and a character
* restriction of 80/line.
*/
#ifndef SPHERE_H
#define SPHERE_H
/*------------------------------Standard Headers------------------------------*/
#include <stdbool.h>
/*----------------------------User-defined Headers----------------------------*/
#include "ray.h"
#include "material.h"
/*-----------------------------User-defined Types-----------------------------*/
typedef struct {
vec cen;
float rad;
material mat;
} sphere;
/*---------------------------Function Declarations----------------------------*/
/*================================Hit Handler=================================*/
/* Add comment here */
bool sph_hit(sphere *s, ray r, float t_min, float r_max, hit_rec *rec);
/*==================================Setters===================================*/
/* Add comment here */
sphere *sph_set(float x, float y, float z, float rad, material mat);
/*=============================Memory Management==============================*/
/* Add comment here */
void sph_free(sphere *s);
#endif