public class SoVRMLAnchor extends SoVRMLGroup
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at
The SoVRMLAnchor grouping node causes a URL to be fetched over the network when the viewer activates (e.g. clicks) some geometry contained within the SoVRMLAnchor's children. If the URL pointed to is a legal VRML world, then that world replaces the world which the SoVRMLAnchor is a part of. If non-VRML data type is fetched, it is up to the browser to determine how to handle that data; typically, it will be passed to an appropriate general viewer.
Exactly how a user activates a child of the SoVRMLAnchor depends on the pointing device and is determined by the VRML browser. Typically, clicking with the pointing device will result in the new scene replacing the current scene. An SoVRMLAnchor with an empty ("") url does nothing when its children are chosen. See "Concepts - Sensors and Pointing Device Sensors" for a description of how multiple SoVRMLAnchors and pointing device sensors are resolved on activation.
See the "Concepts - Grouping and Children Nodes" section for a description of children , addChildren , and removeChildren fields and eventIns.
The description field in the SoVRMLAnchor allows for a prompt to be displayed as an alternative to the URL in the url field. Ideally, browsers will allow the user to choose the description, the URL, or both to be displayed for a candidate SoVRMLAnchor.
The parameter exposed field may be used to supply any additional information to be interpreted by the VRML or HTML browser. Each string should consist of "keyword=value" pairs. For example, some browsers allow the specification of a 'target' for a link, to display a link in another part of the HTML document; the parameter field is then:
AnSoVRMLAnchor { parameter [ "target=name_of_frame" ] ... }
SoVRMLAnchor may be used to bind the initial Viewpoint in a world by specifying a URL ending with "#ViewpointName", where "ViewpointName" is the name of a viewpoint defined in the file. For example:
specifies an anchor that loads the file "someScene.wrl", and binds the initial user view to theSoVRMLAnchor { url "http://www.school.edu/vrml/someScene.wrl#OverView" children Shape { geometry Box {} } }
SoVRMLViewpoint named "OverView" (when the Box is activated). If the named Viewpoint is not found in the file, then ignore it and load the file with the default Viewpoint. If no world is specified, then this means that the Viewpoint specified should be bound ( set_bind true). For example:
binds viewer to the viewpoint defined by the "Doorway" viewpoint in the current world when the sphere is activated. In this case, if the Viewpoint is not found, then do nothing on activation.SoVRMLAnchor { url "#Doorway" children Shape { geometry Sphere {} } }
See "Concepts - URLS and URNs" for more details on the url field.
The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLAnchor's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts -
Bounding Boxes" for a description of bboxCenter and bboxSize fields.
File format/default:
VRMLAnchor {
| children | [] |
| description | "" |
| parameter | [] |
| url | [] |
| metadata | NULL |
| bboxCenter | 0 0 0 |
| bboxSize | -1 -1 -1 |
Action behavior:
SoMFNode | addChildren |
SoMFNode | removeChildren |
SoMFNode | set_children |
SoSFString | set_description |
SoMFString | set_parameter |
SoMFString | set_url |
SoSFNode | set_metadata |
SoMFNode | children_changed |
SoSFString | description_changed |
SoMFString | parameter_changed |
SoMFString | url_changed |
SoSFNode | metadata_changed |
SoVRMLGroup.CachingsInventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
SoSFString |
description
Deprecated.
A description of the URL which may make more sense to users than the URL itself (e.g.
|
SoMFString |
parameter
Deprecated.
Used to supply any additional information to be interpreted by the application.
|
SoMFString |
url
Deprecated.
URL which the application will be called back to fetch when this node is activated by a left mouse click (e.g.
|
AUTO, boundingBoxCaching, directVizCaching, OFF, ON, pickCulling, renderCaching, renderCulling, renderUnitIdbboxCenter, bboxSize, children, metadataboundingBoxIgnoringVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoVRMLAnchor()
Deprecated.
Creates a VRMLAnchor node with default settings.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
enableEvents(boolean OnOffFlag)
Deprecated.
|
java.lang.String |
getFullURLName()
Deprecated.
Returns the full URL set by
setFullURLName(), or if not set, returns the contents of the url field. |
void |
setFullURLName(java.lang.String name)
Deprecated.
If the
url field contains a relative URL (for instance "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference. |
getNumRenderCaches, setNumRenderCachesaddChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChildaffectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizablegetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreadspublic final SoMFString url
public final SoSFString description
public final SoMFString parameter
public SoVRMLAnchor()
public java.lang.String getFullURLName()
setFullURLName(), or if not set, returns the contents of the url field.public static void enableEvents(boolean OnOffFlag)
public void setFullURLName(java.lang.String name)
url field contains a relative URL (for instance "foo.wrl" instead of "http://bogus.com/foo.wrl"), the anchor cannot resolve the URL reference.
This method allows the application to tell the anchor what its full URL should be.Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com