SoWWWAnchor(3)
SoWWWAnchor(3) โ Library Functions Manual, but make it cute โจ
okay so bestie, welcome to the SoWWWAnchor manual page. this is part 1 of 2, so don't go anywhere ๐
โจ NAME โจ
SoWWWAnchor โ the SoWWWAnchor class adds URL callbacks to the highlighted geometry. periodt. ๐
๐ธ SYNOPSIS ๐ธ
first things first, you gotta include the header, no cap:
#include <Inventor/nodes/SoWWWAnchor.h>
and she inherits from SoLocateHighlight. it's giving family tree. ๐
๐ Public Types ๐
enum Mappingโ the mapping vibe. values:NONE,POINT. that's it, bestie.
๐ Public Types inherited from SoLocateHighlight ๐
enum Modesโ values:AUTO,ON,OFF.enum Stylesโ values:EMISSIVE,EMISSIVE_DIFFUSE.
๐ฆ Public Types inherited from SoSeparator ๐ฆ
enum CacheEnabledโ values:OFF,ON,AUTO.
๐ Public Types inherited from SoNode ๐
enum NodeTypeโ okay so this one is a whole mood. here's the exact list, no cap:
enum NodeType {
INVENTOR = 0x0000,
VRML1 = 0x0001,
VRML2 = 0x0002,
INVENTOR_1 = 0x0004,
INVENTOR_2_0 = 0x0008,
INVENTOR_2_1 = 0x0010,
INVENTOR_2_5 = 0x0020,
INVENTOR_2_6 = 0x0040,
COIN_1_0 = 0x0080,
COIN_2_0 = 0x0100,
EXTENSION = 0x0200,
COIN_2_2 = 0x0400,
COIN_2_3 = 0x0800,
COIN_2_4 = 0x1000,
INVENTOR_5_0 = 0x2000,
COIN_2_5 = 0x4000
}
๐ Public Member Functions ๐
virtual SoType getTypeId (void) constโ iconic type id moment.SoWWWAnchor (void)โ the constructor, bestie. she's serving.void setFullURLName (const SbString &url)โ she's giving URL energy ๐const SbString & getFullURLName (void)โ more URL energy, periodt.virtual void handleEvent (SoHandleEventAction *action)โ event handler realness.
๐ Public Member Functions inherited from SoLocateHighlight ๐
SoLocateHighlight (void)virtual void GLRenderBelowPath (SoGLRenderAction *action)virtual void GLRenderInPath (SoGLRenderAction *action)
๐ฆ Public Member Functions inherited from SoSeparator ๐ฆ
SoSeparator (void)SoSeparator (const int nchildren)virtual void doAction (SoAction *action)virtual void GLRender (SoGLRenderAction *action)virtual void GLRenderOffPath (SoGLRenderAction *action)virtual void callback (SoCallbackAction *action)virtual void getBoundingBox (SoGetBoundingBoxAction *action)virtual void getMatrix (SoGetMatrixAction *action)virtual void rayPick (SoRayPickAction *action)virtual void search (SoSearchAction *action)virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)virtual void audioRender (SoAudioRenderAction *action)virtual void notify (SoNotList *nl)virtual SbBool affectsState (void) const
๐ธ Public Member Functions inherited from SoGroup ๐ธ
SoGroup (void)SoGroup (int nchildren)virtual void addChild (SoNode *node)virtual void insertChild (SoNode *child, int newchildindex)virtual SoNode * getChild (int index) constvirtual int findChild (const SoNode *node) constvirtual int getNumChildren (void) constvirtual void removeChild (int childindex)virtual void removeChild (SoNode *child)virtual void removeAllChildren (void)virtual void replaceChild (int index, SoNode *newchild)virtual void replaceChild (SoNode *oldchild, SoNode *newchild)virtual void pick (SoPickAction *action)virtual void write (SoWriteAction *action)virtual SoChildList * getChildren (void) const
โจ Public Member Functions inherited from SoNode โจ
void setOverride (const SbBool state)SbBool isOverride (void) constvoid setNodeType (const NodeType type)NodeType getNodeType (void) constvirtual SoNode * copy (SbBool copyconnections=0) constvirtual void grabEventsSetup (void)virtual void grabEventsCleanup (void)virtual void startNotify (void)uint32_t getNodeId (void) constvirtual void writeInstance (SoOutput *out)virtual SoNode * addToCopyDict (void) constvirtual SoFieldContainer * copyThroughConnection (void) const
๐ Public Member Functions inherited from SoFieldContainer ๐
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *in)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)SbBool getIsBuiltIn (void) constvoid setUserData (void *userdata) constvoid * getUserData (void) const
๐ Public Member Functions inherited from SoBase ๐
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)SbBool isOfType (SoType type) constvirtual SbName getName (void) constvirtual void setName (const SbName &newname)void addAuditor (void *const auditor, const SoNotRec::Type type)void removeAuditor (void *const auditor, const SoNotRec::Type type)const SoAuditorList & getAuditors (void) constSbBool shouldWrite (void)void assertAlive (void) const
โญ Static Public Member Functions โญ
static SoType getClassTypeId (void)static void initClass (void)static void setFetchURLCallBack (SoWWWAnchorCB *f, void *userData)static void setHighlightURLCallBack (SoWWWAnchorCB *f, void *userData)
๐ Static Public Member Functions inherited from SoLocateHighlight ๐
static SoType getClassTypeId (void)static void initClass (void)static void turnOffCurrentHighlight (SoGLRenderAction *action)
๐ฆ Static Public Member Functions inherited from SoSeparator ๐ฆ
static SoType getClassTypeId (void)static void initClass (void)static void setNumRenderCaches (const int howmany)static int getNumRenderCaches (void)
๐ธ Static Public Member Functions inherited from SoGroup ๐ธ
static SoType getClassTypeId (void)static void initClass (void)
โจ Static Public Member Functions inherited from SoNode โจ
static uint32_t getCompatibilityTypes (const SoType &nodetype)static SoType getClassTypeId (void)static SoNode * getByName (const SbName &name)static int getByName (const SbName &name, SoNodeList &l)static void initClass (void)static void initClasses (void)static uint32_t getNextNodeId (void)static int getActionMethodIndex (const SoType type)static void getBoundingBoxS (SoAction *action, SoNode *node)static void GLRenderS (SoAction *action, SoNode *node)static void callbackS (SoAction *action, SoNode *node)static void getMatrixS (SoAction *action, SoNode *node)static void handleEventS (SoAction *action, SoNode *node)static void pickS (SoAction *action, SoNode *node)static void rayPickS (SoAction *action, SoNode *node)static void searchS (SoAction *action, SoNode *node)static void writeS (SoAction *action, SoNode *node)static void audioRenderS (SoAction *action, SoNode *node)static void getPrimitiveCountS (SoAction *action, SoNode *node)
๐ Static Public Member Functions inherited from SoFieldContainer ๐
static void initClass (void)static SoType getClassTypeId (void)static void initCopyDict (void)static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)static SoFieldContainer * checkCopy (const SoFieldContainer *orig)static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)static void copyDone (void)
๐ Static Public Member Functions inherited from SoBase ๐
static void initClass (void)static SoType getClassTypeId (void)static void addName (SoBase *const base, const char *const name)static void removeName (SoBase *const base, const char *const name)static void incrementCurrentWriteCounter (void)static void decrementCurrentWriteCounter (void)static SoBase * getNamedBase (const SbName &name, SoType type)static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *in)
๐ Public Attributes ๐
SoSFString nameSoSFString descriptionSoSFEnum map
๐ Public Attributes inherited from SoLocateHighlight ๐
SoSFColor colorSoSFEnum styleSoSFEnum mode
๐ฆ Public Attributes inherited from SoSeparator ๐ฆ
SoSFEnum renderCachingSoSFEnum boundingBoxCachingSoSFEnum renderCullingSoSFEnum pickCulling
๐ Protected Member Functions ๐
virtual const SoFieldData * getFieldData (void) constvirtual ~SoWWWAnchor ()virtual void redrawHighlighted (SoAction *act, SbBool isNowHighlighting)
๐ Protected Member Functions inherited from SoLocateHighlight ๐
virtual ~SoLocateHighlight ()
๐ฆ Protected Member Functions inherited from SoSeparator ๐ฆ
virtual ~SoSeparator ()virtual SbBool cullTest (SoState *state)virtual SbBool cullTest (SoGLRenderAction *action, int &cullresults)virtual SbBool readInstance (SoInput *in, unsigned short flags)
๐ธ Protected Member Functions inherited from SoGroup ๐ธ
virtual ~SoGroup ()virtual SbBool readChildren (SoInput *in)virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
โจ Protected Member Functions inherited from SoNode โจ
SoNode (void)virtual ~SoNode ()
๐ Protected Member Functions inherited from SoFieldContainer ๐
SoFieldContainer (void)~SoFieldContainer ()
๐ Protected Member Functions inherited from SoBase ๐
SoBase (void)virtual ~SoBase ()virtual void destroy (void)SbBool hasMultipleWriteRefs (void) constSbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constvoid writeFooter (SoOutput *out) constvirtual const char * getFileFormatName (void) const
โก Static Protected Member Functions โก
static const SoFieldData ** getFieldDataPtr (void)
๐ Static Protected Member Functions inherited from SoLocateHighlight ๐
static const SoFieldData ** getFieldDataPtr (void)
๐ฆ Static Protected Member Functions inherited from SoSeparator ๐ฆ
static const SoFieldData ** getFieldDataPtr (void)
๐ธ Static Protected Member Functions inherited from SoGroup ๐ธ
static const SoFieldData ** getFieldDataPtr (void)
โจ Static Protected Member Functions inherited from SoNode โจ
static const SoFieldData ** getFieldDataPtr (void)static void setNextActionMethodIndex (int index)static int getNextActionMethodIndex (void)static void incNextActionMethodIndex (void)static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)
๐ Static Protected Member Functions inherited from SoBase ๐
static uint32_t getCurrentWriteCounter(void)โ the counter that tracks writes, and it is static, bestie ๐ซstatic void staticDataLock(void)โ locks the static data ๐static void staticDataUnlock(void)โ unlocks it again ๐
๐งฌ Additional Inherited Members ๐งฌ
Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Protected Attributes inherited from SoGroup
SoChildList * childrenโ the whole children list, iconic ๐
Protected Attributes inherited from SoNode
uint32_t uniqueIdโ every node's own lil unique id number ๐
Protected Attributes inherited from SoFieldContainer
SbBool isBuiltInโ is it built in or is it not, that is the question โจ
Static Protected Attributes inherited from SoNode
static uint32_t nextUniqueId = 0โ the next id up for grabs, starts at0static int nextActionMethodIndex = 0โ also starts at0, no cap
๐ Detailed Description ๐
The SoWWWAnchor class adds URL callbacks to the highlighted geometry. It's giving hyperlink but make it 3D ๐ฆ
So here's the vibe: besides highlighting the geometry that's under the cursor, you (the application programmer, yes you, main character) can set callbacks. You can set one callback for picking โ that's the fetch callback โ and one callback for highlighting. Two callbacks, two jobs, no overlap ๐
#Inventor V2.1 ascii
WWWAnchor {
name "http://www.coin3d.org/Coin/egg.iv"
description "Easter Egg"
Separator {
Transform { scaleFactor 0.8 1.2 0.8 }
Sphere { }
}
}
๐๏ธ FILE FORMAT/DEFAULTS: ๐๏ธ
WWWAnchor {
renderCaching AUTO
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
color 0.3 0.3 0.3
style EMISSIVE
mode AUTO
name "<Undefined URL>"
description ""
map NONE
}
โณ Since โณ
Inventor 2.1 โ she's been here a while and she's still slaying ๐ซถ
๐ฎ Member Enumeration Documentation ๐ฎ
enum SoWWWAnchor::Mapping
This enum says how a picked node's position should be mapped to the URL. Literally the whole point of it ๐ซ
Enumerator
NONEโ the position of the picked node is not mapped to the URL. Simple. Clean. No notes. ๐POINTโ the position of the picked node is mapped to the URL as object space coordinates, which adds a parameter string onto the end of the URL. And to assure that the URL works with all browsers, the coordinates get divided by commas sent as the hex representation. Yes bestie, commas, hex, the whole thing ๐
So picture this: a model named sim.wrl lives at www.coin3d.org, and the picked point had the coordinates [1.5, 10, 6.77]. The resulting URL would be:
"http://www.coin3d.org/sim.wrl?1.5%2c10%2c6.77"
See how the commas became %2c? That's the hex representation doing its little job, and it ate ๐ฅ
๐ ๏ธ Constructor & Destructor Documentation ๐ ๏ธ
SoWWWAnchor::SoWWWAnchor(void)
Constructor. โจ
References description, map, name, NONE, POINT, and SoWWWAnchor().
Referenced by getFieldData(), and SoWWWAnchor().
SoWWWAnchor::~SoWWWAnchor() โ [protected], [virtual]
Destructor. She's done, she's leaving, periodt ๐
๐ Member Function Documentation ๐
SoType SoWWWAnchor::getTypeId(void) const โ [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting. iykyk ๐ฆ
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type
}
}
Okay so for all you application programmers who wanna extend the library with new nodes, engines, nodekits, draggers or whatever else: this method needs to be overridden in all subclasses. No skipping, no exceptions, fr fr. 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, Inventor/nodes/SoSubNode.h (that's SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. Macros doing the heavy lifting, we love to see it ๐
For more info on writing Coin extensions, go check the class documentation of the toplevel superclasses for the various class groups. The lore is all there ๐
Reimplemented from SoLocateHighlight.
const SoFieldData * SoWWWAnchor::getFieldData(void) const โ [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. And if there are no fields present? It returns NULL. That's it, that's the whole thing ๐
Reimplemented from SoLocateHighlight.
References SoWWWAnchor().
void SoWWWAnchor::setFullURLName(const SbString & url)
Sets the full URL to url. And here's the key detail bestie โ if this is set, this URL will be used in callbacks instead of the URL set in SoWWWAnchor::name. Override energy โจ
See also SoWWWAnchor::getFullURLName()
const SbString & SoWWWAnchor::getFullURLName(void)
Returns the full URL if it's been set by SoWWWAnchor::setFullURLName(). Otherwise, the contents of SoWWWAnchor::name get returned instead. Backup plan, always ๐ธ
See also SoWWWAnchor::setFullURLName()
References name.
Referenced by handleEvent(), and redrawHighlighted().
void SoWWWAnchor::handleEvent(SoHandleEventAction * action) โ [virtual]
Action method for SoHandleEventAction. ๐ฌ
Inspects the event data from action, and processes it if it's something which this node should react to. Picky, but in a good way.
And heads up: nodes influencing relevant state variables for how event handling is done also override this method. So it's a whole chain of overrides, very collaborative, very teamwork ๐ซถ
Reimplemented from SoLocateHighlight.
References SoMouseButtonEvent::BUTTON1, SoHandleEventAction::getEvent(), getFullURLName(), SoPickedPoint::getObjectPoint(), SoHandleEventAction::getPickedPoint(), SoLocateHighlight::handleEvent(), SoMouseButtonEvent::isButtonPressEvent(), map, POINT, and SbString::sprintf().
void SoWWWAnchor::setFetchURLCallBack(SoWWWAnchorCB * f, void * userData) โ [static]
Sets the callback function f that gets called when a SoWWWAnchor node is clicked on. And this callback can, among other things, be used to provide a browser with the URL of this node. So the browser stays in the loop, no cap ๐
The callback will be called with the URL, userData and a pointer to this node as arguments. Three things, every time, no drama ๐ซ
void SoWWWAnchor::setHighlightURLCallBack(SoWWWAnchorCB * f, void * userData) โ [static]
Sets the callback function f that gets called when a SoWWWAnchor node is highlighted. And this callback can, among other things, be used to provide the user with a visual clue on which URL the node points to โ for example by showing the URL as a string. Little peek behind the curtain, obsessed ๐
The callback will be called with the URL, userData and a pointer to this node as arguments. Same trio as before, consistent queen ๐
void SoWWWAnchor::redrawHighlighted(SoAction * act, SbBool isNowHighlighting) โ [protected], [virtual]
Calls the highlight callback set up with SoWWWAnchor::setHighlightURLCallBack(). That's the whole job, and she does it flawlessly โจ
Reimplemented from SoLocateHighlight.
References getFullURLName(), and SoLocateHighlight::redrawHighlighted().
๐ท๏ธ Member Data Documentation ๐ท๏ธ
SoSFString SoWWWAnchor::name
The name of the URL which the anchor points to. The whole address, the whole destination ๐
Referenced by getFullURLName(), and SoWWWAnchor().
SoSFString SoWWWAnchor::description
The description of the URL. Like a lil caption for your link ๐
Referenced by SoWWWAnchor().
SoSFEnum SoWWWAnchor::map
Enum describing how a node's position should be mapped to the URL. Back to that NONE / POINT situation, we love a callback ๐
Referenced by handleEvent(), and SoWWWAnchor().
โ๏ธ Author โ๏ธ
Generated automatically by Doxygen for Coin from the source code. Not a human, not a poet, but honestly? She did that ๐คโจ
And that's the page bestie!! This was SoWWWAnchor(3) from Coin, Version 2.5.0 ๐
If you ever need to look her up again in the manual, you know exactly where she lives. Go forth and anchor responsibly, mwah ๐ซถ๐๐
๐ฆ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms