|
From: James W. W. <ja...@fr...> - 2005-02-15 21:34:08
|
Roger Holmes <rog...@mi...> wrote: >Should I be calling Q3File_ReadObject inside e3viewhints_read? I would say so. >For objects like the attribute set it seems the obvious way to go >but things like the ImageClearColour does not generate an >object. Should I be reading the 4 byte code manually and >if its something like 'imcc' reading the data? What about >when its 'attr', should I backspace 4 bytes and then call >Q3File_ReadObject? I think that ImageClearColor (not ImageClearColour :-)) should generate an object. This would be the kind of object that appears only fleetingly during 3DMF reading, like the Caps object (kQ3ObjectTypeGeometryCaps). If you look at E3Read_3DMF_Geom_Cylinder, for instance, it calls Q3File_ReadObject to get child objects, and if the child is of type kQ3ObjectTypeGeometryCaps, it extracts the caps flag, puts the caps flag in the cylinder data, and disposes the caps object. >How does this all work with text 3DMF files? The 4 byte >codes are not there for these, do I need a different >e3viewhints_read for text? Or do a test to see which is >being read? Or have I totally missed the point (most >likely as nothing seems to fit properly). You'd register ImageClearColor as a class, and its read method would, I suppose, use Q3Float32_Read to read the components of the color. -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |