info-inventor-dev
[Top] [All Lists]

QT+COIN

To: info-inventor-dev@xxxxxxxxxxx
Subject: QT+COIN
From: Tomás Aguado Gómez <tomas.aguado@xxxxxxxxxxxxxx>
Date: Thu, 28 Oct 2004 10:51:45 +0200
Sender: info-inventor-dev-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.6 (X11/20040605)
Hello Everyone:

Thanks Daniel, got the program working !.

Now I have a problem with the application:

When the user pushes de button "Load" and selects a file, I read It with SoDb::ReadAll(), and get a ROOT and all the scene I've loaded hangs from this node, right until now. Well, I must visit all the elements in in-order, to create a QT tree,so, I would use recusrsivity to say to each node:
    "hello! you are a son of <parent>, but who are you!
      A Cube!--------->I insert a Cube in my QTlist down to parent
Do you have children? /\
                           /  \
/ YES->I repeat with the Children from "hello" /
                        NO, no more Children->Do you have brothers?
                                                                     /\
                                                                    /  \
/ YES->I repeat with the Children from "hello"
                                                                  /
NO-->END(of this recursive branch) QUESTIONS: Are the ""Do you have children?"" and ""Do you have brothers?"" questions implemented for a SoNode or SoBase element?? Is there any procedure/function like "nextSibling" wich gives me the SoNode or SoBase brother of the node, or ("null") if he's the last brother? I will appreciate a little example of navigating through a NodeList type.

Thanks!!!

<Prev in Thread] Current Thread [Next in Thread>