home *** CD-ROM | disk | FTP | other *** search
- /*
- * FILE: trans.h
- * AUTHOR: R. Gonzalez
- * CREATED: October 3, 1990
- *
- * Defines 3D transformation (using trans. matrix) for picture
- * application.
- */
-
- # ifndef trans_h
- # define trans_h
-
- # include "class.h"
- # define PI 3.1415926
-
- /******************************************************************
- * abstract transformation
- ******************************************************************/
- struct Transformation:Generic_Class
- {
- double m[4][4]; /* public */
-
- boolean init(void);
- virtual void combine(Transformation*,Transformation*);
- virtual void equate(Transformation*);
- };
-
- /******************************************************************
- * translation
- ******************************************************************/
- struct Translation:Transformation
- {
- virtual void set(double,double,double);
- };
-
- /******************************************************************
- * scaling
- ******************************************************************/
- struct Scaling:Transformation
- {
- virtual void set(double,double,double);
- };
-
- /******************************************************************
- * rotation about x
- ******************************************************************/
- struct Rotation_X:Transformation
- {
- virtual void set(double);
- };
-
- /******************************************************************
- * rotation about y
- ******************************************************************/
- struct Rotation_Y:Transformation
- {
- virtual void set(double);
- };
-
- /******************************************************************
- * rotation about z
- ******************************************************************/
- struct Rotation_Z:Transformation
- {
- virtual void set(double);
- };
-
- /******************************************************************
- * convert from world to camera coordinates
- ******************************************************************/
- struct World_To_Camera:Transformation
- {
- virtual void set(double,double,double,double,double,double);
- };
-
- # endif