## surfaces_resources

surfaces_resources — Define the rendering parameters of a surface.

## Synopsis

                        VisuSurfacesResources;
    VisuSurfacesResources* visu_surfaces_resources_getFromName
                                                            (const gchar *surf_name,
                                                             gboolean *new_surf);
    void                visu_surfaces_resources_copy        (VisuSurfacesResources *res,
                                                             VisuSurfacesResources *res_old);
    void                visu_surfaces_resources_free        (VisuSurfacesResources *res);
    void                initIsosurfacesResources            (void);

## Description

This structure stores all the rendering elements of a set of Surfaces.

## Details

### VisuSurfacesResources

    typedef struct {
      /* Name used to label the surface. */
      gchar *surfnom;

      /* Material used to draw a specific surface. */
      ToolColor *color;
      float material[5];

      /* Rendered or not */
      gboolean rendered;

      /* Sensitive to masking properties of planes. */
      gboolean sensitiveToMaskingPlanes;
    } VisuSurfacesResources;

This structure defines some drawing properties of a set of Surfaces.

gchar *`surfnom`; | the name of the surface (in UTF-8) ;
ToolColor *`color`; | a ToolColor for the surface ;
float `material`[5]; | the lighting effects of the surface ;
gboolean `rendered`; | boolean for the visibility of the surface ;
gboolean `sensitiveToMaskingPlanes`; | boolean for the sensitivity of a surface to the masking effect of planes.

### visu_surfaces_resources_getFromName ()

    VisuSurfacesResources* visu_surfaces_resources_getFromName
                                                            (const gchar *surf_name,
                                                             gboolean *new_surf);

This returns the resource information matching the given `surf_name`. If the resource doesn't exist, it is created and `new` is set to TRUE. If the given name (`surf_name`) is NULL, then a new resource is created, but it is not stored and will not be shared by surfaces.

`surf_name` : | the name of the surface (can be NULL) ;
`new_surf` : | a location to store a boolean value (can be NULL).
Returns : | the resource (created or retrieved).

### visu_surfaces_resources_copy ()

    void                visu_surfaces_resources_copy        (VisuSurfacesResources *res,
                                                             VisuSurfacesResources *res_old);

This method copies all values from `res_old` to `res`.

`res` : | an allocated VisuSurfacesResources object to receive values ;
`res_old` : | a VisuSurfacesResources to read the values from.

### visu_surfaces_resources_free ()

    void                visu_surfaces_resources_free        (VisuSurfacesResources *res);

This method frees the memory used by the given resource.

`res` : | an allocated VisuSurfacesResources object to be freed.

### initIsosurfacesResources ()

    void                initIsosurfacesResources            (void);