|
Cortona VRML client provides native support of GeoVRML nodes
(GeoCoordinate ,
GeoElevationGrid ,
GeoLocation ,
GeoLOD ,
GeoPositionInterpolator ,
GeoTouchSensor ,
GeoViewpoint ),
which represent various geographic data using VRML. The support
for these nodes is implemented by using native script interface. In addition,
ParallelGraphics has introduced the
GeoElevationGrid
VRML node that uses
script from the GeoElevationGrid node, but implements Cortona's
SplineFaceSet
extension node inside
(See definition).
How to include Cortona native support of GeoVRML nodes in your VRML scenes
At the beginning of a VRML scene, insert the corresponding EXTERNPROTO statements for those GeoVRML nodes which are
used later in this scene. For example, if you scene contains GeoLocation nodes, add the following EXTERNPROTO:
EXTERNPROTO GeoLocation [
field SFNode geoOrigin
field MFString geoSystem
field SFString geoCoords
field MFNode children
]
[
"urn:web3d:geovrml:1.0/protos/GeoLocation.wrl"
"http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/protos/GeoLocation.wrl"
"http://www.geovrml.org/1.0/protos/GeoLocation.wrl"
]
|
PROTO definitions for other GeoVRML nodes reside in the same folder at the ParallelGraphics Website,
for example, for the GeoVRML_Node node, its PROTO definition has the following address:
http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/protos/GeoVRML_Node.wrl
For the purpose of integrity, definitions of other GeoVRML nodes that
do not contain Script nodes
(GeoMetadata ,
GeoOrigin ,
InlineLoadControl )
are also placed at ParallelGraphics Website.
Details of native script implementation of GeoVRML nodes
The code of the EXTERNPROTOs implies that for instanciating GeoVRML nodes in the VRML scenes, Cortona
uses the ParallelGraphics version of the GeoVRML PROTOs (at the ParallelGraphics).
These PROTOs are declared almost identically to the original GeoVRML PROTOs,
but has another values in url field of their Script nodes. For example, for the GeoLocation node:
DEF GEOLOC_SCRIPT Script {
...
url [
"nativescript:
libuid=Cortona.GeoVRML;
file-win32-x86=http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/cortgeo.dll#1,0,0,12;
scriptid=GeoLocation;",
"GeoLocation.class"
]
}
}
|
The first value in the url field (which is a MFString list) references the appropriate native script implementation
that is provided in the cortgeo.dll file.
The second value in the list ("GeoLocation.class") allows this PROTO to work under other
VRML browsers that support Java and multiple url's (in case the original GeoVRML Java
implementation is installed).
See full text of the GeoLocation PROTO
here.
In addition, ParallelGraphics provides a set of debug version of these PROTOs
(with all debug fields set to TRUE) at
http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/protos_debug/GeoLocation.wrl.
Automatic installation of Cortona GeoVRML native script library
Procedures with C++ implementation of GeoVRML nodes are included in the cortgeo.dll file (130K),
which resides at the ParallelGraphics Website at www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/cortgeo.dll.
This file is automatically downloaded and installed on the computer first time the user opens
a GeoVRML scene in Cortona. Next times when a GeoVRML scenes will be opened in Cortona, the browser
will detect that required the GeoVRML script library has been already installed and registered in the system,
and therefore will use its local copy.
|