ParallelGraphics
Home  »  Developer Zone  »  Products  »  Cortona VRML Client  »  Native GeoVRML Support  »  GeoLocation PROTO
Up to Native GeoVRML Support

GeoSplineElevationGrid 

GeoLocation PROTO 


Subscribe to Newsletter
 


Google Searchsite search:

 

%(domain)s %(domain)s
Install Cortona VRML Client!

Outline 3D

Try RobinZone!


GeoLocation PROTO

This PROTO resides at "http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/protos/GeoLocation.wrl"

Definition:

#VRML V2.0 utf8
#
# Filename: GeoLocation.wrl
#
# Author:
#   Martin Reddy, SRI International - 21 August 1999.
#
# Purpose:
#   This file contains the definition for a new node that aims to
#   provide support for geographic coordinate systems within VRML.
#   The goal is to be able to take any arbitrary VRML context and
#   georeference it, i.e. place it at a specific point on the planet.
#
#   The implementation is written in Java because we need access to
#   double precision support. You will therefore require a VRML
#   browser that supports Java in the Script node.
#
#   This node is part of the GeoVRML 1.0 sample implementation.
#   For information, refer to http://www.geovrml.org/1.0/
#
# License:
#   The contents of this file are subject to GeoVRML Public License
#   Version 1.0 (the "License"); you may not use this file except in
#   compliance with the License. You may obtain a copy of the License at
#   http://www.geovrml.org/1.0/license/.
#
#   Software distributed under the License is distributed on an "AS
#   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
#   implied. See the License for the specific language governing
#   rights and limitations under the License.
#
#   Portions are Copyright (c) SRI International, 2000.
#
# Revision:
#   $Id: content.html,v 1.3 2006/12/14 11:43:19 vma Exp $
#

PROTO GeoLocation [
  field    SFNode   geoOrigin NULL
  field    MFString geoSystem [ "GDC" ]
  field    SFString geoCoords ""
  field    MFNode   children  []
  field    SFBool   debug	FALSE
  eventIn  SFString set_geoCoords
  eventOut SFString geoCoords_changed
] {

   # Only the first node of a PROTO is rendered. Here we set this up
   # to be a Transform node so that this node can be used wherever a
   # a standard Transform node can be.

   DEF GEOLOC_NODE Transform {
      children IS children
   }

   # The follow script is where it all happens. This manages the
   # setting of the above transform in order to locate and orient
   # the children nodes at the specified geographic coordinate

   DEF GEOLOC_SCRIPT Script {
      field    SFNode   geoOrigin IS geoOrigin
      field    MFString geoSystem IS geoSystem
      field    SFString geoCoords IS geoCoords
      field    SFNode   transform USE GEOLOC_NODE
      field    SFBool   debug     IS debug
      eventIn  SFString set_geoCoords IS set_geoCoords
      eventOut SFString geoCoords_changed IS geoCoords_changed

      directOutput TRUE

      url [ 
       "nativescript: 
       libuid=Cortona.GeoVRML; 
       file-win32-x86=http://www.parallelgraphics.com/vrml/proto/GeoVRML/1.0/cortgeo.dll#1,0,0,10;
       scriptid=GeoLocation;
       ",
       "GeoLocation.class" 
       ]
   }
}


Last updated: Tue, 07 Oct 2008
© 2000-2008 ParallelGraphics. All rights reserved. Terms of use.