Hi,

Dirk Reiners wrote:
>       Hi Andrew,
>
> On 03/18/2010 09:07 PM, Carsten Neumann wrote:
>   
>>>      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.
>>     
>
> Yup. My guess is you want
>
> NodePtr node = makeNodeFor(&m_ct );
>   
Ooh that looks neater, I did:
   NodePtr highlight = Node::create();

    beginEditCP(highlight, Node::CoreFieldMask);
        highlight->setCore(m_ct);
    endEditCP(highlight, Node::CoreFieldMask);

> In the end it probably doesn't matter, assuming you add the NodePtr you 
> create 
> to the scene. As long as () is called before setScale it should work expect 
> for 
> the little memory leak of the original core.
>
> So that doesn't really explain your problem.
>   
The issue was that I created and set m_ct, then called function(), so 
m_ct was newly created.  My print out of the matrix was at the end of my 
set function so still printed the correct (old) m_ct value. Doh! I don't 
know why it worked when I tried a TransformPtr, but must have been me 
doing something differently.
> Could you send the whole source file? There seems to be missing that we're 
> missing here.
>   
>       Dirk

Thanks for every ones time,
Andrew

------------------------------------------------------------------------------
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