|
|
|
|
adg-1 reference manual |
|
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct AdgEdges; struct AdgEdgesClass;gdouble adg_edges_get_axis_angle (AdgEdges *edges);gdouble adg_edges_get_critical_angle (AdgEdges *edges); AdgTrail * adg_edges_get_source (AdgEdges *edges); AdgEdges * adg_edges_new (void); AdgEdges * adg_edges_new_with_source (AdgTrail *source);void adg_edges_set_axis_angle (AdgEdges *edges,);gdouble anglevoid adg_edges_set_critical_angle (AdgEdges *edges,);gdouble anglevoid adg_edges_set_source (AdgEdges *edges,AdgTrail *source);
"axis-angle"gdouble : Read / Write "critical-angle"gdouble : Read / Write "source" AdgTrail* : Read / Write / Construct
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 edge lines can be easily computed.
The trail can be set by changing the "source" property
or the relevant APIs. If the trail changes, a recomputation
can be forced by calling the adg_model_clear() method.
The angle of the axis is implied to pass through the (0,0) point and has an angle of "axis-angle" radiants. The default is a 0 radiant angle, meaning the y=0 axis is assumed.
struct AdgEdges;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
gdouble adg_edges_get_axis_angle (AdgEdges *edges);
Gets the angle of the supposed axis of edges. Refer to
adg_edges_set_axis_angle() for details of what this parameter
is used for.
|
|
an AdgEdges |
|
Returns : |
the value (in radians) of the axis angle |
Since 1.0
gdouble adg_edges_get_critical_angle (AdgEdges *edges);
Gets the current critical angle of edges. Refer to
adg_edges_set_critical_angle() for details of what this parameter
is used for.
|
|
an AdgEdges |
|
Returns : |
the value (in radians) of the critical angle |
Since 1.0
AdgTrail * adg_edges_get_source (AdgEdges *edges);
Gets the source AdgTrail of this edges model.
The returned object is owned by edges and should not be
freed or modified.
|
|
an AdgEdges |
|
Returns : |
the requested AdgTrail or NULL |
Since 1.0
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 |
Since 1.0
AdgEdges * adg_edges_new_with_source (AdgTrail *source);
Creates a new edges model explicitely specifying the source trail.
|
Returns : |
the newly created edges model |
Since 1.0
void adg_edges_set_axis_angle (AdgEdges *edges,);gdouble angle
Sets the axis angle of edges to angle, basically setting
the "axis-angle" property. All the resulting edge
lines will be normal to this axis.
It is implied the axis will pass through the (0,0) point, so the underlying trail should be constructed accordingly.
|
|
an AdgEdges |
|
|
the new angle (in radians) |
Since 1.0
void adg_edges_set_critical_angle (AdgEdges *edges,);gdouble angle
Sets the critical angle of edges to angle, basically setting
the "critical-angle" property.
The critical angle defines what corner should generate an edge and
what not. Typical values are close to 00
|
|
an AdgEdges |
|
|
the new angle (in radians) |
Since 1.0
"axis-angle" property"axis-angle"gdouble : Read / Write
The angle of the axis of the source trail: it is implied this axis passes through (0,0).
Allowed values: [-3.14159,3.14159]
Default value: 0
"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 from which the edges should be computed from.