<!-- ##### SECTION Title ##### -->
surfaces

<!-- ##### SECTION Short_Description ##### -->
Supports loading of .surf files and drawing of surfaces through OpenGL

<!-- ##### SECTION Long_Description ##### -->
<para>
Originally written by Luc Billard for his Visualize program. This
module allows loading of .surf files to draw scalar fields on top of
the current display scene. .surf files are text files which specs are
the following :
<itemizedlist>
<listitem><para>
1st line is arbitrary
</para></listitem>
<listitem><para>
2nd line must contain 3 real (float) values: dxx dyx dyy
</para></listitem>
<listitem><para>
3rd line must contain 3 real (float) values: dzx dzy dzz
</para></listitem>
<listitem><para>
4th line must contain 3 positive integers which
represents respectively the number of surfaces, the total number of
polys, and the total number of points
</para></listitem>
<listitem><para>
Then, for each of these surfaces :      
    
<itemizedlist> 
<listitem><para>
next line must contain the name of the surface : it is a
string which should match the pattern surface_*
</para></listitem>
<listitem><para>
next line must contain 2 positive integer values: the number of polys
(num_polys) and
the number of points (num_points) used by the surface
</para></listitem>
<listitem><para>
each of the following num_polys lines must match the pattern 
[n i_1 i_2 i_3 ... i_n] where n is the number of vertices in the poly (n >= 3)
and [i_1 i_2 i_3 ... i_n] are the numbering of these vertices (vertices numbered from 1 to num_points)
</para></listitem>
<listitem><para>
each of the following num_points lines must contain 6 real values for the 
successive (1 to num_points) points : [x y z nx ny nz], where x y z are the coordinates of the point
and nx ny nz are the coordinates of the unit normal at the point
</para></listitem>
</itemizedlist>

</para></listitem>
</itemizedlist>

It is the responsibility of the user to guarantee that
dxx, dyx, dyy, dzx, dzy, dzz match the one currently loaded in V_Sim's
current context. Though if you use <link
linkend="v-sim-panelSurfaces">panelSurfaces</link> you can ask
to resize the surfaces so that they fit in the current loaded box.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### FUNCTION vgl_load_surfaces ##### -->
<para>

</para>

@fich: 
@buf: 
@Returns: 
<!-- # Unused Parameters # -->
@fit_to_box: 


<!-- ##### FUNCTION vgl_order_polygons ##### -->
<para>

</para>



<!-- ##### FUNCTION draw_surfaces ##### -->
<para>

</para>

@view: 


<!-- ##### STRUCT surf_res ##### -->
<para>

</para>

@rendered: 
@material: 

<!-- ##### FUNCTION vgl_get_surfaces_number ##### -->
<para>

</para>

@surfaces_number: 


<!-- ##### FUNCTION vgl_get_surface_name ##### -->
<para>

</para>

@surf_index: 
@Returns: 


<!-- ##### FUNCTION vgl_get_surface_index ##### -->
<para>

</para>

@name: 
@Returns: 
<!-- # Unused Parameters # -->
@index: 


