void TrajectoryVisualization::setColor(const base::Vector3d& color)
{
    { boost::mutex::scoped_lock lockit(this->updateMutex);
        this->color = osg::Vec4(color.x(), color.y(), color.z(), 1.0); }
    emit propertyChanged("Color");
    setDirty();
}
void TrajectoryVisualization::updateDataIntern( const base::Vector3d& data )
{
    if(doClear)
    {
        points.clear();
        doClear = false;
    }
    Point p;
    p.point = osg::Vec3(data.x(), data.y(), data.z());
    p.color = color;
    points.push_back(p);
    while(points.size() > max_number_of_points)
        points.pop_front();
}