1 - first section: it can be present once at the start of the file

Header            : TopModel 3DFile
version           : 2.00
setup view        : View1 Xview, Yview, Zview, zoom, observer dist., angleX, angleY, angleZ, 15, 0|1 (perspective on/off), background colour (&BBGGRR00),ViewVectorX,ViewVectorY,ViewVectorZ
ambient light     : Ambiental R, G, B, intensita'
sun light         : Solar R, G, B, intensity, directionX, directionY, directionZ
grid              : Grid number of points/side, stepX, stepY, stepZ, centerX, centerY, centerZ
environment       : Environment fog colour, fog intensity (*2^16), Z fog start, Z fog intensity (*2^16), background texture (0=none)
number of textures: NTextures <value>
description       :    <n^texture starting from 1>: <name (the root is: !TopRes.Textures.)>, <colour to be made transparent (in 16bpp format) or 2^29 if texture is solid>
number of lights  : NLights <value>
description       :    Light 3|4|5 (spot|beam|sun), Xlight, Ylight, Zlight, Xlit_point, Ylp, Zlp, intensity, C<colour number>, solid angle of light (if beam light), lens1,lens2, drop-off dist

2 - object section: you can repeat these entries several times in the file

number of colours : NColours <value>
description       :    <n^user colour   (starting from 200)> : <name (11 char max)>, R,G,B
number of mater.  : NMaterials <value>
description       :    <n^user material (starting from 100)> : <name (11 char max)>,<ambient 0..1023>,<diffuse 0..1023>,
                       <refl_R  0..1023>+<refl_G  0..1023>+<refl_B  0..1023>,<gloss  0..63>,
                       <trasp_R 0..1023>+<trasp_G 0..1023>+<trasp_B 0..1023>,<refractive_id 0..1023>,
                       <material colour &BBGGRR00 (or 255 to use the object colour)>
number of points  : NPoints <value>
description       :    Point <number of current point, starting from 0>: 0|1|2 (normal | control point | sphere center), Xpoint, Ypoint, Zpoint, Xnormal, Ynormal, Znormal
                       Note: the progressive point number (0...n^of points-1) is just for clarity: it isn't used during loading
                       es. Point 0     : 0, 12,10,12, 1,0,0

start primitive   : Poly   Nlati, S/F,T[<n^texture>],M<n^material>,C<n^colour>, nside1, nside2 , ..., nside N, Gngroup

                    BezCurv S/F,T[<n^texture>],M<n^material>,C<n^colour>, nside1, nside2, nside3, nside4, Gngroup

                    BezSurf Ustep, Vstep, S/F,T[<n^texture>],M<n^material>,C<n^colour>, nside1, nside2, ..., nside16, Gngroup

                    Sphere  S/F,T[<n^texture>],M<n^material>,C<n^colour>, npoint center, npoint radius, Gngroup


NB0 placing "R" or "r" in front of the name of the primitive (RPoly, RBezCurv,...), you can create a RAW primitive: you don't have to specify the number of the point to be used, but directly its coordinates
    eg. RPoly 3,S,T[0],M0,C0, x1,y1,z1, x2,y2,z2, x3,y3,z3

NB1 All coordinates are integers, with 17 bits fixed comma (i.e. to write: INT(coord*2^17); to read: coord/2^17)
    ALL BUT in the view (the three angles are INT(degrees*16)) and the colours :R,G,B between 0..255

NB2 Keyword are ALMOST CASE-INSENSITIVE: you can write Poly,POLY or poly.

NB3 During load, points' normals ARE DISCARED!
