<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Out-of-core simplification</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="GTS Library Reference Manual" HREF="book1.html"><LINK REL="UP" TITLE="Surface operations" HREF="c12206.html"><LINK REL="PREVIOUS" TITLE="Surface simplification and refinement" HREF="gts-surface-simplification-and-refinement.html"><LINK REL="NEXT" TITLE="Isosurfaces from 3D functions" HREF="gts-isosurfaces-from-3d-functions.html"><STYLE TYPE="text/css" >.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .navigation { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0.5em; margin-bottom: 0.5em; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } .navigation .title { font-size: 200%; }</STYLE ></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><TABLE WIDTH="100%" CLASS="navigation" SUMMARY="Navigation header" CELLPADDING="2" CELLSPACING="2" ><TR VALIGN="middle" ><TD ><A ACCESSKEY="p" HREF="gts-surface-simplification-and-refinement.html" ><IMG SRC="left.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Prev"></A ></TD ><TD ><A ACCESSKEY="u" HREF="c12206.html" ><IMG SRC="up.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Up"></A ></TD ><TD ><A ACCESSKEY="h" HREF="book1.html" ><IMG SRC="home.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Home"></A ></TD ><TH WIDTH="100%" align="center" >GTS Library Reference Manual</TH ><TD ><A ACCESSKEY="n" HREF="gts-isosurfaces-from-3d-functions.html" ><IMG SRC="right.png" WIDTH="24" HEIGHT="24" BORDER="0" ALT="Next"></A ></TD ></TR ></TABLE ><H1 ><A NAME="GTS-OUT-OF-CORE-SIMPLIFICATION" ></A >Out-of-core simplification</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN13242" ></A ><H2 >Name</H2 >Out-of-core simplification -- objects for simplification based on vertex clustering.</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN13245" ></A ><H2 >Synopsis</H2 ><PRE CLASS="SYNOPSIS" > #include <gts.h> #define <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS:CAPS" >GTS_CLUSTER_CLASS</A > (klass) #define <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER:CAPS" >GTS_CLUSTER</A > (obj) #define <A HREF="gts-out-of-core-simplification.html#GTS-IS-CLUSTER:CAPS" >GTS_IS_CLUSTER</A > (obj) <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A >; <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A >; <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERID" >GtsClusterId</A >; <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A >* <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-CLASS" >gts_cluster_class</A > (void); <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A >* <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-NEW" >gts_cluster_new</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A > *klass, <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERID" >GtsClusterId</A > id, <A HREF="gts-vertices.html#GTSVERTEXCLASS" >GtsVertexClass</A > *vklass); <GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-ADD" >gts_cluster_add</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A > *c, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p, <GTKDOCLINK HREF="GPOINTER" >gpointer</GTKDOCLINK > data); <GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-UPDATE" >gts_cluster_update</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A > *c); #define <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS:CAPS" >GTS_CLUSTER_GRID_CLASS</A > (klass) #define <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID:CAPS" >GTS_CLUSTER_GRID</A > (obj) #define <A HREF="gts-out-of-core-simplification.html#GTS-IS-CLUSTER-GRID:CAPS" >GTS_IS_CLUSTER_GRID</A > (obj) <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" >GtsClusterGridClass</A >; <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A >; <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" >GtsClusterGridClass</A >* <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-CLASS" >gts_cluster_grid_class</A > (void); <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A >* <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-NEW" >gts_cluster_grid_new</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" >GtsClusterGridClass</A > *klass, <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A > *cluster_class, <A HREF="gts-surfaces.html#GTSSURFACE" >GtsSurface</A > *s, <A HREF="gts-bounding-boxes-trees.html#GTSBBOX" >GtsBBox</A > *bbox, <GTKDOCLINK HREF="GDOUBLE" >gdouble</GTKDOCLINK > delta); <GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-ADD-TRIANGLE" >gts_cluster_grid_add_triangle</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A > *cluster_grid, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p1, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p2, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p3, <GTKDOCLINK HREF="GPOINTER" >gpointer</GTKDOCLINK > data); <A HREF="gts-simple-statistics.html#GTSRANGE" >GtsRange</A > <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-UPDATE" >gts_cluster_grid_update</A > (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A > *cluster_grid);</PRE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN13293" ></A ><H2 >Description</H2 ><P >Using vertex clusters and vertex cluster grids it is easy to design out-of-core algorithms for surface simplification. This approach has been detailed in a recent paper by Lindstrom and Turk ("Out-of-core simplification of large polygonal models", 2000).</P ><P >Vertex clusters are just groups of vertices collapsed into a single vertex. The position of this single representative vertex can be derived with different techniques. The default GTS implementation <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A > just takes the average of the positions of the vertices in a given cluster as the representative position. Clusters are created using <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-NEW" ><CODE CLASS="FUNCTION" >gts_cluster_new()</CODE ></A >. The cluster is initially empty and the position of the representative vertex is set to the origin. Vertices are added using <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-ADD" ><CODE CLASS="FUNCTION" >gts_cluster_add()</CODE ></A > which calls the <GTKDOCLINK HREF="ADD" ><CODE CLASS="FUNCTION" >add()</CODE ></GTKDOCLINK > virtual method of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >. Once all the vertices have been added <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-UPDATE" ><CODE CLASS="FUNCTION" >gts_cluster_update()</CODE ></A > computes the position of the representative vertex.</P ><P >Clusters are grouped using the <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" ><SPAN CLASS="TYPE" >GtsClusterGrid</SPAN ></A > object which is just an implementation of the hash-table based regular grid of Lindstrom and Turk. This regular grid is created using <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-NEW" ><CODE CLASS="FUNCTION" >gts_cluster_grid_new()</CODE ></A >. Once created triangles of the surface to be simplified can be added using <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-ADD-TRIANGLE" ><CODE CLASS="FUNCTION" >gts_cluster_grid_add_triangle()</CODE ></A > which adds the vertices of the triangle to the <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A > they belong to and adds the corresponding faces to the simplified surface. After all the triangles of the original surface have been added the position of the representative vertex of all the vertex clusters is computed using <A HREF="gts-out-of-core-simplification.html#GTS-CLUSTER-GRID-UPDATE" ><CODE CLASS="FUNCTION" >gts_cluster_grid_update()</CODE ></A >. The simplified surface is then complete and the cluster grid can be destroyed using <A HREF="gts-object-class.html#GTS-OBJECT-DESTROY" ><CODE CLASS="FUNCTION" >gts_object_destroy()</CODE ></A >.</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN13322" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN13324" ></A ><H3 ><A NAME="GTS-CLUSTER-CLASS:CAPS" ></A >GTS_CLUSTER_CLASS()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_CLUSTER_CLASS(klass)</PRE ><P >Casts <CODE CLASS="PARAMETER" >klass</CODE > to <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13335"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >klass</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a descendant of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13342" ></A ><H3 ><A NAME="GTS-CLUSTER:CAPS" ></A >GTS_CLUSTER()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_CLUSTER(obj)</PRE ><P >Casts <CODE CLASS="PARAMETER" >obj</CODE > to <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13353"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >obj</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a descendant of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13360" ></A ><H3 ><A NAME="GTS-IS-CLUSTER:CAPS" ></A >GTS_IS_CLUSTER()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_IS_CLUSTER(obj)</PRE ><P >Evaluates to <TT CLASS="LITERAL" >TRUE</TT > if <CODE CLASS="PARAMETER" >obj</CODE > is a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >, <TT CLASS="LITERAL" >FALSE</TT > otherwise.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13373"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >obj</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a pointer to test. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13378" ></A ><H3 ><A NAME="GTSCLUSTERCLASS" ></A >GtsClusterClass</H3 ><PRE CLASS="PROGRAMLISTING" >typedef struct { GtsObjectClass parent_class; void (* add) (GtsCluster * c, GtsPoint * p, gpointer data); void (* update) (GtsCluster * c); } GtsClusterClass;</PRE ><P >The cluster class derived from <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >. Virtual function <CODE CLASS="PARAMETER" >add</CODE > adds point <CODE CLASS="PARAMETER" >p</CODE > to the cluster while passing user-data <CODE CLASS="PARAMETER" >data</CODE >. Virtual function <CODE CLASS="PARAMETER" >update</CODE > computes the position of the representative vertex.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13391" ></A ><H3 ><A NAME="GTSCLUSTER" ></A >GtsCluster</H3 ><PRE CLASS="PROGRAMLISTING" >typedef struct { GtsObject parent; GtsClusterId id; GtsVertex * v; guint n; } GtsCluster;</PRE ><P >The cluster object.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13399"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-object-class.html#GTSOBJECT" >GtsObject</A > <CODE CLASS="STRUCTFIELD" >parent</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >The parent object.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13405"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTERID" >GtsClusterId</A > <CODE CLASS="STRUCTFIELD" >id</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Unique identifier.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13411"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-vertices.html#GTSVERTEX" >GtsVertex</A > *<CODE CLASS="STRUCTFIELD" >v</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P ><A HREF="gts-vertices.html#GTSVERTEX" ><SPAN CLASS="TYPE" >GtsVertex</SPAN ></A > representative of all the vertices in the cluster.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13419"><SPAN STYLE="white-space: nowrap" ><GTKDOCLINK HREF="GUINT" >guint</GTKDOCLINK > <CODE CLASS="STRUCTFIELD" >n</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Number of vertices added to the cluster. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13425" ></A ><H3 ><A NAME="GTSCLUSTERID" ></A >GtsClusterId</H3 ><PRE CLASS="PROGRAMLISTING" >typedef struct { guint x, y, z; } GtsClusterId;</PRE ><P ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13432" ></A ><H3 ><A NAME="GTS-CLUSTER-CLASS" ></A >gts_cluster_class ()</H3 ><PRE CLASS="PROGRAMLISTING" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A >* gts_cluster_class (void);</PRE ><P ></P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13442"><SPAN STYLE="white-space: nowrap" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13449" ></A ><H3 ><A NAME="GTS-CLUSTER-NEW" ></A >gts_cluster_new ()</H3 ><PRE CLASS="PROGRAMLISTING" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A >* gts_cluster_new (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A > *klass, <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERID" >GtsClusterId</A > id, <A HREF="gts-vertices.html#GTSVERTEXCLASS" >GtsVertexClass</A > *vklass);</PRE ><P ></P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13462"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >klass</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13469"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >id</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the id of the new cluster.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13474"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >vklass</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-vertices.html#GTSVERTEXCLASS" ><SPAN CLASS="TYPE" >GtsVertexClass</SPAN ></A > for the representative vertex of the cluster.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13481"><SPAN STYLE="white-space: nowrap" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a new <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13488" ></A ><H3 ><A NAME="GTS-CLUSTER-ADD" ></A >gts_cluster_add ()</H3 ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > gts_cluster_add (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A > *c, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p, <GTKDOCLINK HREF="GPOINTER" >gpointer</GTKDOCLINK > data);</PRE ><P >Adds point <CODE CLASS="PARAMETER" >p</CODE > to cluster <CODE CLASS="PARAMETER" >c</CODE >.</P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13503"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >c</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13510"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >p</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-points.html#GTSPOINT" ><SPAN CLASS="TYPE" >GtsPoint</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13517"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >data</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > data to pass to the <GTKDOCLINK HREF="ADD" ><CODE CLASS="FUNCTION" >add()</CODE ></GTKDOCLINK > virtual method of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" ><SPAN CLASS="TYPE" >GtsClusterClass</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13526" ></A ><H3 ><A NAME="GTS-CLUSTER-UPDATE" ></A >gts_cluster_update ()</H3 ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > gts_cluster_update (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" >GtsCluster</A > *c);</PRE ><P >Updates the position of the vertex representative of all the vertices added to <CODE CLASS="PARAMETER" >c</CODE >.</P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13538"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >c</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13545" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID-CLASS:CAPS" ></A >GTS_CLUSTER_GRID_CLASS()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_CLUSTER_GRID_CLASS(klass)</PRE ><P >Casts <CODE CLASS="PARAMETER" >klass</CODE > to <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" ><SPAN CLASS="TYPE" >GtsClusterGridClass</SPAN ></A >.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13556"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >klass</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a descendant of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" ><SPAN CLASS="TYPE" >GtsClusterGridClass</SPAN ></A >. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13563" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID:CAPS" ></A >GTS_CLUSTER_GRID()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_CLUSTER_GRID(obj)</PRE ><P >Casts <CODE CLASS="PARAMETER" >obj</CODE > to <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13574"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >obj</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a descendant of <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13581" ></A ><H3 ><A NAME="GTS-IS-CLUSTER-GRID:CAPS" ></A >GTS_IS_CLUSTER_GRID()</H3 ><PRE CLASS="PROGRAMLISTING" >#define GTS_IS_CLUSTER_GRID(obj)</PRE ><P >Evaluates to <TT CLASS="LITERAL" >TRUE</TT > if <CODE CLASS="PARAMETER" >obj</CODE > is a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTER" ><SPAN CLASS="TYPE" >GtsCluster</SPAN ></A >, <TT CLASS="LITERAL" >FALSE</TT > otherwise.</P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13594"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >obj</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >a pointer to test. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13599" ></A ><H3 ><A NAME="GTSCLUSTERGRIDCLASS" ></A >GtsClusterGridClass</H3 ><PRE CLASS="PROGRAMLISTING" >typedef struct { GtsObjectClass parent_class; } GtsClusterGridClass;</PRE ><P >The cluster grid class derived from <A HREF="gts-object-class.html#GTSOBJECTCLASS" ><SPAN CLASS="TYPE" >GtsObjectClass</SPAN ></A >.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13608" ></A ><H3 ><A NAME="GTSCLUSTERGRID" ></A >GtsClusterGrid</H3 ><PRE CLASS="PROGRAMLISTING" >typedef struct { GtsObject parent; GtsSurface * surface; GtsBBox * bbox; GtsVector size; GtsClusterClass * cluster_class; GHashTable * clusters; } GtsClusterGrid;</PRE ><P >The cluster grid object. </P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13616"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-object-class.html#GTSOBJECT" >GtsObject</A > <CODE CLASS="STRUCTFIELD" >parent</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >The parent object.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13622"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-surfaces.html#GTSSURFACE" >GtsSurface</A > *<CODE CLASS="STRUCTFIELD" >surface</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Surface being simplified.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13628"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-bounding-boxes-trees.html#GTSBBOX" >GtsBBox</A > *<CODE CLASS="STRUCTFIELD" >bbox</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Bounding box of the original surface.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13634"><SPAN STYLE="white-space: nowrap" ><GTKDOCLINK HREF="GTSVECTOR" >GtsVector</GTKDOCLINK > <CODE CLASS="STRUCTFIELD" >size</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Size of the simplification grid.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13640"><SPAN STYLE="white-space: nowrap" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A > *<CODE CLASS="STRUCTFIELD" >cluster_class</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Private.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13646"><SPAN STYLE="white-space: nowrap" ><GTKDOCLINK HREF="GHASHTABLE" >GHashTable</GTKDOCLINK > *<CODE CLASS="STRUCTFIELD" >clusters</CODE >;</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P >Private. </P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13652" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID-CLASS" ></A >gts_cluster_grid_class ()</H3 ><PRE CLASS="PROGRAMLISTING" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" >GtsClusterGridClass</A >* gts_cluster_grid_class (void);</PRE ><P ></P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13662"><SPAN STYLE="white-space: nowrap" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" ><SPAN CLASS="TYPE" >GtsClusterGridClass</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13669" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID-NEW" ></A >gts_cluster_grid_new ()</H3 ><PRE CLASS="PROGRAMLISTING" ><A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A >* gts_cluster_grid_new (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" >GtsClusterGridClass</A > *klass, <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERCLASS" >GtsClusterClass</A > *cluster_class, <A HREF="gts-surfaces.html#GTSSURFACE" >GtsSurface</A > *s, <A HREF="gts-bounding-boxes-trees.html#GTSBBOX" >GtsBBox</A > *bbox, <GTKDOCLINK HREF="GDOUBLE" >gdouble</GTKDOCLINK > delta);</PRE ><P ></P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13684"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >klass</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRIDCLASS" ><SPAN CLASS="TYPE" >GtsClusterGridClass</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13691"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >cluster_class</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the klass to be used for the vertex clusters.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13696"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >s</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the simplified surface.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13701"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >bbox</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > bounding box of the surface to be simplified.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13706"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >delta</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > the size of one grid cell of the simplification grid.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13711"><SPAN STYLE="white-space: nowrap" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a new <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" ><SPAN CLASS="TYPE" >GtsClusterGrid</SPAN ></A >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13718" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID-ADD-TRIANGLE" ></A >gts_cluster_grid_add_triangle ()</H3 ><PRE CLASS="PROGRAMLISTING" ><GTKDOCLINK HREF="VOID" >void</GTKDOCLINK > gts_cluster_grid_add_triangle (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A > *cluster_grid, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p1, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p2, <A HREF="gts-points.html#GTSPOINT" >GtsPoint</A > *p3, <GTKDOCLINK HREF="GPOINTER" >gpointer</GTKDOCLINK > data);</PRE ><P >Adds the triangle defined by <CODE CLASS="PARAMETER" >p1</CODE >, <CODE CLASS="PARAMETER" >p2</CODE > and <CODE CLASS="PARAMETER" >p3</CODE > to the respective clusters of <CODE CLASS="PARAMETER" >cluster_grid</CODE >.</P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13737"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >cluster_grid</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" ><SPAN CLASS="TYPE" >GtsClusterGrid</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13744"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >p1</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-points.html#GTSPOINT" ><SPAN CLASS="TYPE" >GtsPoint</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13751"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >p2</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-points.html#GTSPOINT" ><SPAN CLASS="TYPE" >GtsPoint</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13758"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >p3</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-points.html#GTSPOINT" ><SPAN CLASS="TYPE" >GtsPoint</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13765"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >data</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > user data to pass to the cluster <GTKDOCLINK HREF="ADD" ><CODE CLASS="FUNCTION" >add()</CODE ></GTKDOCLINK > method.</P ></TD ></TR ></TBODY ></TABLE ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN13772" ></A ><H3 ><A NAME="GTS-CLUSTER-GRID-UPDATE" ></A >gts_cluster_grid_update ()</H3 ><PRE CLASS="PROGRAMLISTING" ><A HREF="gts-simple-statistics.html#GTSRANGE" >GtsRange</A > gts_cluster_grid_update (<A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" >GtsClusterGrid</A > *cluster_grid);</PRE ><P >Updates the representative vertices of all the clusters of <CODE CLASS="PARAMETER" >cluster_grid</CODE >.</P ><P ></P ><P ></P ><TABLE CLASS="variablelist" BORDER="0" CELLSPACING="0" CELLPADDING="4" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13784"><SPAN STYLE="white-space: nowrap" ><CODE CLASS="PARAMETER" >cluster_grid</CODE > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-out-of-core-simplification.html#GTSCLUSTERGRID" ><SPAN CLASS="TYPE" >GtsClusterGrid</SPAN ></A >.</P ></TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="TOP" ><A NAME="AEN13791"><SPAN STYLE="white-space: nowrap" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</SPAN ></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > a <A HREF="gts-simple-statistics.html#GTSRANGE" ><SPAN CLASS="TYPE" >GtsRange</SPAN ></A > describing the statistics for the number of vertices added to each cluster of <CODE CLASS="PARAMETER" >cluster_grid</CODE >.</P ></TD ></TR ></TBODY ></TABLE ></DIV ></DIV ><TABLE CLASS="navigation" WIDTH="100%" SUMMARY="Navigation footer" CELLPADDING="2" CELLSPACING="2" ><TR VALIGN="middle" ><TD ALIGN="left" ><A ACCESSKEY="p" HREF="gts-surface-simplification-and-refinement.html" ><B ><<< Surface simplification and refinement</B ></A ></TD ><TD ALIGN="right" ><A ACCESSKEY="n" HREF="gts-isosurfaces-from-3d-functions.html" ><B >Isosurfaces from 3D functions >>></B ></A ></TD ></TR ></TABLE ></BODY ></HTML >