Hierarchical vertex split

Name

Hierarchical vertex split -- hierarchical extension of the vertex split.

Synopsis


#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);

Description

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.

Details

GTS_HSPLIT_CLASS()

#define     GTS_HSPLIT_CLASS(klass)

Casts klass to GtsHSplitClass.

klass :

a descendant of GtsHSplitClass.


GTS_HSPLIT()

#define     GTS_HSPLIT(obj)

Casts obj to GtsHSplit.

obj :

a descendant of GtsHSplit.


GTS_IS_HSPLIT()

#define     GTS_IS_HSPLIT(obj)

Evaluates to TRUE if obj is a GtsHSplit, FALSE otherwise.

obj :

a pointer to test.


struct GtsHSplitClass

struct GtsHSplitClass {

  GtsSplitClass parent_class;
};

The hierarchical split vertex class derived from GtsSplitClass.


struct GtsHSplit

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.

guint nchild

Number of expanded children of this vertex split (0, 1, or 2).


gts_hsplit_class ()

GtsHSplitClass* gts_hsplit_class            (void);

Returns :

the GtsHSplitClass.


gts_hsplit_new ()

GtsHSplit*  gts_hsplit_new                  (GtsHSplitClass *klass,
                                             GtsSplit *vs);

klass :

a GtsHSplitClass.

vs :

a GtsSplit.

Returns :

a new GtsHSplit, hierarchical extension of vs.


gts_hsplit_collapse ()

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.


gts_hsplit_expand ()

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.


gts_hsplit_force_expand ()

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.