Пример #1
0
MapPoint::MapPoint(Map * map, std::size_t index, const TMath::TVectord & position):
    MapResourceObject(map),
    m_index(index),
    m_position(position)
{
    TMath_assert(position.size() == 3);
}
Пример #2
0
void ARCameraCalibrator::setCameraParameters(const TMath::TVectord& parameters)
{
    assert(parameters.size() == 5);
    for (int i = 0; i < 5; ++i) {
        if (std::isnan(parameters[i])) {
            qDebug() << "Camera parameters is nan!!!";
            return;
        }
    }
    m_cameraCalibrator.camera()->setCameraParameters(parameters);
    emit cameraParametersChanged();
}
Пример #3
0
void MapPoint::transform(const TMath::TMatrixd & rotation, const TMath::TVectord & translation)
{
    TMath_assert((rotation.rows() == 3) && (rotation.cols() == 3));
    TMath_assert(translation.size() == 3);
    m_position = rotation * m_position + translation;
}
Пример #4
0
void MapPoint::setPosition(const TMath::TVectord & position)
{
    TMath_assert(position.size() == 3);
    m_position = position;
}