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

Re: QT+COIN

To: "Lars J. Aas" <larsa@xxxxxx>, info-inventor-dev@xxxxxxxxxxx
Subject: Re: QT+COIN
From: Tomás Aguado Gómez <tomas.aguado@xxxxxxxxxxxxxx>
Date: Sat, 30 Oct 2004 12:39:24 +0200
In-reply-to: <20041028110113.GF20769@sim.no>
References: <4180B321.7080803@mi.madritel.es> <20041028110113.GF20769@sim.no>
Sender: info-inventor-dev-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.8 (X11/20040926)
Lars J. Aas wrote:

Tomás Aguado Gómez <tomas.aguado@xxxxxxxxxxxxxx> wrote:
: Are the ""Do you have children?"" and ""Do you have brothers?"" : questions implemented for a SoNode or SoBase element??


Only group nodes have children.

int SoGroup::getNumChildren()

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

No, but it's trivial to work it from the parent group node.

int SoGroup::getNumChildren()
SoNode * SoGroup::getChild()

 Lars J




Thanks a lot Lars, got the Loading and Saving module working thanks to you!
Now some weeks ago a saw a function used to interchange the position of 2 SoNodes within the COIN tree, I've been 2 days looking for in in the documentation and couldn't find it again!, do you know how is it called??.
Another problem I have in my program is this one:
the user selects a kind of COIN-Node in a Qlistview(a visual list of elements from QT), whe he double-clicks it an instance of the node is created and inserted in a map of Nodes and in another Qlistview which represents the internal COIN tree to the user.
std::map<QListViewItem*,SoNode*>mapQTCOIN; make sa relation between the representation Qlistview and the internal COIN tree. Using this when I click a Qlistview item, I go to the map and say, "ok, you're the Node!","But, what type are you?" I get the type ID and do a casting to this type and I show the properties...
Well, the problem is that when I want to delete a node, I select the Qlistview, press de delete button,..I go to the map and I say---> mapQTCOIN[QListviewITEM]->unref(); and the Sphere, Cylinder,... stays in the scene smiling at me, and the reference count doesn't decrease!! it stays in 1. Any ideas?
Thanks in advance!


Tomás Aguado Gómez

Division de Arquitectura de Computadores

Grupo de Modelado y realidad virtual

http://dac.escet.urjc.es/investigacion/GMRV/


<Prev in Thread] Current Thread [Next in Thread>
  • QT+COIN, Tomás Aguado Gómez
    • Re: QT+COIN, Lars J. Aas
      • Re: QT+COIN, Tomás Aguado Gómez <=