Re: [osg-users] Store parent matrix inside of child

2015-01-05 Thread Robert Osfield
Hi Drake, You could have a matrix wrapped up in your custom GizmoDrawable but you'd have to be careful about when you passed on the matrix. One normally doesn't cache matrices this way, as it usually isn't required. There is chance that you are trying to tackle a problem that there is an

Re: [osg-users] Store parent matrix inside of child

2015-01-05 Thread Drake Aldwyn
Well, Ill try describe what I'm trying to do. I have scene where I put object with this code: Code: std::string path=models\\; std::string path2=textures\\; osg::Node* scene = osgDB::readNodeFile(path+n); scene-setName(scene); osg::BlendFunc

Re: [osg-users] Store parent matrix inside of child

2015-01-05 Thread Robert Osfield
Hi Drake, I can't personally help you, I know nothing about gizmo. You don't really explain what you are trying to do either, you provide code, which is a specific attempt at a solution to a problem, not a definition of the problem which makes it doubly impossible to guess what you need to do.

Re: [osg-users] Store parent matrix inside of child

2015-01-05 Thread Trajce Nikolov NICK
Hi Drake, just guessing by the subject of the email. If you want to store matrix to some node (your child node) you can use the userdata of the node and RefMatrix. Something like osg::Matrix parentMatrix; child-setUserData(new osg::RefMatrix(parentMatrix)); then dynamic_cast the userData to

[osg-users] Store parent matrix inside of child

2015-01-04 Thread Drake Aldwyn
Hi, all Below is my code: is it possible somehow store matrix transform of PAT inside of children (gizmo) ? Code: osg::ref_ptrosg::Switch sw = new osg::Switch; sw-setName(Switch); sw-addChild(scene,true); sw-addChild(getLineCube(pos,11),false);