--- ray/src/cv/mgflib/mgfdoc.tr 1995/05/12 14:26:12 1.1 +++ ray/src/cv/mgflib/mgfdoc.tr 1995/05/15 14:42:30 1.3 @@ -431,7 +431,8 @@ Since the arguments are concise and self-explanatory, sufficient. The following transformation flags and parameters are defined: -.TS I +.TS +center; l l. -t dx dy dz translate objects along the given vector -rx degrees rotate objects about the X-axis @@ -546,6 +547,7 @@ Detailed MGF Example The following example of a simple room with a single door and six file cabinets shows MGF in action, with copious comments to help explain what's going on. +.LP .DS # "ceiling_tile" is a diffuse white surface with 75% reflectance: # Create new named material context and clear it @@ -772,7 +774,7 @@ There are currently 28 entities in the MGF specificati For ease of reference we have broken these into five categories: .IP 1. General -.TS I +.TS lw(.75i) lw(1.75i) lw(3i). # [anything ...] a comment o [name] begin/end object context @@ -782,7 +784,7 @@ ies pathname [-m f][xform] include IES luminaire (with .TE .IP 2. Color -.TS I +.TS lw(.75i) lw(1.75i) lw(3i). c [id [= [template]]] get/set color context cxy x y set CIE (x,y) chromaticity for current color @@ -2695,8 +2697,7 @@ Greg Ward SEE ALSO .LP ies2rad(1), mgf2meta(1), obj2rad(1), oconv(1), rad2mgf(1), xform(1) -.ds RH -RAD2MGF +.ds RH RAD2MGF .bp .SH NAME @@ -2985,15 +2986,15 @@ char **av; if (ac < 4) /* check # arguments */ return(MG_EARGC); - printf("face\n"); /* begin face output */ + printf("face\\\\n"); /* begin face output */ for (i = 1; i < ac; i++) { if ((vp = c_getvert(av[i])) == NULL) /* vertex from name */ return(MG_EUNDEF); xf_xfmpoint(vert, vp->p); /* apply transform */ - printf("%15.9f %15.9f %15.9f\n", + printf("%15.9f %15.9f %15.9f\\\\n", vert[0], vert[1], vert[2]); /* output vertex */ } - printf(";\\n"); /* end of face output */ + printf(";\\\\n"); /* end of face output */ return(MG_OK); /* normal exit */ } @@ -3127,7 +3128,7 @@ following: #define MG_E_FACE 9 /* f */ #define MG_E_INCLUDE 10 /* i */ #define MG_E_IES 11 /* ies */ -#define MG_E_IR 12 /* ir */ +#define MG_E_IR 12 /* ir */ #define MG_E_MATERIAL 13 /* m */ #define MG_E_NORMAL 14 /* n */ #define MG_E_OBJECT 15 /* o */ @@ -3267,7 +3268,7 @@ and return one of the non-zero values from "parser.h" #define MG_EUNK 1 /* unknown entity */ #define MG_EARGC 2 /* wrong number of arguments */ #define MG_ETYPE 3 /* argument type error */ -#define MG_EILL 4 /* illegal argument value */ +#define MG_EILL 4 /* illegal argument value */ #define MG_EUNDEF 5 /* undefined reference */ #define MG_ENOFILE 6 /* cannot open input file */ #define MG_EINCL 7 /* error in included file */ @@ -4275,7 +4276,7 @@ mg_init, mg_load, obj_handler, xf_xfmpoint .SH NAME .LP -xf_xfmpoint xf_xfmvect, xf_rotvect, xf_scale - apply current +xf_xfmpoint, xf_xfmvect, xf_rotvect, xf_scale - apply current transformation .SH SYNOPSIS @@ -4304,7 +4305,11 @@ to the point .I pold, scaling, rotating and moving it to its proper location, which is put in .I pnew. -(The two arguments may point to the same vector.)\0 +(As for +.I xf_xfmvect +and +.I xf_rotvect, +the two arguments may point to the same vector.)\0 .LP The .I xf_xfmvect @@ -4312,7 +4317,6 @@ routine applies the current transformation to the vect .I vold, scaling and rotating it to its proper location, which is put in .I vnew. -(The two arguments may point to the same vector.)\0 The only difference between .I xf_xfmpoint and @@ -4325,7 +4329,6 @@ routine rotates the vector .I nold using the current transformation, and stores the result in .I nnew. -(The two arguments may point to the same vector.)\0 No translation or scaling is applied, which is the appropriate action for surface normal vectors for example. .LP