AdgEdges

AdgEdges — A model with the edges of another model

Object Hierarchy

  GObject
   +----AdgModel
         +----AdgTrail
               +----AdgEdges

Properties

  "critical-angle"           gdouble               : Read / Write
  "source"                   AdgTrail*             : Read / Write / Construct

Description

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.

TODO

  • Actually the edges of the source trail are always computed taking the y=0 axis as the origin: anyway, it would be not too hard to apply an arbitrary transformation to aling the trail on the y=0 axis, compute the edges as usual and apply the inverse transformation to the result.

Details

AdgEdges

typedef struct _AdgEdges AdgEdges;

All fields are private and should not be used directly. Use its public methods instead.


adg_edges_new ()

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

adg_edges_new_with_source ()

AdgEdges *          adg_edges_new_with_source           (AdgTrail *source);

Creates a new edges model explicitely specifying the source trail.

Returns :

the newly created edges model

adg_edges_set_source ()

void                adg_edges_set_source                (AdgEdges *edges,
                                                         AdgTrail *source);

Sets source as the source trail for edges.

edges :

an AdgEdges

source :

the new source AdgTrail

adg_edges_get_source ()

AdgTrail *          adg_edges_get_source                (AdgEdges *edges);

Gets the source AdgTrail of this edges model.

edges :

an AdgEdges

Returns :

the requested AdgTrail or NULL on errors

adg_edges_set_critical_angle ()

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.

edges :

an AdgEdges

angle :

the new angle (in radians)

adg_edges_get_critical_angle ()

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().

edges :

an AdgEdges

Returns :

the value (in radians) of the critical angle

Property Details

The "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


The "source" property

  "source"                   AdgTrail*             : Read / Write / Construct

The source where the edges should be computed from.

AdgEdges was last modified by gtk-doc on Sat 24 Jul 2010 09:35:27 AM CEST
Hosted by Get Automatic Drawing Generation at SourceForge.net. Fast, secure and Free Open Source software downloads
Search on this domain