Hello Andrew,

Andrew Dunk wrote:
> Sorry I should give you a bit more info, I'm not doing anything fancy...
> 
> Class A {
>     ComponentTransformPtr m_ct;
> 
>     A() { m_ct = ComponentTransform::create(); }
                   ^^^
the core you create here gets killed later on...

> 
>     function() {
>         ...        
>         NodePtr node = makeCoredNode<ComponentTransform>( &m_ct );
                         ^^^
... when you do this. makeCoredNode<T> creates a new core of type T, 
sets it as core of the returned Node and additionally gives you a 
pointer to the newly created core in the argument.

>       setName(node, "GHighlight Matrix Node");
>         ...
>     }
> 
>     setScale(Vec3f scale) {
>         beginEditCP(m_ct, ComponentTransform::ScaleFieldMask);
>             m_ct->setScale(scale);
>         endEditCP(m_ct, ComponentTransform::ScaleFieldMask);
> 
>       cout << m_ct->getMatrix();
>     }
> }
> 
> Matrix prints out the correct values after setScale(). 
> I also tried adding the MatrixFieldMask, still no luck.

if the matrix prints correctly, I suspect the core you modify and the 
one that are actually in the scene are different.

        Cheers,
                Carsten


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to