SOWWWANCHOR(3iv)
π NAME π
SoWWWAnchor β a separator group node that's also a URL hyperlink π like, it holds your scene graph children AND it's a clickable link. multitasking queen.
πΈ INHERITS FROM πΈ
SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator >
SoLocateHighlight > SoWWWAnchor
so it's got the whole family tree behind it, bestie. every one of those ancestors' powers? inherited. periodt.
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoWWWAnchor.h>
typedef void SoWWWAnchorCB(const SbString &url, void *userData,
SoWWWAnchor *node)
enum Mapping {
SoWWWAnchor::NONE Do not add information to the URL
SoWWWAnchor::POINT Add object-space coordinates to URL
}
Fields from class SoWWWAnchor:
SoSFString name
SoSFString description
SoSFEnum map
Fields from class SoLocateHighlight:
SoSFColor color
SoSFEnum style
SoSFEnum mode
Fields from class SoSeparator:
SoSFEnum renderCaching
SoSFEnum boundingBoxCaching
SoSFEnum renderCulling
SoSFEnum pickCulling
Methods from class SoWWWAnchor:
SoWWWAnchor()
static SoType getClassTypeId()
void setFullURLName(const SbString &url)
const SbString & getFullURLName()
static void setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)
static void setHighlightURLCallBack(SoWWWAnchorCB *f, void
*userData)
Methods from class SoSeparator:
static void setNumRenderCaches(int howMany)
static int getNumRenderCaches()
Methods from class SoGroup:
void addChild(SoNode *child)
void insertChild(SoNode *child, int newChildIndex)
SoNode * getChild(int index) const
int findChild(const SoNode *child) const
int getNumChildren() const
void removeChild(int index)
void removeChild(SoNode *child)
void removeAllChildren()
void replaceChild(int index, SoNode *newChild)
void replaceChild(SoNode *oldChild, SoNode *newChild)
Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π¦ DESCRIPTION π¦
okay so picture this: a separator group node, right? normal separator behavior. BUT. it also has a URL (that's a Universal Resource Locator for the uninitiated) hyperlink attached to it. the way that it just has a link. iconic behavior honestly.
when you click on it, the node invokes an application callback to go fetch that URL. and here's the thing β your app can totally go get the data itself, or it can hand the whole thing off to a World Wide Web browser. we're talking an HTML based browser like Netscape Navigator, or a VRML based one like WebSpace Navigator, and they load the URL. your choice, bestie, the anchor doesn't care. π«Ά
π FIELDS π
SoSFStringnameβ the URL that your application gets called back to fetch when this node gets activated by a left mouse click. like, for example:"http://www.sgi.com/Technology/Inventor". that's the vibe. β¨SoSFStringdescriptionβ a description of the URL that might make way more sense to actual humans than the raw URL does (for example,"The Open Inventor Home Page"). it's giving "explain it to me like I'm not a browser." πSoSFEnummapβ controls what extra info gets tacked onto the end of the URL when it's passed back to your app for fetching. if you set it toPOINT, then thex,y,zlocation of the object space intersection point β you know, exactly where the mouse was clicked β gets suffixed onto the URL. and here's the tea: the comma character doesn't transmit through some web browsers, so it gets written in hex form instead. so if the intersection point is17,4.5,1, the URL your application callback receives would be"http://www.sgi.com/Technology/Inventor?17%2c4.5%2c1". no cap, that's the whole encoding situation. π§
π METHODS π
SoWWWAnchor()β creates an anchor node with all the default settings. fresh out the box, defaults and everything.static SoType getClassTypeId()β returns the type identifier for this class. it's how you know it's this class, iykyk.void setFullURLName(const SbString &url)andconst SbString &getFullURLName()β so if yournamefield holds a relative URL (like"foo.wrl"instead of"http://bogus.com/foo.wrl"), the anchor literally cannot resolve the URL reference. it's not being lazy, it just can't. this method lets your application tell the anchor what its full URL should actually be. andgetFullURLName()returns the fullURL you set right here β or, if you never set one, it just returns whatever's in thenamefield. cute, right? πstatic void setFetchURLCallBack(SoWWWAnchorCB *f, void *userData)β these are the application callbacks that fire when the mouse gets clicked on an anchor, so your app can fetch the URL itself or call Netscape or WebSpace to go fetch it for you. delegation, queen behavior. πstatic void setHighlightURLCallBack(SoWWWAnchorCB *f, void *userData)β and these callbacks fire when the mouse is moved over an anchor, so your app can give the user some feedback β changing the cursor, or displaying the anchor's description and name. little hover moment, main character energy. β¨
π₯ ACTION BEHAVIOR π₯
SoHandleEventAction
when the left mouse gets clicked over a child of this anchor node, your application gets called back to fetch the URL. that's it, that's the behavior β see setFetchURLCallBack(). π
π FILE FORMAT/DEFAULTS π
WWWAnchor {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
mode AUTO
style EMISSIVE
color 0.3 0.3 0.3
name "<Undefined URL>"
description ""
map NONE
}
not me showing you the literal defaults like this. "<Undefined URL>" as a default name is honestly so real. π
π SEE ALSO π
SoWWWInline
ngl this one's genuinely such a fun little node. go forth and hyperlink your scene graph, bestie. π¦
and that's the whole page, fr fr. this was SoWWWAnchor(3IV)() β section 3IV, no version stamp, no date stamp, just pure vibes and an empty pair of parens where the date would be. stan a minimal footer. π β¨ πΈ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms