Hi,
I currently have the problem of updating the position of node in my code. this
is what i do:
Constructor:
{
_transform = OSG::Transform::create();
_simpleMaterial = OSG::SimpleMaterial::create();
_material = OSG::MaterialGroup::create();
_material->setMaterial(_simpleMaterial);
_mNode = OSG::makeCoredNode<OSG::MaterialGroup>(&_material);
_tNode = OSG::makeCoredNode<OSG::Transform>(&_transform);
_node->addChild(_mNode);
_mNode->addChild(_tNode);
_shape = OSG::makeBox(width, depth, height, res, res,res);
_tNode->addChild(_shape);
setPose();
}
setPose()
{
// caluclate q1 to q4
_transform->editMatrix().setTranslate(pose.position.x, pose.position.z,
pose.position.y);
_transform->editMatrix().setRotate(OSG::Quaternion(q1, q2, q3, q4));
}
the first call of setPose in the constructor works, but calling it after that
again, does not result in a change of the position. i had it working at some
point, but after stripping my code, i can't get it back to work.
cheers,
keyan
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users