1 31 package org.objectweb.proactive.examples.c3d.prim; 32 33 import org.objectweb.proactive.examples.c3d.geom.Ray; 34 import org.objectweb.proactive.examples.c3d.geom.Vec; 35 36 public abstract class Primitive implements java.io.Serializable { 37 38 public Surface surf = new Surface(); 39 40 41 public void setColor(double r, double g, double b) { 42 surf.color = new Vec(r, g, b); 43 } 44 45 46 public abstract Vec normal(Vec pnt); 47 48 49 public abstract Isect intersect(Ray ry); 50 51 52 public abstract String toString(); 53 54 55 public abstract Vec getCenter(); 56 57 58 public abstract void setCenter(Vec c); 59 } 60 | Popular Tags |