SpatialEdge.h



Classes

SpatialEdge -- Spatial Edge class (full description)

class SpatialEdge

Interface

Public Members
SpatialEdge(SpatialIndex & tree, size_t layerindex)
~SpatialEdge()
void makeMidPoints()
Private Members
size_t newEdge(size_t emindex, size_t index, int k)
void insertLookup(Edge *em)
Edge * edgeMatch(Edge *em)
size_t getMidPoint(Edge * em)

Description

The Edges are needed at construction time of the spatial index. They are used to generate the midpoints of the nodes in a certain layer. The interface is simple: construct a class giving it the SpatialIndex and the layer number. Then call makeMidPoints. The SpatialIndex will then have its midpoint constructed in every QuadNode.

Member Description

SpatialEdge(SpatialIndex & tree, size_t layerindex)

Constructor : give the tree and its layer

~SpatialEdge()

Destructor

void makeMidPoints()

Interface to class: generate midpoints.

size_t newEdge(size_t emindex, size_t index, int k)

Make a new edge, in the temporary edges_ at emindex, at node_[index] using the k'th side. Since every edge belongs to two faces, we have] to check wether an edge has been already processed or not (i.e. the midpoint has been constructed or not). We have a lookup table for this purpose. Every edge is stored at lTab[start_]. There may be up to 6 edges in every vertex[start_] so if that table place is occupied, store it in the next table position (and so on). So we only have to look up 6 positions at most.

void insertLookup(Edge *em)

insert the edge em into the lookup table

Edge * edgeMatch(Edge *em)

lookup the edge em in the lookup table

size_t getMidPoint(Edge * em)

generate a new vertex, which is the midpoint of the current edge.

© Copyright The Johns Hopkins University 1999, All Rights Reserved.
Peter Z. Kunszt,