Exemplo n.º 1
0
bool Time::operator<(const Time & other) const
{
    if(type() != other.type())
    {
        // a robust way would not do that, but ok in normal cases
        return floatTime() < other.floatTime();
    }
    else
    {
        switch (type())
        {
        case ExactFrame:
        case JustBeforeFrame:
        case JustAfterFrame:
            return frame() < other.frame();
        case FloatTime:
            return floatTime() < other.floatTime();
        default:
            return false;
        }
    }
}
Exemplo n.º 2
0
void KeyEdge::draw3DSmall()
{
    if(temporalStar().size() == 0)
        return;

    int lineWidth = 3;
    glColor4d(0,0,0,1);
    glLineWidth(lineWidth);
    glPushMatrix();
    glTranslated(0, 0, floatTime());

    geometry()->draw();

    glPopMatrix();
    glLineWidth(1);
}
Exemplo n.º 3
0
bool Time::operator==(const Time & other) const
{
    if(type() != other.type())
        return false;
    else
    {
        switch (type())
        {
        case ExactFrame:
        case JustBeforeFrame:
        case JustAfterFrame:
            return frame() == other.frame();
        case FloatTime:
            return floatTime() == other.floatTime();
        default:
            return true;
        }
    }
}
Exemplo n.º 4
0
void Time::save(QTextStream & out)
{
    switch (type())
    {
    case ExactFrame:
        out << "ExactFrame " << frame();
        return;
    case JustBeforeFrame:
        out << "JustBeforeFrame " << frame();
        return;
    case JustAfterFrame:
        out << "JustAfterFrame " << frame();
        return;
    case FloatTime:
        out << "FloatTime " << floatTime();
        return;
    default:
        return;
    }    
}