From tomas.aguado@mi.madritel.es Thu Oct 7 04:19:14 2004 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 07 Oct 2004 04:19:19 -0700 (PDT) Received: from smtp06.retemail.es (smtp06.auna.com [62.81.186.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97BJCNv004327 for ; Thu, 7 Oct 2004 04:19:13 -0700 Received: from [213.37.219.91] by smtp06.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20041007111854.CERV28901.smtp06.retemail.es@[213.37.219.91]> for ; Thu, 7 Oct 2004 13:18:54 +0200 Message-ID: <4165261D.5000301@mi.madritel.es> Date: Thu, 07 Oct 2004 13:18:53 +0200 From: =?ISO-8859-1?Q?Tom=E1s_Aguado_G=F3mez?= User-Agent: Mozilla Thunderbird 0.6 (X11/20040605) X-Accept-Language: en-us, en MIME-Version: 1.0 To: info-inventor-dev@oss.sgi.com Subject: using Nodes... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 106 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: tomas.aguado@mi.madritel.es Precedence: bulk X-list: info-inventor-dev Hello: I am developing an interface in QT to create 3D scenes; I thought (and it's almos vital for me) I could create a SoCube for example from an SoNode. I explain: the fact is that I have a std Map of C++ And every Item of a List (QlistViewItem as I am making It in QT) is relationed with an SoNode, so, when I insert an item in the Qlist it must have a parent especified by the user(SoSeparator,Sogroup..), I watch in the map for the SoNode relating to this "parent" and I want to add the child to this SoNode, but as it is not an SoSeparator, I can't access to the "addChild" function, Is there anyway to do this creating a SoNode variable, specifying its type (SoCube, SoSeparator...) and the access its function for example: [........] SoNode *Cube=new SoNode; Cube->typeId(SoCube);--------------->This Is the function I am watching for!!! Cube->width=3.0; [.......] Thanks! From tomas.aguado@mi.madritel.es Thu Oct 28 01:52:16 2004 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 28 Oct 2004 01:52:19 -0700 (PDT) Received: from smtp07.retemail.es (smtp07.auna.com [62.81.186.17]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S8qEvv007623 for ; Thu, 28 Oct 2004 01:52:15 -0700 Received: from [82.158.17.103] by smtp07.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20041028085148.VCKS9737.smtp07.retemail.es@[82.158.17.103]> for ; Thu, 28 Oct 2004 10:51:48 +0200 Message-ID: <4180B321.7080803@mi.madritel.es> Date: Thu, 28 Oct 2004 10:51:45 +0200 From: =?ISO-8859-1?Q?Tom=E1s_Aguado_G=F3mez?= User-Agent: Mozilla Thunderbird 0.6 (X11/20040605) X-Accept-Language: en-us, en MIME-Version: 1.0 To: info-inventor-dev@oss.sgi.com Subject: QT+COIN Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 107 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: tomas.aguado@mi.madritel.es Precedence: bulk X-list: info-inventor-dev 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 , 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!!! From larsa@sim.no Thu Oct 28 04:01:32 2004 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Thu, 28 Oct 2004 04:01:39 -0700 (PDT) Received: from sim.no (trh.sim.no [213.236.166.75]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SB1VYB012855 for ; Thu, 28 Oct 2004 04:01:32 -0700 Received: by sim.no (Postfix, from userid 2000) id A0A7C356AA; Thu, 28 Oct 2004 13:01:13 +0200 (CEST) Date: Thu, 28 Oct 2004 13:01:13 +0200 From: "Lars J. Aas" To: =?iso-8859-1?Q?Tom=E1s_Aguado_G=F3mez?= Cc: info-inventor-dev@oss.sgi.com Subject: Re: QT+COIN Message-ID: <20041028110113.GF20769@sim.no> References: <4180B321.7080803@mi.madritel.es> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4180B321.7080803@mi.madritel.es> User-Agent: Mutt/1.5.6i X-archive-position: 108 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: larsa@sim.no Precedence: bulk X-list: info-inventor-dev Tomás Aguado Gómez 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 From tomas.aguado@mi.madritel.es Sat Oct 30 03:39:53 2004 Received: with ECARTIS (v1.0.0; list info-inventor-dev); Sat, 30 Oct 2004 03:39:59 -0700 (PDT) Received: from smtp08.retemail.es (smtp08.auna.com [62.81.186.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UAdp7m014699 for ; Sat, 30 Oct 2004 03:39:52 -0700 Received: from [213.37.112.101] by smtp08.retemail.es (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20041030103929.RSHB1184.smtp08.retemail.es@[213.37.112.101]>; Sat, 30 Oct 2004 12:39:29 +0200 Message-ID: <41836F5C.1050607@mi.madritel.es> Date: Sat, 30 Oct 2004 12:39:24 +0200 From: =?ISO-8859-1?Q?Tom=E1s_Aguado_G=F3mez?= User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Lars J. Aas" , info-inventor-dev@oss.sgi.com Subject: Re: QT+COIN References: <4180B321.7080803@mi.madritel.es> <20041028110113.GF20769@sim.no> In-Reply-To: <20041028110113.GF20769@sim.no> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 109 X-ecartis-version: Ecartis v1.0.0 Sender: info-inventor-dev-bounce@oss.sgi.com Errors-to: info-inventor-dev-bounce@oss.sgi.com X-original-sender: tomas.aguado@mi.madritel.es Precedence: bulk X-list: info-inventor-dev Lars J. Aas wrote: >Tomás Aguado Gómez 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::mapmapQTCOIN; 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/