Description
The vertex split object is the building block of the progressive mesh representation proposed by Hoppe ("Progressive meshes", SIGGRAPH, 1996). It encodes an edge collapse operation and its inverse the "vertex split". The implementation of vertex split in GTS is somewhat more general than the original version of Hoppe. Non-manifold edges can be collapsed and non-manifold vertices can be split.
Details
GTS_SPLIT_CLASS()
#define GTS_SPLIT_CLASS(klass) |
Casts klass to GtsSplitClass.
GTS_IS_SPLIT()
#define GTS_IS_SPLIT(obj) |
Evaluates to TRUE if obj is a GtsSplit.
GTS_SPLIT_V1()
Evaluates to the first vertex of the edge collapsed by vs.
GTS_SPLIT_V2()
Evaluates to the second vertex of the edge collapsed by vs.
struct GtsSplitClass
The vertex split class.
struct GtsSplitCFace
An opaque structure describing the faces collapsed by a vertex split.
struct GtsSplit
struct GtsSplit {
GtsObject object;
GtsVertex * v;
GtsObject * v1;
GtsObject * v2;
GtsSplitCFace * cfaces;
guint ncf;
}; |
The vertex split object. If v1 is a GtsSplit the corresponding vertex can be found in GTS_SPLIT(v1)->v. This conversion is performed directly by the two macros GTS_SPLIT_V1 and GTS_SPLIT_V2. Together with the current GtsSplit, v1 and v2 define one level of a vertex split tree. If v1 or v2 are both GtsVertex, the current vertex split is a leaf of the tree.
gts_split_new ()
Creates a new GtsSplit which would collapse o1 and o2 into v. The
collapse itself is not performed.
gts_split_collapse ()
Collapses the vertex split vs. Any new edge created during the process will
be of class klass. If heap is not NULL, the new edges will be inserted
into it and the destroyed edges will be removed from it.
gts_split_expand ()
Expands the vertex split vs adding the newly created faces to s. Any
new edge will be of class klass.
gts_split_height ()
guint gts_split_height (GtsSplit *root); |
GtsSplitTraverseFunc ()
gboolean (*GtsSplitTraverseFunc) (GtsSplit *vs,
gpointer data); |
A user-defined function to be called when traversing a vertex split tree.
gts_split_traverse ()
Traverses the GtsSplit tree having root as root. Calls func for each
GtsSplit of the tree in the order specified by order. If order is set
to G_PRE_ORDER func is called for the GtsSplit then its children, if order
is set to G_POST_ORDER func is called for the children and then for the
GtsSplit.