Re: J3D Properties Settings

From: Don Dietrick <dietrick@bbn.com>
Date: Mon Jun 10 2002 - 09:00:59 EDT

Hi Dave,

On Monday, June 10, 2002, at 04:59 AM, Dave Hallam wrote:

> Hi Don,
>
> Tried that and discovered that the shape was never created in OMPoly
> due to OMPoly.doShapes being set to false.  Setting this to true, means
> that the map is displayed.  There is a note in the code in OMPoly
> regarding doShapes that I have ignored.

Hmmm. The OMPolys do not create internal shape objects by default
unless the flag is set (to save time), but they should generate one if
it is explicitly asked for. I'll check into that.

> Is there a set way to have a layer place J3D object, such as Text or a
> ColorCube at a particular altitude in the 3D view?
>
> Quick question to save looking through all the code, is the map
> generated as an image from all the layers then laid onto a flat sheet
> in the 3D world?  Or are they javax.media.j3d.LineArray type objects
> (for a poly line)?

It depends on the content mask that is passed into the OM3DManager. The
OM3DConstants have the different pre-defined versions:

public final static int CONTENT_MASK_OMGRAPHICHANDLERLAYERS = 1 << 0;

The MapHandler is used to find all OMGraphicHandlerLayers, which are
used to create Shape3D objects from their OMGraphics. These would be 3
dimensional representations of 2 dimensional objects. This is the
default flag set, and it what you are seeing now.

public final static int CONTENT_MASK_OM3DGRAPHICHANDLERS= 1 << 2;

The MapHandler is used to find OM3DGraphicHandlers, which are given a
MapContent object to add content to. This is where you would add your
own Shape3D objects - there are callback methods on the MapContent
object to add stuff a bunch of different ways, including your own
Shape3D content.

public final static int CONTENT_MASK_IMAGEMAP = 1 << 3;

This is the option to create a image to lay on a sheet for all the other
layers. This isn't implemented yet, but there is partial code. Still
buggy.

public final static int CONTENT_MASK_ELEVATIONMAP = 1 << 4;

This is to use DTED to create terrain. Not implemented yet. I tried a
couple of different things, including using the j3d.org code, but I
couldn't get a satisfactory result.

Ideally, I'd like to get the last two options combined to a fifth mask
type.

- Don

> On Friday, June 7, 2002, at 03:29 AM, Dave Hallam wrote:
>
> > Don,
> >
> > Thanks for your reply.  I have added the code to the Plug In
> > constructor but then get a NullPointerException in
> PilotLoader.getGUI()
> > which is due to timer being null so in the constructor for
> PilotLoader,
> > I have temporarily put the line
> >
> > timer = new Timer(1000, this);
> >
> > Obviously, that will need to be clarified from your end.
>
> Yeah, I'll work on a patch on my end.
>
> >
> > The navigation controls work fine.  I have attached a
> > partially navigated 3D view to show you what my 3D world looks like. 
> > I'm using your properties file with the 3D additions, so I'm centred
> > over Mass., I guess.
>
> The 3D scene gets created that reflects what the OpenMap map proj!
> ection
> currently is.
>
> > Just a quick question, what is the curtain for?  A kind of fogging?
>
> Not really. It just something I created to clean up the appearance of
> the scene. OpenMap relies on natural Java clipping to cut off the
> extents of what is on the map. In Java 3D, it turns out that the
> overhang still gets rendered into the scene, you you end up with partial
> OMGraphics getting scattered around (on the other side of the curtain).
> The curtain is just an object covering up the untidiness.
>
> Right now it's a box, but I think different shapes would be useful, like
> a picture frame kind of thing.
>
> > Just do you know what I'm running:
> >
> > Windows 98, J2SDK 1.4, Java3D 1.2.1_04 (DirectX), OpenMap 4.5
> >
> > I've no idea what the problem is - any help would be most appreciated.
>
> You might want to run with -Ddebug.3dshape for more details when actual
> 3DShape objects get created for the sc! ene, just to make sure that step
> is happening.
>
> - Don
>
> >
> > Best regards,
> >
> > Dave 
> >
> > Don Dietrick wrote:
> >
> > HI Dave,
> >
> > I think you have it right, the only thing I'd change is:
> >
> > On Thursday, June 6, 2002, at 05:23 PM, Dave Hallam wrote:
> > > # Added this plugin to the openmap.layers list so that we can plot a
> > > path for the pilot
> > > pilotPathPlugin.class=com.bbn.openmap.plugin.PlugInLayer
> > > pilotPathPlugin.prettyName=Pilot Path
> > >
> pilotPathPlugin.plugin=com.bbn.openmap.plugin.pilot.PilotLoaderPlugIn
> >
> > to
> >
> > pilotPathPlugin.class=com.bbn.openmap.plugin.pilot.PilotLoaderPlugIn
> > pilotPathPlugin.prettyName=Pilot Path
> >
> > and forget about setting the plugin explicitly. The LayerHandler will
> > do the right thing for the plugin and the PlugInLayer.
> >
> > >! Clicking on the icon brings up a 3D world looking like the insides
> > of a
> > > box but there is only sea color in there.  The following is the
> output
> > > when a number of debugs fla! gs are set:
> >
> > Now this is weird. Looks like the layers are loading into the
> > MapContent properly, and in fact you are getting the sea and the
> > "curtain" around the scene. I'm not sure why the political boundaries,
> > graticule and drawing tool layer graphics are not there.
> >
> > The PilotLoaderPlugIn doesn't need to be used in conjunction with the
> > OM3DViewerLauncher, they are separate things.
> >
> > Can you move around in the 3D scene using the arrow keys?
> >
> > >
> > >
> > > D:\openmap-4.5\bin>java.exe -mx128m -Ddebug.3d -Ddebug.pilotloader
> > > -Ddebug.pilot -Dopenmap.configDir=..\share
> com.bbn.openmap.app.OpenMap
> > > OpenMap(tm) Version 4.5
> > > &nbs! p; Copyright 1998-2001, BBNT Solutions LLC, a part of Verizon.
> > >   See http://openmap.bbn.com/ for details.
> > >
> > > PilotLoaderPlugIn: found OMDrawingTool
> > > OM3DViewerLauncher.actionPerformed(): CREATE
> > > OM3DViewer: adding map content
> > > LayerMap! Content: putting layer graphics on the map.
> > > LayerMapContent: putting layer Political Boundaries graphics on the
> > map.
> > > LayerMapContent: putting layer Graticule graphics on the map.
> > > LayerMapContent: putting layer Drawing Tool Layer graphics on the
> map.
> > > LayerMapContent: putting down sea.
> > > LayerMapContent: looking for OM3DGraphicHandlers.
> > > LayerMapContent: found one, adding
> > > com.bbn.openmap.tools.j3d.OM3DViewerLauncher@955cd5
> > > OM3DViewer with projection Mercator[ world(13112,0) radius=6378137.0
> > > ppm=3272 center(41.5,-71.0) scale=1.0E7 maxscale=1.9658988! 8E8
> > > minscale=62.0 width=667 height=480], setting center of scene to
> 333.5,
> > > 320.0
> > > GraphicLoaderPlugIn returning list of 0 objects.
> > >
> > >
> > > I also added some debug code into the PilotLoaderPlugIn in getGUI()
> > > which results in the following console output:
> > >
> > >
> > > PilotLoaderPlugin.getGU! I() - loader = null
> > >
> >
> > Ho- Geez!
> >
> > I did some last minute cleanups getting rid of what I though were
> unused
> > leftover methods left over from the adaptation from the graphicLoader
> > package. In the GraphicLoaderPlugIn, the loader gets set in
> > setDTEDFrameCache(), and I deleted that method not realizing that the
> > loader was getting set in PilotLoaderPlugIn there, too.
> >
> > I think you can add
> >
> > loader = new PilotLoader(this);
> >
> > to the end of the PilotLoaderPlugIn constructor metho! ds.
> >
> > Dang.
> > Dang.
> > Dang.
> >
> > This still doesn't answer why the stuff above isn't working, though.
> >
> > - Don
> >
> >
> > >
> > > This seems to be the heart of the problem.  Would it be possible to
> > > publish all of the requirements for the properties file so that we
> can
> > > make sure that we have everything set?  That would be most helpful.
> > >
> > > Many thanks,
> > >
> > > Dave
> > >
> > >
> > >> Tel: +44 (0) 7092 250 375
> > > Fax: +44 (0) 7092 250 375
> > >
> > >
> > >
> >
> > >
> > > Sign up to watch the FIFA World Cup video highlights from your desk!
> > >
> > > http://fifaworldcup.yahoo.com/fc/en
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, BBN Technologies, dietrick@bbn.com
> 10 Moulton Street, Cambridge, MA 0213! 8
> 617-873-3031 [fax]-2794
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> >
> >
> > Tel: +44 (0) 7092 250 375
> > Fax: +44 (0) 7092 250 375
> >
> >
> >
>
> >
> > Sign up to watch the FIFA World Cup video highlights from your desk!
> >
> > http://fifaworldcup.yahoo.com/fc/en
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>
>
> Tel: +44 (0) 7092 250 375
> Fax: +44 (0) 7092 250 375
>
>
>

>
> Sign up to watch the FIFA World Cup video highlights from your desk!
>
> http://fifaworldcup.yahoo.com/fc/en

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jun 10 09:02:42 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT