ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/mgflib/readme.txt
(Generate patch)

Comparing ray/src/cv/mgflib/readme.txt (file contents):
Revision 1.4 by greg, Sat Jun 25 21:53:12 1994 UTC vs.
Revision 1.10 by greg, Mon Aug 6 14:50:28 2007 UTC

# Line 1 | Line 1
1                  MGF PACKAGE DESCRIPTION
2 <                SCCSid "$SunId$ LBL"
2 >                RCSid "$Id$"
3  
4   This package includes a description and parser for a new scene
5   description standard, called for the lack of a better name, MGF
# Line 63 | Line 63 | some of them in the following sections.
63   Initializing the parser is the most important part of writing an MGF
64   program, and it is done through the mg_ehand array and a call to mg_init.
65   The global mg_ehand variable is an array of pointers to entity handler
66 < functions.  The arguments to these functions is always the same, an
66 > functions.  The arguments to these functions are always the same, an
67   argument count and an array of argument pointers (ala main).  The return
68   value for these integer functions is one of the error codes defined in
69   parser.h, or MG_OK if the entity was handled correctly.  You must
# Line 107 | Line 107 | to c_hmaterial.  Then, whenever a material is needed,
107   c_cmaterial variable will be pointing to a structure with all the
108   current settings.  (Note that you would have to also set the color
109   mg_ehand entries to c_hcolor if you intended to support color
110 < materials.)
110 > materials.)  A list of related mg_ehand assignments is given below:
111  
112 +        mg_ehand[MG_E_COLOR] = c_hcolor;
113 +        mg_ehand[MG_E_CCT] = c_hcolor;
114 +        mg_ehand[MG_E_CMIX] = c_hcolor;
115 +        mg_ehand[MG_E_CSPEC] = c_hcolor;
116 +        mg_ehand[MG_E_CXY] = c_hcolor;
117 +        mg_ehand[MG_E_ED] = c_hmaterial;
118 +        mg_ehand[MG_E_IR] = c_hmaterial;
119 +        mg_ehand[MG_E_MATERIAL] = c_hmaterial;
120 +        mg_ehand[MG_E_NORMAL] = c_hvertex;
121 +        mg_ehand[MG_E_POINT] = c_hvertex;
122 +        mg_ehand[MG_E_RD] = c_hmaterial;
123 +        mg_ehand[MG_E_RS] = c_hmaterial;
124 +        mg_ehand[MG_E_SIDES] = c_hmaterial;
125 +        mg_ehand[MG_E_TD] = c_hmaterial;
126 +        mg_ehand[MG_E_TS] = c_hmaterial;
127 +        mg_ehand[MG_E_VERTEX] = c_hvertex;
128 +
129   In addition to the three handler functions, context.c contains a
130   few support routines that make life simpler.  For vertices, there
131   is the c_getvertex call, which returns a pointer to a named vertex
# Line 121 | Line 138 | coordinates).  Also, there is a function called c_isgr
138   simply returns 1 or 0 based on whether the passed color structure
139   is close to grey or not.  Finally, there is the c_clearall routine,
140   which clears and frees all context data structures, and is the
141 < principle action of the parser's mg_clear function.
141 > principal action of the parser's mg_clear function.
142  
143   Transform Support
144   =================
# Line 217 | Line 234 | Two example translator programs are included with this
234  
235   The simplest is a translator from MGF to MGF called mgfilt.c, which
236   produces on the standard output only those entities from the standard
237 < input that are supported according to the command line arguments.  For
238 < example, one could remove everything but the raw, flat polygonal
237 > input that are supported according to the first command line argument.
238 > For example, one could remove everything but the raw, flat polygonal
239   geometry with the following command:
240  
241 <        mgfilt v p f xf < any.mgf > faces.mgf
241 >        mgfilt v,p,f,xf any.mgf > faces.mgf
242  
243   Note that the xf entity must also be included, for its support is
244   required by all geometric entities.
# Line 235 | Line 252 | and he'll be happy to provide you with the missing pie
252  
253   Copyright
254   =========
255 < At this point, the legal issues related to this parser have not been
256 < worked out.  The intent is to offer it free of charge to all those who
257 < wish to use it (with no guarantees, of course).  However, we may decide
258 < that copyright protections are necessary to prevent unauthorized versions
242 < of the parser, which do not properly support the MGF standard, from
243 < getting spread around.  Since this is a pre-release, we trust that you
244 < will not share it with anyone without getting our permission first.
255 > This library was put in public domain and is offered free
256 > of charge to all those who wish to use it for any purpose.
257 > We take no responsibility for its use, misuse, correctess,
258 > or suitability.
259  
260   Questions
261   =========
262 < Questions should be directed to Greg Ward <[email protected]>, who will be
263 < happy to offer any reasonable assistance in using this standard.  (Greg's
250 < telephone is 1-510-486-4757, fax 1-510-486-4089.)
262 > Questions should be directed to Greg Ward <[email protected]>>, who will be
263 > happy to offer any reasonable assistance in using this standard.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines