![]() |
![]() |
|
|||||||
| Open Inventor Main Forum General discussions about Open Inventor from VSG |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Thread Tools | |
| Display Modes | |
|
|