Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoWWWInline Class Reference

VSG extension Node that refers to children through a URL. More...

#include <Inventor/nodes/SoWWWInline.h>

+ Inheritance diagram for SoWWWInline:

Public Types

enum  BboxVisibility {
  NEVER ,
  UNTIL_LOADED ,
  ALWAYS
}
 BboxVisibility. More...
 
typedef void SoWWWInlineFetchURLCB(const SbString &url, void *userData, SoWWWInline *node)
 This is the format for callbacks that will get URL data for us.
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoWWWInline ()
 Creates an inline node with default settings.
 
void setFullURLName (const SbString &url)
 If the name field contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the inline cannot resolve the URL reference.
 
const SbStringgetFullURLName ()
 Returns the fullURL set by setFullURLName, or if not set, returns the contents of the name field.
 
SoGroupcopyChildren () const
 Return a copy of the hidden children as a Group.
 
void requestURLData ()
 Requests that URL data be fetched.
 
SbBool isURLDataRequested () const
 Returns whether URL data has been requested.
 
SbBool isURLDataHere () const
 Returns whether URL data is here (i.e. whether setChildData() has been called.)
 
void cancelURLDataRequest ()
 Cancels the active URL data fetch request.
 
void setChildData (SoNode *urlData)
 Sets the child data the inline should display.
 
SoNodegetChildData () const
 Gets the child data the inline should display.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static void setFetchURLCallBack (SoWWWInlineFetchURLCB *f, void *userData)
 Application callbacks invoked when the inline needs its URL data fetched.
 
static void setBoundingBoxVisibility (BboxVisibility b)
 Specifies when bounding boxes are displayed.
 
static BboxVisibility getBoundingBoxVisibility ()
 Queries when bounding boxes are displayed.
 
static void setBoundingBoxColor (SbColor &c)
 Specifies the color of bounding boxes displayed.
 
static const SbColorgetBoundingBoxColor ()
 Queries the color of bounding boxes displayed.
 
static void setReadAsSoFile (SbBool onOff)
 Sets the ReadAsSoFile flag.
 
static SbBool getReadAsSoFile ()
 Queries the ReadAsSoFile flag.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFVec3f bboxCenter
 Defines the center of the bounding box surrounding the URL child data.
 
SoSFVec3f bboxSize
 Defines the size of the bounding box surrounding the URL child data.
 
SoSFFilePathString name
 Specifies the URL which the application should fetch as child data to this node (e.g. "http://bogus.com/homeWorld.wrl.gz").
 
SoSFNode alternateRep
 Specifies child data that can be used instead of fetching data from the URL.
 

Detailed Description

VSG extension Node that refers to children through a URL.

This node refers to children through a URL (Universal Resource Locator). The application is responsible for actually fetching data from the URL for an SoWWWInline node to display.

FILE FORMAT/DEFAULT

    WWWInline {
    name "<Undefined file>"
    bboxCenter 0 0 0
    bboxSize 0 0 0
    alternateRep NULL
    }

ACTION BEHAVIOR

SEE ALSO

SoWWWAnchor, SoFile

Definition at line 120 of file SoWWWInline.h.

Member Typedef Documentation

◆ SoWWWInlineFetchURLCB

typedef void SoWWWInlineFetchURLCB(const SbString &url, void *userData, SoWWWInline *node)

This is the format for callbacks that will get URL data for us.

Once they get the data, they should call the setChildData() method.

Definition at line 74 of file SoWWWInline.h.

Member Enumeration Documentation

◆ BboxVisibility

BboxVisibility.

Enumerator
NEVER 

Do not show bounding box.

UNTIL_LOADED 

Show bounding box (if specified) until data is loaded.

ALWAYS 

Show bounding box along with data.

Definition at line 131 of file SoWWWInline.h.

Constructor & Destructor Documentation

◆ SoWWWInline()

SoWWWInline::SoWWWInline ( )

Creates an inline node with default settings.

Member Function Documentation

◆ cancelURLDataRequest()

void SoWWWInline::cancelURLDataRequest ( )
inline

Cancels the active URL data fetch request.

Definition at line 210 of file SoWWWInline.h.

◆ copyChildren()

SoGroup * SoWWWInline::copyChildren ( ) const

Return a copy of the hidden children as a Group.

The children are set by the application through setChildData().

◆ getBoundingBoxColor()

static const SbColor & SoWWWInline::getBoundingBoxColor ( )
static

Queries the color of bounding boxes displayed.

◆ getBoundingBoxVisibility()

static BboxVisibility SoWWWInline::getBoundingBoxVisibility ( )
static

Queries when bounding boxes are displayed.

◆ getChildData()

SoNode * SoWWWInline::getChildData ( ) const

Gets the child data the inline should display.

◆ getClassTypeId()

static SoType SoWWWInline::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getFullURLName()

const SbString & SoWWWInline::getFullURLName ( )

Returns the fullURL set by setFullURLName, or if not set, returns the contents of the name field.

◆ getReadAsSoFile()

static SbBool SoWWWInline::getReadAsSoFile ( )
inlinestatic

Queries the ReadAsSoFile flag.

Definition at line 261 of file SoWWWInline.h.

◆ getTypeId()

virtual SoType SoWWWInline::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

◆ isURLDataHere()

SbBool SoWWWInline::isURLDataHere ( ) const
inline

Returns whether URL data is here (i.e. whether setChildData() has been called.)

Definition at line 206 of file SoWWWInline.h.

◆ isURLDataRequested()

SbBool SoWWWInline::isURLDataRequested ( ) const
inline

Returns whether URL data has been requested.

Definition at line 201 of file SoWWWInline.h.

◆ requestURLData()

void SoWWWInline::requestURLData ( )
inline

Requests that URL data be fetched.

This will invoke the application callback to actually fetch the data and can be called before the inline does this for itself (see setFetchURLCallBack()).

Definition at line 196 of file SoWWWInline.h.

◆ setBoundingBoxColor()

static void SoWWWInline::setBoundingBoxColor ( SbColor c)
static

Specifies the color of bounding boxes displayed.

◆ setBoundingBoxVisibility()

static void SoWWWInline::setBoundingBoxVisibility ( BboxVisibility  b)
static

Specifies when bounding boxes are displayed.

The bounding box can be rendered along with the children (ALWAYS), only until the child data is loaded (UNTIL_LOADED), or not at all (NEVER). Default is UNTIL_LOADED.

◆ setChildData()

void SoWWWInline::setChildData ( SoNode urlData)

Sets the child data the inline should display.

The application should set child data after it has fetched data for an inline node.

◆ setFetchURLCallBack()

static void SoWWWInline::setFetchURLCallBack ( SoWWWInlineFetchURLCB f,
void *  userData 
)
static

Application callbacks invoked when the inline needs its URL data fetched.

This happens the first time the inline is rendered, or if it needs to compute a bounding box and the bboxSize field is not set, or when requestURLData() is called.

◆ setFullURLName()

void SoWWWInline::setFullURLName ( const SbString url)
inline

If the name field contains a relative URL (e.g. "foo.wrl" instead of "http://bogus.com/foo.wrl"), the inline cannot resolve the URL reference.

This method allows the application to tell the anchor what its full URL should be. getFullURLName() returns the fullURL set here, or if not set, returns the contents of the name field.

Definition at line 178 of file SoWWWInline.h.

◆ setReadAsSoFile()

static void SoWWWInline::setReadAsSoFile ( SbBool  onOff)
inlinestatic

Sets the ReadAsSoFile flag.

If TRUE, assume that "url" points to other Open Inventor files on local filesystem, and load them directly as if this were an SoFile node instead of using SoWWWInlineFetchURLCB.

Definition at line 257 of file SoWWWInline.h.

Member Data Documentation

◆ alternateRep

SoSFNode SoWWWInline::alternateRep

Specifies child data that can be used instead of fetching data from the URL.

On read, if this field is set and there is no fetch URL callback registered, the alternateRep will be used as the child data. Otherwise, it is the applications responsibility to set the child data (see setChildData()).

Definition at line 169 of file SoWWWInline.h.

◆ bboxCenter

SoSFVec3f SoWWWInline::bboxCenter

Defines the center of the bounding box surrounding the URL child data.

Definition at line 150 of file SoWWWInline.h.

◆ bboxSize

SoSFVec3f SoWWWInline::bboxSize

Defines the size of the bounding box surrounding the URL child data.

Definition at line 155 of file SoWWWInline.h.

◆ name

SoSFFilePathString SoWWWInline::name

Specifies the URL which the application should fetch as child data to this node (e.g. "http://bogus.com/homeWorld.wrl.gz").

Definition at line 161 of file SoWWWInline.h.


The documentation for this class was generated from the following file: