.TH "SoVRMLAnchor" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoVRMLAnchor \- .PP The \fBSoVRMLAnchor\fP class is used for linking to other URL resources\&. .PP \fBThe detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997)\&. It is copyright The Web3D Consortium, and is used by permission of the Consortium:\fP .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoVRMLParent\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "\fBSoVRMLAnchor\fP (void)" .br .ti -1c .RI "virtual void \fBhandleEvent\fP (\fBSoHandleEventAction\fP *action)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .ti -1c .RI "static void \fBsetFetchURLCallBack\fP (SoVRMLAnchorCB *, void *closure)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoMFString\fP \fBurl\fP" .br .ti -1c .RI "\fBSoSFString\fP \fBdescription\fP" .br .ti -1c .RI "\fBSoMFString\fP \fBparameter\fP" .br .ti -1c .RI "\fBSoSFVec3f\fP \fBbboxCenter\fP" .br .ti -1c .RI "\fBSoSFVec3f\fP \fBbboxSize\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual \fB~SoVRMLAnchor\fP ()" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoVRMLAnchor\fP class is used for linking to other URL resources\&. .PP \fBThe detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997)\&. It is copyright The Web3D Consortium, and is used by permission of the Consortium:\fP .PP .nf Anchor { eventIn MFNode addChildren eventIn MFNode removeChildren exposedField MFNode children [] exposedField SFString description "" exposedField MFString parameter [] exposedField MFString url [] field SFVec3f bboxCenter 0 0 0 # (-inf, inf) field SFVec3f bboxSize -1 -1 -1 # (0, inf) or -1,-1,-1 }.fi .PP .PP The Anchor grouping node retrieves the content of a URL when the user activates (e\&.g\&., clicks) some geometry contained within the Anchor node's children\&. If the URL points to a valid VRML file, that world replaces the world of which the Anchor node is a part (except when the parameter field, described below, alters this behaviour)\&. If non-VRML data is retrieved, the browser shall determine how to handle that data; typically, it will be passed to an appropriate non-VRML browser\&. Exactly how a user activates geometry contained by the Anchor node 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 Anchor node with an empty url does nothing when its children are chosen\&. A description of how multiple Anchors and pointing-device sensors are resolved on activation is contained in 4\&.6\&.7, Sensor nodes (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.7)\&. .PP More details on the children, addChildren, and removeChildren fields and eventIns can be found in 4\&.6\&.5, Grouping and children nodes (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.5)\&. .PP The description field in the Anchor node specifies a textual description of the Anchor node\&. This may be used by browser-specific user interfaces that wish to present users with more detailed information about the Anchor\&. The parameter exposed field may be used to supply any additional information to be interpreted by the browser\&. Each string shall 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 an HTML document\&. The parameter field is then: .PP .PP .nf Anchor { parameter [ "target=name_of_frame" ] ... } .fi .PP .PP An Anchor node may be used to bind the initial Viewpoint node in a world by specifying a URL ending with '#ViewpointName' where 'ViewpointName' is the name of a viewpoint defined in the VRML file\&. For example: .PP .PP .nf Anchor { url "http://www.school.edu/vrml/someScene.wrl#OverView" children Shape { geometry Box {} } } .fi .PP .PP specifies an anchor that loads the VRML file 'someScene\&.wrl' and binds the initial user view to the Viewpoint node named 'OverView' when the Anchor node's geometry (Box) is activated\&. If the named Viewpoint node is not found in the VRML file, the VRML file is loaded using the default Viewpoint node binding stack rules (see VRMLViewpoint)\&. If the url field is specified in the form '#ViewpointName' (i\&.e\&. no file name), the Viewpoint node with the given name ('ViewpointName') in the Anchor's run-time name scope(s) shall be bound (set_bind TRUE)\&. The results are undefined if there are multiple Viewpoints with the same name in the Anchor's run-time name scope(s)\&. The results are undefined if the Anchor node is not part of any run-time name scope or is part of more than one run-time name scope\&. See 4\&.4\&.6, Run-time name scope, for a description of run-time name scopes\&. See VRMLViewpoint, for the Viewpoint transition rules that specify how browsers shall interpret the transition from the old Viewpoint node to the new one\&. For example: .PP .PP .nf Anchor { url "#Doorway" children Shape { geometry Sphere {} } } .fi .PP .PP binds the 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, no action occurs on activation\&. More details on the url field are contained in 4\&.5, VRML and the World Wide Web (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.5)\&. The bboxCenter and bboxSize fields specify a bounding box that encloses the Anchor's children\&. This is a hint that may be used for optimization purposes\&. The results are undefined if the specified bounding box is smaller than the actual bounding box of the children at any time\&. The default bboxSize value, (-1, -1, -1), implies that the bounding box is not specified and if needed shall be calculated by the browser\&. More details on the bboxCenter and bboxSize fields can be found in 4\&.6\&.4, Bounding boxes (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.4)\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoVRMLAnchor::SoVRMLAnchor (void)" Default constructor\&. .SS "SoVRMLAnchor::~SoVRMLAnchor ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoVRMLAnchor::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Reimplemented from \fBSoVRMLParent\fP\&. .SS "const \fBSoFieldData\fP ** SoVRMLAnchor::getFieldDataPtr (void)\fC [static]\fP, \fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoVRMLParent\fP\&. .SS "const \fBSoFieldData\fP * SoVRMLAnchor::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoVRMLParent\fP\&. .SS "void SoVRMLAnchor::setFetchURLCallBack (SoVRMLAnchorCB *f, void *closure)\fC [static]\fP" Sets the callback that will be called when the node is selected\&. .SS "void SoVRMLAnchor::handleEvent (\fBSoHandleEventAction\fP *action)\fC [virtual]\fP" Action method for \fBSoHandleEventAction\fP\&. .PP Inspects the event data from \fIaction\fP, and processes it if it is something which this node should react to\&. .PP Nodes influencing relevant state variables for how event handling is done also overrides this method\&. .PP Reimplemented from \fBSoGroup\fP\&. .SH "Member Data Documentation" .PP .SS "SoVRMLAnchor::url" The URL string\&. .SS "SoVRMLAnchor::description" The textual description of the URL\&. .SS "SoVRMLAnchor::parameter" May be used to supply additional information to the browser\&. .PP Each string should be pairs of \fIkeyword\fP = \fIvalue\fP\&. .SS "SoVRMLAnchor::bboxCenter" Children bounding box hint center\&. Default value is (0, 0, 0)\&. .SS "SoVRMLAnchor::bboxSize" Children bounding box size hint\&. Default value is (-1, -1, -1)\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.