package myGraphics.Kinematics; import myGraphics.Shape3d.*; import myGraphics.VectorGrafix.*; import myGraphics.Perspective.*; import java.awt.Graphics; public class Figure extends Model { /* * A Figure is just a Model that keeps track * of state information so it can draw itself. */ public StackMachine s; public Model root; public Figure() { super(); s = new StackMachine(); root = new Model(); } public Figure(Model theRoot) { super(); s = new StackMachine(); root = theRoot; // a link to theRoot, NOT A COPY!! } public void setRoot(Model M) { root = M; // a link to M, NOT A COPY!! } public void renderFigure(Graphics g, Camera c, Viewport v) { root.renderModel(g, c, v, s); s = new StackMachine(); // reinitialize the stack } }