Philip J Colbert wrote:

As regaurds XJ3D in my code I have managed to load a very basic VRML model
though I have a question does the VRML97Loader allow for the importing of
interperlators e.g position Interperlators, prototypes and script notes?  and
If so where can I get information on it like documentation and example code?
Xj3D will handle all of VRML (minus the couple of nodes we don't yet
have implemented). As a loader, it will run the majority of it, as best
as possible within the limitations of a loader. So, for example we can't
do visiblity or proximity sensors (they exist but no events are
generated) because we have no information about the location of the
user's viewpoint. Other things like navigation are disabled as well.
This gets particularly troublesome when you use the loader to load
multiple VRML files and place them into a single scene of your own
construction as each loaded file would be fighting for the mouse and
view position information leading to enormous overheads and really
killing performance (we could do stuff allowing for shared context
information, but that is well about the spirit and intent of what a
loader should be doing).

However, I suspect you are actually asking whether you can directly
access the interpolator nodes themselves through the loader interface.
If you just stick to the stock Sun Loader interface and the use of the
getNamedObject() call, the answer is no. Scene.getNamedObject() returns
you a Java3D object that corresponds to that name. The way we have
implemented the code is that we do not create any Java3D object that
corresponds to the VRML object if it does not have a renderable form -
so you would never be able to directly access the interpolators
themselves as we do all the interpolation at the VRML level, not at Java3D.

To provide a way to access this data, you need to use Xj3D-specific
extensions to the Loader interface (org.web3d.j3d.loaders.BaseLoader
that gives you back the VRMLScene object, that represents the scene at
the VRML level. This will give you access to everything in the scene
graph - ROUTEs, PROTOS, DEFs IMPORT/EXPORTs, meta data and the nodes
themselves. Note that this is an Xj3D-specific item and would not work
with any of the other VRML Loader implementations as they implement
their scene graphs and runtime models in completely different fashion.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to