osg::Vec4d lerp_Vec4d(osg::Vec4d v0, osg::Vec4d v1, double t)
{
	osg::Vec4d vec;
	vec.x() = lerp_lf(v0.x(), v1.x(), t);
	vec.y() = lerp_lf(v0.y(), v1.y(), t);
	vec.z() = lerp_lf(v0.z(), v1.z(), t);
	vec.w() = lerp_lf(v0.w(), v1.w(), t);
	return vec;

}
Ejemplo n.º 2
0
osg::Vec4d ConfigManager::getVec4d(std::string attributeX,
        std::string attributeY, std::string attributeZ, std::string attributeW,
        std::string path, osg::Vec4d def, bool * found)
{
    bool hasEntry = false;
    bool isFound;

    osg::Vec4d result;
    result.x() = getDouble(attributeX,path,def.x(),&isFound);
    if(isFound)
    {
        hasEntry = true;
    }
    result.y() = getDouble(attributeY,path,def.y(),&isFound);
    if(isFound)
    {
        hasEntry = true;
    }
    result.z() = getDouble(attributeZ,path,def.z(),&isFound);
    if(isFound)
    {
        hasEntry = true;
    }
    result.w() = getDouble(attributeW,path,def.w(),&isFound);
    if(isFound)
    {
        hasEntry = true;
    }

    if(found)
    {
        *found = hasEntry;
    }
    return result;
}
Ejemplo n.º 3
0
void DataOutputStream::writeVec4d(const osg::Vec4d& v){
    writeDouble(v.x());
    writeDouble(v.y());
    writeDouble(v.z());
    writeDouble(v.w());

    if (_verboseOutput) std::cout<<"read/writeVec4d() ["<<v<<"]"<<std::endl;
}
Ejemplo n.º 4
0
void ArucoThread::printVec( const osg::Vec4d v, const QString name ) const
{
	qDebug() << name << " " << v.x() << " " << v.y() << " " << v.z() << " " << v.w();
}