[osg-users] converting node coordinates

Bruno Oliveira bruno.manata.oliveira at gmail.com
Thu Jun 22 10:12:47 PDT 2017


Hello,

I have some osg::Nodes with some initial geometry coordinates.

Then, after some rendering, at some point I need to transform those initial
coordinates. I do something like this:


void MyNodeGeometry::convertCoordinates() {

    auto* vert = this->getVertexArray();

    for (int i = 0; i < vert->size(); i++) {
        convertCoordinate(vert->operator[](i));
    }

    this->setVertexArray(vert);

    this->setInitialBound(this->computeBound());
    this->firtyBound();

}


Also, in all parent Nodes I call

    parentNode->setInitialBound(this->computeBound());
    parent->firtyBound();



However, when I do this, I can see my points, BUT when I try to manipulate
my scene with the mouse, the data disappears if I zoom in, and appears
again if I zoom out again.
This seems like my node's bounds are not well set, But I manually verified
all node's bounds and they are correct....

Any idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170622/f989ca1f/attachment-0001.htm>


More information about the osg-users mailing list