Skip to content

#66 Implement GeometryType as a small class

Metadata

Property Value
Reported by Oliver Sander (oliver.sander@tu-dresden.de)
Reported at Dec 12, 2005 17:19
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Oliver Sander (oliver.sander@tu-dresden.de)
Last edited at Feb 14, 2006 11:26
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Feb 21, 2006 17:45
Closed in version 1.0
Resolution Implemented
Comment

Description

The current way of specifying geometry types is not satisfying. Using dimension-independent denominations like 'simplex' and 'cube' does indeed make the code dimension-independent. However, it also introduces several ambiguities for low-dimensional entities. Is a line a simplex or a cube? And what is a vertex?

I propose to use a small class to denote geometry types. Something like

template class NewGeometryType { // old geometry type GeometryType type;

bool isVertex();
bool isLine();
bool isSimplex();
[...]

}

The new GeometryType can be used as the old one. But as it also contains the dimension, it can also answer questions like isVertex() as well.

Attachments