surfaces_resources

surfaces_resources — Define the rendering parameters of a surface.

Synopsis

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

Object Hierarchy

  GBoxed
   +----VisuSurfacesResources

Description

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

Details

struct VisuSurfacesResources

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

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

  /* Rendered or not */
  gboolean rendered;

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

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

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 sensitiveToPlanes;

boolean for the sensitivity of a surface to the masking effect of planes.

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.

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). [transfer none]

visu_surfaces_resources_getRendered ()

gboolean            visu_surfaces_resources_getRendered (const VisuSurfacesResources *res);

Retrieves the rendering status of a surface.

res :

the resource storing rendering information of a surface.

Returns :

TRUE, if the resource indicate a renedered surface.

Since 3.7


visu_surfaces_resources_init ()

void                visu_surfaces_resources_init        (void);

Internal routine called automatically on VisuSurfacesClass creation. Do not use it.