GTS Library Reference Manual |
---|
#include <gts.h> #define GTS_HSPLIT_CLASS (klass) #define GTS_HSPLIT (obj) #define GTS_IS_HSPLIT (obj) struct GtsHSplitClass; struct GtsHSplit; GtsHSplitClass* gts_hsplit_class (void); GtsHSplit* gts_hsplit_new (GtsHSplitClass *klass, GtsSplit *vs); void gts_hsplit_collapse (GtsHSplit *hs, GtsHSurface *hsurface); void gts_hsplit_expand (GtsHSplit *hs, GtsHSurface *hsurface); void gts_hsplit_force_expand (GtsHSplit *hs, GtsHSurface *hsurface);
Hierarchical vertex splits are the building blocks of hierarchical surfaces. They are derived from GtsSplit objects but add pointers to their parents in the vertex split tree and information on the state (collapsed or expanded) of their children.
Together with GtsEHeapPair fields these informations allow to manage any valid sequence of expansions or collapses.
#define GTS_HSPLIT_CLASS(klass)
Casts klass to GtsHSplitClass.
klass : | a descendant of GtsHSplitClass. |
#define GTS_IS_HSPLIT(obj)
Evaluates to TRUE if obj is a GtsHSplit, FALSE otherwise.
obj : | a pointer to test. |
struct GtsHSplitClass { GtsSplitClass parent_class; };
The hierarchical split vertex class derived from GtsSplitClass.
struct GtsHSplit { GtsSplit split; GtsEHeapPair * index; GtsHSplit * parent; guint nchild; };
The hierarchical split vertex object.
GtsSplit split | The parent object. |
GtsEHeapPair *index | Used when managing priority heaps for vertex split and collapse. |
GtsHSplit *parent | Parent of this hierarchical split vertex in the split vertex tree. |
nchild | Number of expanded children of this vertex split (0, 1, or 2). |
GtsHSplit* gts_hsplit_new (GtsHSplitClass *klass, GtsSplit *vs);
klass : | |
vs : | a GtsSplit. |
Returns : | a new GtsHSplit, hierarchical extension of vs. |
void gts_hsplit_collapse (GtsHSplit *hs, GtsHSurface *hsurface);
Collapses the GtsSplit defined by hs, updates the expandable and collapsable priority heaps of hsurface.
hs : | a GtsHSplit. |
hsurface : | a GtsHSurface. |
void gts_hsplit_expand (GtsHSplit *hs, GtsHSurface *hsurface);
Expands the GtsSplit defined by hs (which must be expandable) and updates the priority heaps of hsurface.
hs : | a GtsHSplit. |
hsurface : | a GtsHSurface. |
void gts_hsplit_force_expand (GtsHSplit *hs, GtsHSurface *hsurface);
Forces the expansion of hs by first expanding all its dependencies not already expanded.
hs : | a GtsHSplit. |
hsurface : | a GtsHSurface. |
<<< Progressive surfaces | Hierarchical surfaces >>> |