Hi Justin,

thanks for your reply. In the meantime I managed to locate the landscape
inside my 3D-Scene.
However, I still have many problems and questions.
You suggested that my test data set is fairly small, so I am now trying to
work with a larger dataset with the dimensions 156*156.
I can load that terrain into my application and it is possible to
navigate. However, during navigation I am experiencing the following
exceptions:

java.lang.NullPointerException
        at org.j3d.terrain.roam.Patch.setWestNeighbour(Patch.java:517)
        at org.j3d.terrain.roam.PatchGrid.addPatch(PatchGrid.java:228)
        at org.j3d.terrain.roam.SplitMergeLandscape.loadNewTiles
        (SplitMergeLandscape.java:997)
        at
org.j3d.terrain.roam.SplitMergeLandscape.setView(SplitMergeLandscape.java:312)
        at org.j3d.terrain.Landscape.setView(Landscape.java:249)
        at
gis.services.gis3D.content.dem.DEMCreator.transformChanged(DEMCreator.java:945)
        at com.sun.j3d.utils.behaviors.mouse.MouseTranslate.doProcess
        (MouseTranslate.java:251)
        at
com.sun.j3d.utils.behaviors.mouse.MouseTranslate.processStimulus
        (MouseTranslate.java:187)
        at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
        at javax.media.j3d.J3dThread.run(J3dThread.java:250)

That happens during panning, which is implemented using the Java3D
MouseTranslate Behavior with the following transformChanged() method:

 public void transformChanged(int type,Transform3D transform) {
        //System.out.println("trafo changed "+transform);
        landscape.setView(transform);
    }

Sometimes I get the following:
java.lang.NullPointerException
        at org.j3d.terrain.roam.Patch.setSouthNeighbour(Patch.java:486)
        at org.j3d.terrain.roam.PatchGrid.addPatch(PatchGrid.java:247)
        at org.j3d.terrain.roam.SplitMergeLandscape.loadNewTiles
        (SplitMergeLandscape.java:936)
        at
org.j3d.terrain.roam.SplitMergeLandscape.setView(SplitMergeLandscape.java:312)
        at org.j3d.terrain.Landscape.setView(Landscape.java:249)
        at
org.j3d.terrain.Landscape.viewerPositionUpdated(Landscape.java:184)
        at org.j3d.ui.navigation.NavigationHandler.processDefaultMotion
        (NavigationHandler.java:1121)
        at org.j3d.ui.navigation.NavigationHandler.processClockTick
        (NavigationHandler.java:965)
        at
org.j3d.ui.navigation.NavigationHandler.access$200(NavigationHandler.java:147)
        at
org.j3d.ui.navigation.NavigationHandler$FrameTimerBehavior.processStimulus
        (NavigationHandler.java:404)
        at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
        at javax.media.j3d.J3dThread.run(J3dThread.java:250)

This one happens also with the roam example code, I attached the last
time, which is using the MouseViewHandler.

Any hints, what could cause that? I am going to dig into that for the next
step likely after Christmas.

Thanks Desiree


oooooooooooooooooooooooooooooooooooooooooooooooo
Desiree Hilbring

Institut fuer Photogrammetrie und Fernerkundung
Universitaet Karlsruhe, Germany
email: [EMAIL PROTECTED]
# 0721 6083676
oooooooooooooooooooooooooooooooooooooooooooooooo


On Tue, 17 Dec 2002, Justin Couch wrote:

> Sorry for the slow reply. We're madly working on getting Xj3D M6 out the
> door and have been ignoring all emails.
>
> Desiree Hilbring wrote:
>
> > I am still fiddling with your roaming classes and I have some questions:
> >
> > 1.
> > In SplitMergeLandscape there is a static variable:
> >
> > private static final int AXIS_TILE_COUNT = 7;
> >
> > What does that mean, the number of tiles to use on an axis (which axis?)?
>
> Both axes. It's just a number that is used to control the maximum number
> of tiles that we'll manage at any one point in time. On machines where
> you are constrained by CPU resources, you don't really want to be
> attempting to tile the entire world - particularly if you are running
> with really large datasets that cover hundreds or thousands of
> kilometres. For my machine, a PIII 800, that gave a reasonable amount of
> visible terrain while keeping the workload down to something reasonable
> allowing CPU cycles of other activities.
>
> > The x and y step are both 50, which is in world coordinates, right?
>
> Yes. Everything in the ROAM code assumes world coordinates. Placing the
> terrain under a transform is going to cause problems.
>
> > I would assume that I get a very small terrain with bounds ranging from
> > 0 to 250 in both sides. Including your Roam test code into my project, I
> > am encountering problems locating the objects in the virtual world.
> > Printing the bounds information of each Patch creates bounds like the
> > following:
> > from
> > Bounding box: Lower=-200.0 3500.0 -200.0 Upper=0.0 3550.0 0.0 (thats only
> > one patch)
>
> Even though you have said the terrain data is only 5x5 data points, the
> ROAM algorithm works in powers of two data points for the size of each
> patch. By default, the patch size is 64x64 data points, which is way
> larger than your heights. If you want a terrain that is only 250 units
> square, then you need to set the step distance to be closer together and
> interpolate the height requests. This makes the overall size of the
> patch to be 250, but using 64 datapoints in each direction.
>
> --
> 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".
>

===========================================================================
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