ParallelGraphics
Home  »  Developer Zone  »  Products  »  Cortona VRML Client  »  Native GeoVRML Support  »  GeoSplineElevationGrid
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!


GeoSplineElevationGrid
#VRML V2.0 utf8

PROTO GeoSplineElevationGrid [
    field        SFNode   geoOrigin         NULL
    field        MFString geoSystem         ["GDC"]
    field        SFString geoGridOrigin     "0 0 0"
    field        SFInt32  xDimension        0       # [0,)
    field        SFString xSpacing          "1.0"   # (0,)
    field        SFInt32  zDimension        0       # [0,)
    field        SFString zSpacing          "1.0"   # (0,)
    field        MFFloat  height            []      # (-,)
    eventIn      MFFloat  set_height
    field        SFFloat  yScale            1.0
    eventIn      SFFloat  set_yScale
    exposedField SFNode   color             NULL
    exposedField SFNode   texCoord          TextureCoordinate {}
    exposedField SFNode   normal            NULL
    field        SFBool   normalPerVertex   TRUE
    field        SFBool   ccw               TRUE
    field        SFBool   colorPerVertex    TRUE
    field        SFFloat  creaseAngle       0       # [0,]
    field        SFBool   solid             TRUE
    field        MFFloat  distance          []
    field        MFFloat  quality           [0.5]
] {


    DEF GEOELEVGRID_IFS SplineFaceSet {

	# These fields of the GeoElevationGrid are easy to support -
	# we just pass them straight into the IndexedFaceSet and let
	# the VRML browser worry about them.

	color           IS color
	texCoord        IS texCoord
	ccw             IS ccw
	colorPerVertex  IS colorPerVertex
	creaseAngle     IS creaseAngle
	solid           IS solid
	normal          IS normal
	normalPerVertex IS normalPerVertex
	distance		  IS distance
	quality	      IS quality

	# These other fields are going to have to be filled in
	# by our script though...
      
	coord  DEF GEOELEVGRID_COORD Coordinate { point [] }
	coordIndex    []
	colorIndex    []
	texCoordIndex []
	normalIndex   []

    }

    # The follow script is where it all happens. This manages the
    # conversion of geographic coordinate systems into VRML's XYZ.

    DEF GEOELEVGRID_SCRIPT Script {
	field    SFNode   geoOrigin     IS geoOrigin
	field    MFString geoSystem     IS geoSystem
	field    SFString geoGridOrigin IS geoGridOrigin
	field    SFInt32  xDimension    IS xDimension
	field    SFString xSpacing      IS xSpacing
	field    SFInt32  zDimension    IS zDimension
	field    SFString zSpacing      IS zSpacing
	field    MFFloat  height        IS height
	eventIn  MFFloat  set_height    IS set_height
	field    SFFloat  yScale        IS yScale
	eventIn  SFFloat  set_yScale    IS set_yScale

	field    SFNode   coord         USE GEOELEVGRID_COORD
	field    SFNode   ifs           USE GEOELEVGRID_IFS 

	field    SFBool   debug         FALSE

	directOutput TRUE

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

Last updated: Fri, 29 Aug 2008
© 2000-2008 ParallelGraphics. All rights reserved. Terms of use.