//=============== Solid ========================================= // Solid class for Assignment 3 CS770/870 Fall 1998 // Main responsibility is to hold a transformation matrix // to apply to the coordinates of the Solid. // import java.awt.*; import java.math.*; //import matrix.*; // the cs770 matrix package abstract class Solid extends Shape { protected Matrix4 _xform; //-------------- Solid( Matrix4 xform, Color rgb ) -------- public Solid( Matrix4 xform, Color rgb ) { super( rgb ); _xform = new Matrix4( xform ); } //---------------------- Solid( Color rgb ) ----------------- public Solid( Color rgb ) { this ( new Matrix4( ), rgb ); } //---------------------- Solid( Solid ) ----------------- public Solid( Solid s ) { this ( s._xform, s._color ); } //---------------------- copy () -------------------------- public abstract Shape copy ( ); //---------------------- draw (Graphics, Matrix4 ) ----------- public abstract void draw ( Graphics g, Matrix4 viewxform ); }