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.3 by greg, Sat Jun 25 16:33:12 1994 UTC vs.
Revision 1.5 by greg, Thu Sep 1 09:50:27 1994 UTC

# 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_CMIX] = c_hcolor;
114 +        mg_ehand[MG_E_CSPEC] = c_hcolor;
115 +        mg_ehand[MG_E_CXY] = c_hcolor;
116 +        mg_ehand[MG_E_ED] = c_hmaterial;
117 +        mg_ehand[MG_E_MATERIAL] = c_hmaterial;
118 +        mg_ehand[MG_E_NORMAL] = c_hvertex;
119 +        mg_ehand[MG_E_POINT] = c_hvertex;
120 +        mg_ehand[MG_E_RD] = c_hmaterial;
121 +        mg_ehand[MG_E_RS] = c_hmaterial;
122 +        mg_ehand[MG_E_SIDES] = c_hmaterial;
123 +        mg_ehand[MG_E_TD] = c_hmaterial;
124 +        mg_ehand[MG_E_TS] = c_hmaterial;
125 +        mg_ehand[MG_E_VERTEX] = c_hvertex;
126 +
127   In addition to the three handler functions, context.c contains a
128   few support routines that make life simpler.  For vertices, there
129   is the c_getvertex call, which returns a pointer to a named vertex
# Line 121 | Line 136 | coordinates).  Also, there is a function called c_isgr
136   simply returns 1 or 0 based on whether the passed color structure
137   is close to grey or not.  Finally, there is the c_clearall routine,
138   which clears and frees all context data structures, and is the
139 < principle action of the parser's mg_clear function.
139 > principal action of the parser's mg_clear function.
140  
141   Transform Support
142   =================
# Line 207 | Line 222 | that the same vertices will appear under different nam
222   of the above would help to merge them.  The most sure-fire approach to
223   linking identical vertices is therefore to hash the point and normal
224   values directly and use the functions in lookup.c to associate them.
225 < You will have to write your own hash function, and I recommend making
225 > You will have to write your own hash function, and we recommend making
226   one that allows a little slop so that nearly identical points hash to
227   the same value.
228  
# Line 239 | Line 254 | At this point, the legal issues related to this parser
254   worked out.  The intent is to offer it free of charge to all those who
255   wish to use it (with no guarantees, of course).  However, we may decide
256   that copyright protections are necessary to prevent unauthorized versions
257 < of the parser that do not properly support the MGF standard from getting
258 < spread around.  Since this is a pre-release, we trust that you will not
259 < share it with anyone without getting our permission first.
257 > of the parser, which do not properly support the MGF standard, from
258 > getting spread around.  Since this is a pre-release, we trust that you
259 > will not share it with anyone without getting our permission first.
260  
261   Questions
262   =========

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines