| V_Sim API - Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
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);
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 * |
the name of the surface (in UTF-8) ; |
ToolColor * |
a ToolColor for the surface ; |
| the lighting effects of the surface ; | |
gboolean |
boolean for the visibility of the surface ; |
gboolean |
boolean for the sensitivity of a surface to the masking effect of planes. |
void visu_surfaces_resources_copy (VisuSurfacesResources *res,VisuSurfacesResources *res_old);
This method copies all values from res_old to res.
|
an allocated VisuSurfacesResources object to receive values ; |
|
a VisuSurfacesResources to read the values from. |
void visu_surfaces_resources_free (VisuSurfacesResources *res);
This method frees the memory used by the given resource.
|
an allocated VisuSurfacesResources object to be freed. |
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.
|
the name of the surface (can be NULL) ; |
|
a location to store a boolean value (can be NULL). |
Returns : |
the resource (created or retrieved). [transfer none] |
gboolean visu_surfaces_resources_getRendered (const VisuSurfacesResources *res);
Retrieves the rendering status of a surface.
|
the resource storing rendering information of a surface. |
Returns : |
TRUE, if the resource indicate a renedered surface. |
Since 3.7
void visu_surfaces_resources_init (void);
Internal routine called automatically on VisuSurfacesClass creation. Do not use it.