Description
Progressive surfaces allow you to control precisely and continuously the level of detail of a GtsSurface. They are built off-line by storing the sequence of edge collapses performed during surface simplification (see gts_psurface_new()). Fast traversal of the pre-built sequence allow on-line selection of the required level of detail.
Using the gts_psurface_write() function a text representation of a progressive surface can be written to a file, pipe or socket. This text representation allows the progressive transmission of a surface, starting with the coarsest representation and progressively refining it as data is read or received (see gts_psurface_open(), gts_psurface_read_vertex() and gts_psurface_close() for details).
Details
GTS_PSURFACE_CLASS()
#define GTS_PSURFACE_CLASS(klass) |
Casts klass to GtsPSurfaceClass.
GTS_PSURFACE()
#define GTS_PSURFACE(obj) |
Casts obj to GtsPSurface.
GTS_IS_PSURFACE()
#define GTS_IS_PSURFACE(obj) |
Evaluates to TRUE if obj is a GtsPSurface, FALSE otherwise.
GTS_PSURFACE_IS_CLOSED()
#define GTS_PSURFACE_IS_CLOSED(ps) (!(ps)->vertices) |
Evaluates to TRUE if ps has not been created with gts_psurface_open() or if
it has been closed using gts_psurface_close().
struct GtsPSurfaceClass
The progressive surface class derived from GtsObjectClass.
struct GtsPSurface
struct GtsPSurface {
GtsObject object;
GtsSurface * s;
GPtrArray * split;
GtsSplitClass * split_class;
guint pos, min;
GPtrArray * vertices;
GPtrArray * faces;
}; |
The progressive surface object.
derived from GtsObject. The field s is the GtsSurface being refined or coarsened by operations on the progressive surface. All the other fields must be considered private and accessed only through the following functions.
gts_psurface_new ()
This function works in exactly the same way as the
gts_surface_coarsen() function, except that the history of edge
collapse is saved in an array of GtsSplit objects. This allows for
dynamic continuous multiresolution control of the input surface.
gts_psurface_add_vertex ()
Adds a vertex to the progressive surface ps by expanding the next
available GtsSplit.
gts_psurface_remove_vertex ()
Removes one vertex from the progressive surface ps by collapsing the first
available GtsSplit.
gts_psurface_set_vertex_number ()
void gts_psurface_set_vertex_number (GtsPSurface *ps,
guint n); |
Performs the required number of collapses or expansions to set the number
of vertices of ps to n.
gts_psurface_get_vertex_number ()
guint gts_psurface_get_vertex_number (GtsPSurface *ps); |
gts_psurface_min_vertex_number ()
guint gts_psurface_min_vertex_number (GtsPSurface *ps); |
gts_psurface_max_vertex_number ()
guint gts_psurface_max_vertex_number (GtsPSurface *ps); |
gts_psurface_foreach_vertex ()
Calls func for each (potential) vertex of ps, whether actually used
or not. The vertices are called in the order they were created during the
edge collapse operation.
gts_psurface_read_vertex ()
Reads in one vertex split operation from fp and performs the expansion.
If an error occurs while reading the file, the error field of fp is set.
gts_psurface_close ()
Closes a progressive surface.
gts_psurface_write ()
Writes to fptr a GTS progressive surface description.