Пример #1
0
void GiTransform::setModelTransform(const Matrix2d& mat)
{
    if (mat.isInvertible() && m_impl->matM2W != mat)
    {
        m_impl->matM2W = mat;
        m_impl->matW2M = m_impl->matM2W.inverse();
        m_impl->matD2M = m_impl->matD2W * m_impl->matW2M;
        m_impl->matM2D = m_impl->matM2W * m_impl->matW2D;
        m_impl->zoomChanged();
    }
}
Пример #2
0
bool GiTransform::setModelTransform(const Matrix2d& mat)
{
    bool changed = mat.isInvertible() && m_impl->matM2W != mat;
    if (changed) {
        m_impl->matM2W = mat;
        m_impl->matW2M = m_impl->matM2W.inverse();
        m_impl->matD2M = m_impl->matD2W * m_impl->matW2M;
        m_impl->matM2D = m_impl->matM2W * m_impl->matW2D;
        m_impl->zoomChanged();
    }
    return changed;
}