Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

ZF~ 4 Xy,ox³rXRlL{E@\O66 MjbFB^WYݛ0KիkU¯ok 3=ӱHC{Qx 08K8|>\bI}(-$qҙlcFX'&1E,DCsUu˺^ͺuu%,|Ϳ6k$Z[o1XUz5y}ݫDg%4?Ou|{Q,^8(usZߛY%p`"m-\ Iԧw2Be#?j̯}"Y*xv2%H6H ? Pb3/Nهg3U0 h'fz.#1!tӱҧT $'_*H-I@Ƿ,Dir+ƷyR\ƌ>zt> bJI?yt%ҧ_ @4^C ’&^zaʼ0lɆB0I0;cru qijQЁ6Wܲ4!yx$&Ƴ4ć)BЦ Bv:yu3AO) IJ5BCR#$/x:*7E#JS :]& (d[삡jT>{J7?O h}44Ma,, IGb-t#9nv4Ck=g"nyKϷ@Ql*"&!zg*|HgU!f^#e,qﮅ S>) )B.yJ(/ "%Qh=.)[gxdq ɐ*@Jx(t. e}Jj@i_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:6}7sY5K'(uO68?+=YjLLeBsգ7 {`>}ɞ,] DM?Js$钏{ͦz2W~"ܾ>߾m^mű *)ny̿gxZ0XeSˆ#˜-Beu}=OZ; - {8ͽ=mRNThb+)ٯxιUyRx29m,ΡjW@(3d){1^GW:$)h')(?Lzr.L]Ob2UX*Z N'8Z2]*pi;L3bnoRМ?bkgv'|6Lun+#<̓NG ǟߓ%;?2$LZ<xig $DtW1"2UA{xmRqs8'EDK`Y6Z zg 7 :*z$iA4OG Jկ1&C<ߌrsi0ȌU+cՍhAεOw|LI\shxMMkfwʷ4#)C{@.$ OiyT/^`_$>Se9JS FPnOkIA)=?10 T#@cEIDgNl ڴ80T4ɵb,9*5J^ўfk?ANwIs{)ͫX6F)S<%۝Oې: MT;4ߡd-_O7؇_δzK+5h^= Pn G/1ʬUR8Xܿ*_ڙ,IoEd _Z3;j`oO{8N:I&IQq8"9Y'xfALVG0}'weo8T5UΧq}x Y^""4%xQps, ^y7 s 2!YXZqZ5+'gJ,!͌նay\CFܶ?SVHUx d౯n԰ =`8w{c])q3ұ1m|n zEuTxF:R}B2hG:K[\҃ eОV6`f7};WLuc4w}ϟ &6u9^e|'z=-ȹ\iLqǛ(.wi'i/W>F4{=4f ߉4^86[Zmg&m돃fp .+B,T& V2uG7ǯ%M

Anchor Node


If you're not familiar to grouping nodes in VRML see the section Creating Hierarchical Node Structures for general information on grouping.

The Anchor node lets you define a set of objects as a link to a url. When you click in one of the objects within an Anchor node the url will be fetched.

Anchor nodes can also be used to set a given Viewpoint. Examples will be provided bellow.

When the user has the mouse over an object contained in an Anchor node the url will be displayed.

The following fields are present:
  • children which contains all the nodes included in the group.
  • url specifies the url to be fetched or a Viewpoint to become active. You can specify multiple locations if you want to, the browser will look for data in those locations in decreasing order of preference.
  • parameter supplies additional information for the browser. For instance you can specify the target window where the url should be displayed.
  • description specifies a string which will replace the url information given to the user when the mouse is over an object contained within an Anchor.
  • bboxCenter specifies the center of a box that encloses the nodes in the group. The value for this field is a 3D point.
  • bboxSize specifies where the size of a box that encloses the nodes in the group. By default this field has a value of -1 -1 -1, which implies that no box is defined. The values for this field must be greater than or equal to zero. If the children nodes do not fit inside the box defined the results are undefined.
  • The latter two fields are optional. They can be used by the browser for optimization purposes.



    Syntax:
    Anchor {
    children [ ]
    url [ ]
    parameter
    description ""
    bboxCenter 0 0 0
    bboxSize -1 -1 -1
    }




    Example:
    Anchor {
    children [ Shape { geometry Sphere { } }]
    url "http://www.my_server.pt/my_world.wrl"
    description "My World"
    parameter ["target=my_frame" ]
    }


    In the above example when the mouse is over an object contained in the Anchor node a prompt will be displayed with the message "My World" (If description was absent the prompt would display the url specified). When the user clicks an object contained in the Anchor node the specified url is fetched and displayed in the frame named "my_frame".

    The next example shows an Anchor which is linked to a Viewpoint. When the mouse is over an object contained in the Anchor node a prompt will be displayed with the message "My Point of View". When the user clicks an object contained in the Anchor node the specified Viewpoint becomes active.

    Example:
    Anchor {
    children [ Shape { geometry Sphere { } } ]
    url #my_viewpoint
    description "My Point of View"
    }