示例#1
0
// Constructor
InbetweenVertex::InbetweenVertex(VAC * vac,
                   KeyVertex * beforeVertex,
                   KeyVertex * afterVertex):
    Cell(vac),
    InbetweenCell(vac),
    VertexCell(vac),

    beforeVertex_(beforeVertex),
    afterVertex_(afterVertex)
{
    // color
    color_[0] = 0;
    color_[1] = 0;
    color_[2] = 0;
    color_[3] = 1;

    // add the boundary to this
    addMeToTemporalStarAfterOf_(beforeVertex_);
    addMeToTemporalStarBeforeOf_(afterVertex_);
}
示例#2
0
InbetweenEdge::InbetweenEdge(VAC * vac,
                             const Cycle & beforeCycle,
                             const Cycle & afterCycle) :
    Cell(vac),
    InbetweenCell(vac),
    EdgeCell(vac),

    beforeCycle_(beforeCycle),
    afterCycle_(afterCycle)
{
    // Check pre-conditions
    assert(beforeCycle_.isValid());
    assert(afterCycle_.isValid());
    assert(beforeCycle_.time() < afterCycle_.time());

    // Cache star
    foreach(KeyCell * kcell, beforeCells())
        addMeToTemporalStarAfterOf_(kcell);
    foreach(KeyCell * kcell, afterCells())
        addMeToTemporalStarBeforeOf_(kcell);
}
示例#3
0
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);
}