Hi Dominik

On Wed, 2004-11-24 at 17:54, Dominik Rau wrote:
> Hi Rasmus.
> 
> Ok, let's put this on the list....
> 
> Rasmus Agerholm wrote:
> 
> >Well, I guess basically the SceneFileHandler can be used if we can get
> >hold of the VRMLLoader of the VRMLSceneFileType and initialize my
> >VRMLAnimator with that... but that means altering OpenSG source files to
> >ad a getLoader() to the VRMLSceneFiletype. Maybe Gerrit will make that
> >change?
> >  
> >
> I thought about  unzipping them "manually" with the ZStream (after 
> checking it with SceneFileHandler::the().isGZip(in) but these Methods / 
> Classes are private for the SceneFileHandler. Nevertheless, you're 
> approach would be definitely more user friendly... : )
> 
> >Another possibility: I think it would possible to create a
> >MyVRMLSceneFileType inherited from VRMLSceneFiletype, which overrides
> >Gerrits VRMLSceneFileType. This is probably the best solution, which I
> >haven't looked much into. Maybe I should... I guess that there's is
> >always only one SceneFileType of each kind. So a MyVRMLSFT could create
> >a VRMLAnimator object and make it available by a getAnimator() method?
> >Dirk, Gerrit, Andreas can any of you comment on this? 
> >  
> >
> 
> Too deep in the guts for me, can't say anything here.

I think this is possible and might be able to take a look at this some
time next week.


> >>* copy already loaded (zipped or not) Files so that all cores except 
> >>TimeSensors and GeoPositions are shared with the original (I need it 
> >>this way to control my animations independently)? At this very moment I 
> >>just load them x times and use a SharePtrGraphOp, which is kind of weird 
> >>by principle and needs a lot of RAM and time.... I tried the cloneTree 
> >>Methods, but it seems that  the TimeSensor isn't shared.
> >>    
> >>
> >
> >cloneTree does not share anything AFAIK, it creates a copy of the tree.
> >So no shared node cores is expected :-)
> >
> >I don't think it's possible to decouple the geoPositions from the
> >Geometry core. Actually I think that you can't really share much if your
> >goal is to control the animations independently.
> >
> Well, yes and no. Every fish is a SwitchPtr with NodePtrs, each of them 
> loaded from a file. They mostly start in the same Position, have the 
> same Material etc...., so there is a lot to share: Material(Groups), 
> Normals (always the same...), Indices, at least that's what I tell the 
> SharePtrGraphOp and what's working fine. So my problem is, that I have 
> to duplicate the Graph and share some specific Fields (mostly from the 
> GeometryCore) and/or NodeCores (like MaterialGroup) while I duplicate 
> everything else. How can I achieve this?

I was corrected by Andreas on the sharing of geoPositions even before I
wrote my answer (I will try to keep up with the pace of the mailing list
:-)). Andreas wrote (nov. 17th) that all Ptr types can be shared and I
gues that is exactly what you do.

Another correction: I looked at the cloneTree code and it does a pure
share of all node cores. However there is also a deepClone* set of
functions (e.g. deepCloneTree()), which looks like it does a real copy.
Furthermore, you can tell these functions to share specific types. It
seems to be exactly what you want.


I hope it helped a little more this time :-)


/Rasmus

-- 
Rasmus Agerholm

Research Assistant
VR Media Lab            (+45) 9635 8792
Niels Jernes Vej 14
DK-9220 Aalborg

Phone: (+45) 9635 8784
Fax:   (+45) 9815 2444

http://www.vrmedialab.dk/~rasta




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to