/***************************************************************************** Polyline clipping subroutine for CS480 Programming Assignment 2 ****************************************************************************** Author: ******************************************************************************/ #include #include #include #include #include "draw.h" /* Write a 3-D line clipping routine based on the parametric line clipper that you wrote for the second programming assignment. This new version of the clipper should take advantage of the fact that all the clip planes are perpendicular to either the x,y, or z axis. Before upgrading to 3-D, please be sure to fix any bugs you had in your 2-D line clipper. */ clip3d(winid,x0,y0,z0,x1,y1,z1,xmin,ymin,zmin,xmax,ymax,zmax,color) int winid; /* window id */ float x0,y0,z0,x1,y1,z1; /* line segment end point coordinates */ float xmin,ymin,zmin,xmax,ymax,zmax; /* min/max of the clipping rectangle */ short color[3]; /* color for the line (if drawn) */ { }