|
From: antonio_lioy <ant...@li...> - 2006-02-24 14:25:35
|
> I'm not sure I follow entirely. Are you trying to load several parts > (of, say a car), then want them connected in your app under the root? > If so, you naturally need to connect them yourself, and try to recover = > the connectivity somewhow. How to do that varies wildly depending on > your data, if you just have a car (i.e. body + wheels, not suspension) = > it's should only be a matter of adding all parts to a transform and mov= e > that around. > > If the transform is identity, then you might have the data in the > vertices (that are then relative to world center, not object center). > Check your data and make sure you export stuff correctly and get what > you expect in the VRML. > > (I often find this to be the problem, that the VRML-data is not exactly= > what I want. OpenSG does a very good job at importing the VRML keeping = > the exact data and structure. I haven't yet found a flaw in OpenSG w.r.= t > this, it is usually my data.) > > Regards > /Marcus Thanks for your answer, but my problem actually is that I have a complex = model drawn with a CAD application that is split into many components by = the CAD app. Each component is saved to a single vrml file. If I just loa= d all the models under a common parent in the scenegraph I can correctly = see the big model cause in each VRML file the CAD app saves a matrix that= specify where each model should be with respect to the world axis. In my= application (which is a stereo viewer in a CAVE environment)I need to pi= ck a single part of entire model through a tracked pointer. When a pointe= r picks a model, the transformation performed by the pointer (which I com= pute through tracking system) should be reproduced by the model. My probl= em is now that when I move the objects with the pointer they move keeping= their initial transformation, that is objects centered in origin are mo= ved corretly, and objects transformed keeps an offset from the point that= I actually move. For now I set to identity the local transform when I pi= ck an object but for some models I cannot find this transformation where= I expect it to be, so they continue to mantain their offset. I hope that all this now looks clearer... Thanks Esimio prof. Antonio Lioy |