CellSet EdgeCell::spatialBoundary() const { if(isClosed()) { return CellSet(); } else { CellSet left = startVertices(); CellSet right = endVertices(); left.unite(right); return left; } }
InbetweenEdge::InbetweenEdge(VAC * vac, const Path & beforePath, const Path & afterPath, const AnimatedVertex & startAnimatedVertex, const AnimatedVertex & endAnimatedVertex) : Cell(vac), InbetweenCell(vac), EdgeCell(vac), beforePath_(beforePath), afterPath_(afterPath), startAnimatedVertex_(startAnimatedVertex), endAnimatedVertex_(endAnimatedVertex) { // Check pre-conditions assert(beforePath_.isValid()); assert(afterPath_.isValid()); assert(beforePath_.time() < afterPath_.time()); assert(startAnimatedVertex_.isValid()); assert(endAnimatedVertex_.isValid()); assert(beforePath_.startVertex() == startAnimatedVertex_.beforeVertex()); assert(afterPath_.startVertex() == startAnimatedVertex_.afterVertex()); assert(beforePath_.endVertex() == endAnimatedVertex_.beforeVertex()); assert(afterPath_.endVertex() == endAnimatedVertex_.afterVertex()); // Cache star foreach(VertexCell * vertex, startVertices()) addMeToSpatialStarOf_(vertex); foreach(VertexCell * vertex, endVertices()) addMeToSpatialStarOf_(vertex); foreach(KeyCell * kcell, beforeCells()) addMeToTemporalStarAfterOf_(kcell); foreach(KeyCell * kcell, afterCells()) addMeToTemporalStarBeforeOf_(kcell); }