AdgEdges — A model with the edges of another model
AdgEdges; AdgEdges * adg_edges_new (void); AdgEdges * adg_edges_new_with_source (AdgTrail *source); void adg_edges_set_source (AdgEdges *edges, AdgTrail *source); AdgTrail * adg_edges_get_source (AdgEdges *edges); void adg_edges_set_critical_angle (AdgEdges *edges, gdouble angle); gdouble adg_edges_get_critical_angle (AdgEdges *edges);
The AdgEdges can be used to render the edges of a yet existing AdgTrail source. It is useful for any part made by revolution, where the shape is symmetric along a specific axis and thus the corners can be easily computed.
typedef struct _AdgEdges AdgEdges;
All fields are private and should not be used directly. Use its public methods instead.
AdgEdges * adg_edges_new (void);
Creates a new undefined model to keep track of the edges of
another model. You should at least set the referred AdgTrail
with adg_edges_set_source().
|
Returns : |
the newly created edges model |
AdgEdges * adg_edges_new_with_source (AdgTrail *source);
Creates a new edges model explicitely specifying the source trail.
|
Returns : |
the newly created edges model |
void adg_edges_set_source (AdgEdges *edges, AdgTrail *source);
Sets source as the source trail for edges.
AdgTrail * adg_edges_get_source (AdgEdges *edges);
Gets the source AdgTrail of this edges model.
void adg_edges_set_critical_angle (AdgEdges *edges, gdouble angle);
Sets a new critical angle on edges. The critical angle defines
what corner should generate an edge and what not. Typical values
are close to 0, being 0 the lowest angle where all the corners
generate an edge.
|
|
an AdgEdges |
|
|
the new angle (in radians) |
gdouble adg_edges_get_critical_angle (AdgEdges *edges);
Gets the current critical angle of edges. The angle is internally
converted to a threshold value, so the returned angle could be not
exactly what set throught adg_edges_set_critical_angle().
|
|
an AdgEdges |
|
Returns : |
the value (in radians) of the critical angle |
"critical-angle" property"critical-angle" gdouble : Read / Write
The angle that defines which corner generates an edge (if the corner angle is greater than this critical angle) and which edge is ignored.
Allowed values: [0,3.14159]
Default value: 0.0698132
"source" property"source" AdgTrail* : Read / Write / Construct
The source where the edges should be computed from.