/Users/lyon/j4p/src/graphics/raytracers/tracer/primatives/Primitive.java
|
1 package graphics.raytracers.tracer.primatives;
2
3 import graphics.raytracers.tracer.geometry.Ray3d;
4 import graphics.raytracers.tracer.geometry.Vector3d;
5
6 public abstract class Primitive {
7 public Surface surf = new Surface();
8
9 public void setColor(double r, double g, double b) {
10 surf.color = new Vector3d(r, g, b);
11 }
12
13 public abstract Vector3d normal(Vector3d pnt);
14
15 public abstract Isect intersect(Ray3d ry);
16
17 public abstract String toString();
18 }
19