VSG Logo   OpenInventor Forum

Go Back   Open Inventor Forum > Open Inventor Main Forum

Open Inventor Main Forum General discussions about Open Inventor from VSG

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-02-2012, 03:39 AM
aman.sonu aman.sonu is offline
Active Member
 
Join Date: Nov 2008
Posts: 42
Default Node in Accumulated Element

Hi Mike,

I have created a new accumulated element for my own node e.g. SoMyNode. I have one renderer, which will be using this element.

I want to add the information to element during SoMyNode traversal.

i have the following queries:

1. can I add the instance of SoMyNode to Element directly. if i create a new variable in my element e.g. sbPList.
2. Will it create some issues?

I am providing some code
Code:
class MyElement : public SoAccumulatedElement
{
     static void add(SoState *state, SoNode *node, SoNode *node)
     {
           ..........
           nodes.append(node);
     }
private:
     SbPList nodes;

};

class SoMyNode : public SoNode
{
    void GLRender(SoGLRenderAction *ac) {

      MyElement::add(ac->getState(),this,this);

    }
}

class MyRenderer 
{
    void GLRender(SoGLRenderAction *ac) {

        MyElement *element = MyElement::getInstance(ac->getState());


     }

}
__________________
Thanks and Best Regards,
Aman
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Copyright VSG, SAS, 2008.