Add object_sphere.h
This commit is contained in:
parent
2d66ba0945
commit
249f77e6cf
1 changed files with 30 additions and 0 deletions
30
src/object_sphere.h
Normal file
30
src/object_sphere.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* object_sphere.h
|
||||
*
|
||||
* Spheres are Shapes defined by a center point and a radius.
|
||||
*
|
||||
* Eryn Wells <eryn@erynwells.me>
|
||||
*/
|
||||
|
||||
#ifndef __OBJECT_SPHERE_H__
|
||||
#define __OBJECT_SPHERE_H__
|
||||
|
||||
#include "basics.h"
|
||||
#include "object.h"
|
||||
|
||||
|
||||
class Sphere
|
||||
: public Shape
|
||||
{
|
||||
Sphere();
|
||||
Sphere(float r);
|
||||
Sphere(Vector3 o, float r);
|
||||
|
||||
float get_radius();
|
||||
void set_radius(float r);
|
||||
|
||||
int does_intersect(const Ray &ray, float **t);
|
||||
private:
|
||||
float radius;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue