.TH "SoWWWInline" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoWWWInline \- .PP The \fBSoWWWInline\fP class is a node used to include data from an URL\&. .PP If the URL is not a local file, the application is responsible for supplying a callback to a function which will fetch the data of the URL\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoNode\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBBboxVisibility\fP { \fBNEVER\fP, \fBUNTIL_LOADED\fP, \fBALWAYS\fP }" .br .in -1c .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 "\fBSoWWWInline\fP (void)" .br .ti -1c .RI "void \fBsetFullURLName\fP (const \fBSbString\fP &url)" .br .ti -1c .RI "const \fBSbString\fP & \fBgetFullURLName\fP (void)" .br .ti -1c .RI "\fBSoGroup\fP * \fBcopyChildren\fP (void) const " .br .ti -1c .RI "void \fBrequestURLData\fP (void)" .br .ti -1c .RI "SbBool \fBisURLDataRequested\fP (void) const " .br .ti -1c .RI "SbBool \fBisURLDataHere\fP (void) const " .br .ti -1c .RI "void \fBcancelURLDataRequest\fP (void)" .br .ti -1c .RI "void \fBsetChildData\fP (\fBSoNode\fP *urldata)" .br .ti -1c .RI "\fBSoNode\fP * \fBgetChildData\fP (void) const " .br .ti -1c .RI "virtual \fBSoChildList\fP * \fBgetChildren\fP (void) const " .br .ti -1c .RI "virtual void \fBdoAction\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBdoActionOnKidsOrBox\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBcallback\fP (\fBSoCallbackAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetBoundingBox\fP (\fBSoGetBoundingBoxAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetMatrix\fP (\fBSoGetMatrixAction\fP *action)" .br .ti -1c .RI "virtual void \fBhandleEvent\fP (\fBSoHandleEventAction\fP *action)" .br .ti -1c .RI "virtual void \fBsearch\fP (\fBSoSearchAction\fP *action)" .br .ti -1c .RI "virtual void \fBpick\fP (\fBSoPickAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetPrimitiveCount\fP (\fBSoGetPrimitiveCountAction\fP *action)" .br .ti -1c .RI "virtual void \fBaudioRender\fP (\fBSoAudioRenderAction\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 (SoWWWInlineFetchURLCB *f, void *userdata)" .br .ti -1c .RI "static void \fBsetBoundingBoxVisibility\fP (\fBBboxVisibility\fP b)" .br .ti -1c .RI "static \fBBboxVisibility\fP \fBgetBoundingBoxVisibility\fP (void)" .br .ti -1c .RI "static void \fBsetBoundingBoxColor\fP (\fBSbColor\fP &c)" .br .ti -1c .RI "static const \fBSbColor\fP & \fBgetBoundingBoxColor\fP (void)" .br .ti -1c .RI "static void \fBsetReadAsSoFile\fP (SbBool onoff)" .br .ti -1c .RI "static SbBool \fBgetReadAsSoFile\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFString\fP \fBname\fP" .br .ti -1c .RI "\fBSoSFVec3f\fP \fBbboxCenter\fP" .br .ti -1c .RI "\fBSoSFVec3f\fP \fBbboxSize\fP" .br .ti -1c .RI "\fBSoSFNode\fP \fBalternateRep\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~SoWWWInline\fP ()" .br .ti -1c .RI "virtual void \fBaddBoundingBoxChild\fP (\fBSbVec3f\fP center, \fBSbVec3f\fP size)" .br .ti -1c .RI "virtual SbBool \fBreadInstance\fP (\fBSoInput\fP *in, unsigned short flags)" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBSoFieldContainer\fP *fromfC, SbBool copyconnections)" .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 \fBSoWWWInline\fP class is a node used to include data from an URL\&. .PP If the URL is not a local file, the application is responsible for supplying a callback to a function which will fetch the data of the URL\&. As long as no data has been imported, the scenegraph representation of the node will be that of a bounding box enclosing the geometry we expect to fetch from the URL\&. The application is naturally also responsible for specifying the expected dimensions of the geometry\&. .PP If FetchURLCallBack isn't set, the alternateRep will be rendered instead\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf WWWInline { name '' bboxCenter 0 0 0 bboxSize 0 0 0 alternateRep NULL } .fi .PP .PP \fBSince:\fP .RS 4 SGI Inventor 2\&.1 .PP Coin 1\&.0 .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoWWWInline::BboxVisibility\fP" Used to enumerate bbox rendering strategies\&. .PP \fBEnumerator: \fP .in +1c .TP \fB\fINEVER \fP\fP Never render bounding box\&. .TP \fB\fIUNTIL_LOADED \fP\fP Render bounding box until children are loaded\&. .TP \fB\fIALWAYS \fP\fP Always render bounding box, event when children are loaded\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoWWWInline::SoWWWInline (void)" Constructor\&. .SS "SoWWWInline::~SoWWWInline ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoWWWInline::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 Implements \fBSoBase\fP\&. .SS "const \fBSoFieldData\fP ** SoWWWInline::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 \fBSoNode\fP\&. .SS "const \fBSoFieldData\fP * SoWWWInline::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 \fBSoFieldContainer\fP\&. .SS "void SoWWWInline::setFullURLName (const \fBSbString\fP &url)" If the \fBSoWWWInline::name\fP field specifies a relative URL, use this method to name the complete URL\&. .SS "const \fBSbString\fP & SoWWWInline::getFullURLName (void)" If a full URL has been set with the \fBSoWWWInline::setFullURLName()\fP method, return it\&. If not, returns the value of the \fBSoWWWInline::name\fP field\&. .SS "\fBSoGroup\fP * SoWWWInline::copyChildren (void) const" Returns a subgraph with a deep copy of the children of this node\&. .SS "void SoWWWInline::requestURLData (void)" Start requesting URL data\&. This might trigger a callback to the callback set in \fBSoWWWInline::setFetchURLCallBack()\fP\&. .SS "SbBool SoWWWInline::isURLDataRequested (void) const" Returns \fCTRUE\fP if \fBSoWWWInline::requestURLData()\fP has been called without being canceled by SoWWWInline::cancelURLData()\&. .SS "SbBool SoWWWInline::isURLDataHere (void) const" Return \fCTRUE\fP if the current child data has been read from file/URL and set using \fBsetChildData()\fP\&. .SS "void SoWWWInline::cancelURLDataRequest (void)" Can be used to signal that URL loading has been canceled\&. You should use this method if you intend to request URL data more than once\&. .SS "void SoWWWInline::setChildData (\fBSoNode\fP *urldata)" Manually set up the subgraph for this node\&. This should be used by the application to set the data that was read from the file/URL\&. .SS "\fBSoNode\fP * SoWWWInline::getChildData (void) const" Returns the child data for this node\&. This can be data read from a file, from an URL, from the contents of \fBSoWWWInline::alternateRep\fP or that was manually set with \fBSoWWWInline::setChildData()\fP\&. .SS "\fBSoChildList\fP * SoWWWInline::getChildren (void) const\fC [virtual]\fP" Returns the child list with the child data for this node\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::setFetchURLCallBack (SoWWWInlineFetchURLCB *f, void *userdata)\fC [static]\fP" Sets the URL fetch callback\&. This will be used in \fBSoWWWInline::readInstance()\fP or when the user calls \fBSoWWWInline::requestURLData()\fP\&. FIXME: Shouldn't called on \fBreadInstance()\fP, only when we need to render the node (or calculate the bbox if we don't have one)\&. kintel 20060203\&. .SS "void SoWWWInline::setBoundingBoxVisibility (\fBBboxVisibility\fPb)\fC [static]\fP" Sets the bounding box visibility strategy\&. The default is UNTIL_LOADED\&. .SS "\fBSoWWWInline::BboxVisibility\fP SoWWWInline::getBoundingBoxVisibility (void)\fC [static]\fP" Returns the bounding box visibility\&. .SS "void SoWWWInline::setBoundingBoxColor (\fBSbColor\fP &c)\fC [static]\fP" Sets the bounding box color\&. .SS "const \fBSbColor\fP & SoWWWInline::getBoundingBoxColor (void)\fC [static]\fP" Returns the bounding box color\&. .SS "void SoWWWInline::setReadAsSoFile (SbBoolonoff)\fC [static]\fP" Sets whether children should be read from a local file, in the same manner as \fBSoFile\fP children are read\&. .PP If this is set to \fCTRUE\fP, the URL must point to a file on the local file system, as can be accessed by the standard C library fopen() call\&. .SS "SbBool SoWWWInline::getReadAsSoFile (void)\fC [static]\fP" Returns if children should be read from local files\&. .PP \fBSee Also:\fP .RS 4 \fBsetReadAsSoFile()\fP .RE .PP .SS "void SoWWWInline::doAction (\fBSoAction\fP *action)\fC [virtual]\fP" This function performs the typical operation of a node for any action\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::doActionOnKidsOrBox (\fBSoAction\fP *action)\fC [virtual]\fP" This method should probably have been private in OIV\&. It is obsoleted in Coin\&. Let us know if you need it\&. .SS "void SoWWWInline::callback (\fBSoCallbackAction\fP *action)\fC [virtual]\fP" Action method for \fBSoCallbackAction\fP\&. .PP Simply updates the state according to how the node behaves for the render action, so the application programmer can use the \fBSoCallbackAction\fP for extracting information about the scene graph\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP This is called during rendering traversals\&. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::getBoundingBox (\fBSoGetBoundingBoxAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGetBoundingBoxAction\fP\&. .PP Calculates bounding box and center coordinates for node and modifies the values of the \fIaction\fP to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node\&. .PP Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::getMatrix (\fBSoGetMatrixAction\fP *action)\fC [virtual]\fP" Action method for \fBSoGetMatrixAction\fP\&. .PP Updates \fIaction\fP by accumulating with the transformation matrix of this node (if any)\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::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 \fBSoNode\fP\&. .SS "void SoWWWInline::search (\fBSoSearchAction\fP *action)\fC [virtual]\fP" Action method for \fBSoSearchAction\fP\&. .PP Compares the search criteria from the \fIaction\fP to see if this node is a match\&. Searching is done by matching up \fIall\fP criteria set up in the \fBSoSearchAction\fP -- if \fIany\fP of the requested criteria is a miss, the search is not deemed successful for the node\&. .PP \fBSee Also:\fP .RS 4 \fBSoSearchAction\fP .RE .PP .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::pick (\fBSoPickAction\fP *action)\fC [virtual]\fP" Action method for \fBSoPickAction\fP\&. .PP Does common processing for \fBSoPickAction\fP \fIaction\fP instances\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::getPrimitiveCount (\fBSoGetPrimitiveCountAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGetPrimitiveCountAction\fP\&. .PP Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the \fIaction\fP\&. .PP Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::audioRender (\fBSoAudioRenderAction\fP *action)\fC [virtual]\fP" Action method for \fBSoAudioRenderAction\fP\&. .PP Does common processing for \fBSoAudioRenderAction\fP \fIaction\fP instances\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::addBoundingBoxChild (\fBSbVec3f\fPcenter, \fBSbVec3f\fPsize)\fC [protected]\fP, \fC [virtual]\fP" Convenience method that extends the current bounding box to include the box specified by \fIcenter\fP and \fIsize\fP\&. .SS "SbBool SoWWWInline::readInstance (\fBSoInput\fP *in, unsigned shortflags)\fC [protected]\fP, \fC [virtual]\fP" This method is mainly intended for internal use during file import operations\&. .PP It reads a definition of an instance from the input stream \fIin\fP\&. The input stream state points to the start of a serialized / persistant representation of an instance of this class type\&. .PP \fCTRUE\fP or \fCFALSE\fP is returned, depending on if the instantiation and configuration of the new object of this class type went ok or not\&. The import process should be robust and handle corrupted input streams by returning \fCFALSE\fP\&. .PP \fIflags\fP is used internally during binary import when reading user extension nodes, group nodes or engines\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoWWWInline::copyContents (const \fBSoFieldContainer\fP *from, SbBoolcopyconnections)\fC [protected]\fP, \fC [virtual]\fP" Makes a deep copy of all data of \fIfrom\fP into this instance, \fIexcept\fP external scenegraph references if \fIcopyconnections\fP is \fCFALSE\fP\&. .PP This is the method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically\&. .PP For copying nodes from application code, you should not invoke this function directly, but rather call the \fBSoNode::copy()\fP function: .PP .PP .nf SoNode * mynewnode = templatenode->copy(); .fi .PP .PP The same also goes for engines\&. .PP Make sure that when you override the \fBcopyContents()\fP method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, as \fBcopyContents()\fP in for instance \fBSoNode\fP and \fBSoFieldContainer\fP does important work\&. It should go something like this: .PP .PP .nf void MyCoinExtensionNode::copyContents(const SoFieldContainer * from, SbBool copyconnections) { // let parent superclasses do their thing (copy fields, copy // instance name, etc etc) SoNode::copyContents(from, copyconnections); // [\&.\&.then copy internal data\&.\&.] } .fi .PP .PP Reimplemented from \fBSoNode\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFString\fP SoWWWInline::name" Name of file/URL where children should be read\&. .SS "\fBSoSFVec3f\fP SoWWWInline::bboxCenter" Center of bounding box\&. .SS "\fBSoSFVec3f\fP SoWWWInline::bboxSize" Size of bounding box\&. .SS "\fBSoSFNode\fP SoWWWInline::alternateRep" Alternate representation\&. Used when children can't be read from name\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.