KERNEL OF THE SYSTEM - CLASS HIERARCHY

Naming conventions

In the kernel of the system names of macros, types and functions start with the prefix MT_.
In the whole package, class names are of the form XXXClass, and name XXX denotes the type of a pointer to the class.
Macro MT_INDEX denotes the type used for indexing vertices and tiles, nodes and arcs in an MT.

Basic Classes: the MT and attributes

MT_PersistentClass

Abstract class.

Meaning

A class of objects that can read / write themselves according to the standard file format of the MT package.

An object of this class has a keyword (that will depend on the specific subclass) and an object description used when writing the object on a file.

Functions

MT_TileSetClass

Subclass of MT_PersistentClass.

Meaning

A class of objects made up of vertices and tiles. Tiles are k-dimensional, and vertices are embedded in d-dimensional space, for generic k and d. The implementation sets an upper bound of 10 for k and d.

Constructor

Parameters: the dimension of the embedding space (= number of coordinates for each vertex), and the dimension of the tiles (= number of vertices for each tile, minus one). The resulting tile set has no vertices and no tiles. A tile set must read its contents from a file.

Functions

This class provides functions to access the geometry of vertices and tiles. Vertices are described as tuples of coordinates, and tiles as tuples of vertices. Elements inside a tuple are indexed starting from zero. Both vertices and tiles are referenced as MT_INDEXes. Valid MT_INDEXes start from 1, the value 0 (macro MT_NULL_INDEX) is used for denoting "no vertex" or "no tile".

MT_MultiTesselationClass

Subclass of MT_TileSetClass.

Meaning

A Multi-Tesselation. It adds a DAG to a tile set.

Constructor

Parameters: the dimension of the embedding space, and the dimension of the tiles (the same as for class MT_TileSetClass). The resulting MT is empty. An MT must read its contents from a file.

Functions

Functions to navigate the DAG are used within the extractors, and are of no interest for the user. Only the following functions may be of interest:

MT_AttrTableClass

Abstract class, subclass of MT_PersistentClass.

Meaning

A table that stores a value (of some type that is not specified at this level) associated with each entity (vertex, tile) of an MT.

Subclasses of the generic attribute table will be defined for storing values of a specific type (e.g., float, int, etc.). Such subclasses will enrich the interface with access functions for getting and setting the attribute values.

Functions

Classes for extracting tesselations

MT_CondClass

Meaning

A boolean function on the tiles of an MT. Conditions are used within an extractor for driving the extraction of tesselations from an MT. It is an abstract class.

The condition can be interpreted as:

Subclasses of MT_CondClass implement specific resolution conditions and focus conditions.

There are two modes for evaluating the condition:

  1. loose evaluation: used inside extraction algorithms
  2. strict evaluation: used on the tiles of the extracted tesselation
The loose evaluation assumes that the condition is applied to tiles that are not at full resolution; thus, their spatial location can be slightly different from the location of the object portion that they approximate. The strict evaluation assumes that the condition is applied to tiles that are - if not at full resolution - at a resolution considered as sufficient by the application; thus, their distance from the represented object portion is negligible.

For instance, a condition selecting the tiles which contain a given point, evaluated on an MT where each tile has an associated approximation error measuring its distance from the object portion it represents:

Functions

MT_ExtractorClass

Abstract class.

Meaning

A class of objects which extract tesselations from an MT given a resolution filter condition and a focus condition.

MT_ExtractorClass has three subclasses which implement extraction through specific algorithms:

An extractor may output the extracted tesselation simply as a list of tiles, or may also generate information about mutually adjacent tiles. Reconstruction of adjacency links between extracted tiles is a feature that must be set when creating the extractor. By default, it is disabled.

An extractor may also generate statistics about the performance of the extraction algorithm. Such feature may be enabled and disabled at run time.

Constructor

Parameters: the MT from which tesselations will be extracted, and a boolean flag specifying if the extractor must generate adjacency information for the extracted tesselation (default = disabled).

Functions

Classes for building an MT

MT_BuildingBaseClass

Meaning

Base class containing information which must be inherited by the MT building interface and by the user-defined building interfaces of MT feaures.

Functions

The following functions connect an attribute building interface for vertex or tile attributes to this object.

MT_BuildingInterfaceClass

Subclass of MT_PersistentClass and of MT_BuildingBaseClass.

Meaning

This class provides functions for recording the sequence updates performed on a tesselation during a process of refinement or coarsening, and for building an MT from such a sequence. An update consists of deleting a set of tiles and creating another set of tiles. The sequence of all updates is called a history.

Recording a history

The history is not kept in memory, but it is written on disk in some temporary files. This allows saving memory since it is supposed that the primary process of refinement or simplification (that generates the updates) needs quite a lot of memory.

At the end of the recording process, one can convert the history into an MT. Before that, it may be necessary to free all the auxiliary data structures of the primary process of refinement/simplification in order to gain sufficient memory.

Converting a history

First, the user must provide an MT_Multitesselation that will contain the result of MT construction. After the MT has been built, the building interface may be deleted and the constructed MT is ready to be used, or to be written on a file and used later by other programs.

Constructor

The constructor has no parameters.

Functions

MT_AttrBuildingInterfaceClass

Abstract class, subclass of MT_PersistentClass.

Meaning

An interface containing functions that must be added to the MT building interface in order to record values (of some type that is not specified at this level) associated with its vertices/tiles.

It provides functions for recording the attributes of tiles or vertices during the evolution of a tesselation after a sequence of local modifications, and for building attribute tables from such information.

Subclasses of MT_AttrBuildingInterfaceClass will record attributes of specific types.

An object of class MT_AttrBuildingInterfaceClass will not be used alone. It will be used within a subclass of MT_BuildingInterfaceClass in order to record attributes for the MT that we want to build.

Recording attributes inside a history

The attribute building interface contains among its internal fields an auxiliary attribute table, which is used for reading/writing attribute values, thus abstracting from the specific type of attributes. Attributes are saved on temporary files in order to reduce memory requirements.

In subclasses, the auxiliary attribute table will point to an attribute table, of a subclass of MT_AttrTableClass, corresponding to the specific type of attribute.

Subclasses of MT_AttrBuildingInterfaceClass will provide functions of the form MT_MakeAttr (with parameters that depend on the type of attribute) for recording the attribute of an MT entity.

The attribute for a vertex/tile does not need to be recorded at the same moment when such vertex/tile is recorded in the MT history (through a call to MT_UseVertex and MT_MakeTile, respectively). It can be recorded at any time afterwards (as soon as the applicative program knows it: for instance, in surface refinement vertex normal may be known only at the end of the refinement), and it can be recorded more than once for the same entity. When converting the recorded attributes, just one attribute will be kept for each entity (the last recorded one).

Building an attribute table

At the end of attribute recording, we can build an attribute table from the recorded attributes. Before this, the user must provide the attribute table to be built. After having built the attribute table, the attribute building interface can be deleted.

Public functions

Classes for Predefined Attributes

The system provides predefined classes for implementing attributes consisting of values of type int, char, float, for vectors of one of these types, and for XXX = one bit.

In the following, the symbol XXX denotes a type among the ones mentioned above. In order to implement attributes of type XXX for an MT, we provide:

  1. a subclass of MT_AttrTableClass, storing values of type XXX.
  2. a subclass of MT_AttrBuildingInterfaceClass, for recording values of type XXX and building the XXX attribute table.
Here, we explain the contents of such classes while remaining generic about the basic type XXX.

MT_XXXTableClass

Subclass of MT_AttrTableClass.

Meaning

An attribute table storing values of type XXX. Here, we assume that XXX is a basic type. It adds functions to access the attribute values.

Constructor

The constructor has no parameters. The resulting attribute table is empty. An XXX attribute table must read its contents from a file.

Functions

MT_XXXVectorTableClass

Subclass of MT_AttrTableClass.

Meaning

An attribute table storing values consisting of vectors of elements of the basic type XXX. It adds functions to access the attribute values.

Constructor

Parameter: the length of the vector. The resulting attribute table is empty. An XXXVector attribute table must read its contents from a file.

Functions

MT_XXXBuildingInterfaceClass

Subclass of MT_AttrBuildingInterfaceClass.

Meaning

An attribute building interface for values of type XXX. Simply an attribute building interface where the internal MT attribute table points to an object of the class MT_XXXTableClass.

Constructor

The constructor has no parameters.

Functions

MT_XXXVectorBuildingInterfaceClass

Subclass of MT_AttrBuildingInterfaceClass.

Meaning

An attribute building interface for values consisting of vectors of the basic type XXX. Simply an attribute building interface where the internal MT attribute table points to an object of the class MT_XXXVectorTableClass.

Constructor

Parameter: the length of the vector.

Functions