Hi Jan,
jan p. springer wrote:
> jan p. springer said the following on 11/02/06 12:52:
> [ snip ]
>> if someone could provide the minimal skeleton for an opensg 2.0 loader (or
>> point me to it since i didn't look too hard) i would try to prototype a
>> .trans and a .verify pseudo loader; if no-one objects that is.
> [ snip ]
>
> follow-up to myself; there are several problems to be solved:
>
> - SceneFileHandler seems to be (a bit) too intelligent for this; it checks
> the existence of the file in the filesystem for a given file name before
> handing it over to the actual loader; how could this be changed (sanely)?
>
> - i've fleshed out the .obj loader, get it compiled, linked, and registered
> as a .trans loader. however the call interface for read is an istream and
> a Char8*, the former does not help in the case of adding a node based on
> the file's name and the latter is called "fileNameOrExtension", so chances
> are it will not contain useful information.
>
> - minor nitpick: why are all the string arguments passed as const Char8*?
> wouldn't const std::string& be the better choice?
Absolutely. It's something that I've been wanting to change but haven't
gotten around to. Patches welcome. ;)
> for those interested i've attached a (na\"ive) implementation for .trans.
thanks for your prototype, but personally I was thinking about going
another route.
The whole pseudo-loader idea seems a little backwards. Given that we
have GraphOps anyway, I was more thinking of making trans a GraphOp, and
handling everything in SceneFileHandler.
To do that you would have to extend getFileType() to find the actual
file extensions and construct the GraphOpSeq at the same time (just
constructing the string with a little format changing should be enough,
or you can add another version of GraphOpSeq::setGraphOps that
understands the format). If it's "" read() should use the passed in one.
To support Simon's naming scheme you would also have to extend
GraphOp::ParamSet::ParamSet to use ',' as an argument separator (right
now it only does ' ').
That should cover everything fairly nicely. Now the question is how to
write a GraphOp. ;) Until I (or somebody else) write some documentation
about it, I would use the VerifyGeoGraphOp as an example for a simple one.
Comments?
Dirk
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users