SoVRMLLOD(3)
β¨ hey bestie! β¨ welcome to the SoVRMLLOD(3) manual page, part 1 of 3. This is the Library Functions Manual entry for SoVRMLLOD, and we're about to get into it. No cap, it's a lot, but we're doing it together. π
πΈ NAME πΈ
okay so SoVRMLLOD is the class that reps various levels of detail based on distance. distance-based LOD, periodt. π¦
β¨ SYNOPSIS β¨
#include <Inventor/VRMLnodes/SoVRMLLOD.h>
Inherits SoGroup. so it's got that group energy, you know? π
π Public Member Functions π
here's the full lineup of what you can call on this thing, bestie:
virtual SoType getTypeId (void) constβ get the type id, slay.SoVRMLLOD (void)β the no-arg constructor.SoVRMLLOD (int levels)β constructor with a number of levels.virtual SbBool affectsState (void) constβ does it affect state? find out.void addLevel (SoNode *level)β add a level node.void insertLevel (SoNode *level, int idx)β insert a level at indexidx.SoNode * getLevel (int idx) constβ grab the level atidx.int findLevel (const SoNode *level) constβ find a level, returns int.int getNumLevels (void) constβ how many levels? int.void removeLevel (int idx)β remove level atidx.void removeLevel (SoNode *level)β remove this specific level.void removeAllLevels (void)β yeet all the levels.void replaceLevel (int idx, SoNode *level)β swap out level atidxwithlevel.void replaceLevel (SoNode *old, SoNode *level)β replaceoldwithlevel.virtual void doAction (SoAction *action)β do the action.virtual void callback (SoCallbackAction *action)β callback action.virtual void GLRender (SoGLRenderAction *action)β GL render action.virtual void rayPick (SoRayPickAction *action)β ray pick action.virtual void getBoundingBox (SoGetBoundingBoxAction *action)β get bounding box action.virtual void search (SoSearchAction *action)β search action.virtual void write (SoWriteAction *action)β write action.virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)β get primitive count action.virtual void audioRender (SoAudioRenderAction *action)β audio render action.virtual void GLRenderBelowPath (SoGLRenderAction *action)β GL render below path.virtual void GLRenderInPath (SoGLRenderAction *action)β GL render in path.virtual void GLRenderOffPath (SoGLRenderAction *action)β GL render off path.void addChild (SoNode *child)β add a child node.void insertChild (SoNode *child, int idx)β insert child atidx.SoNode * getChild (int idx) constβ get child atidx.int findChild (const SoNode *child) constβ find child, returns int.int getNumChildren (void) constβ number of children.void removeChild (int idx)β remove child atidx.void removeChild (SoNode *child)β remove this child.void removeAllChildren (void)β remove all children.void replaceChild (int idx, SoNode *child)β replace child atidxwithchild.void replaceChild (SoNode *old, SoNode *child)β replaceoldwithchild.virtual SoChildList * getChildren (void) constβ get the child list.
π Public Member Functions inherited from SoGroup π
SoGroup (void)β SoGroup no-arg constructor.SoGroup (int nchildren)β SoGroup constructor withnchildren.virtual void getMatrix (SoGetMatrixAction *action)β get matrix action.virtual void handleEvent (SoHandleEventAction *action)β handle event action.virtual void pick (SoPickAction *action)β pick action.
π Public Member Functions inherited from SoNode π
void setOverride (const SbBool state)β set override.SbBool isOverride (void) constβ is it override?void setNodeType (const NodeType type)β set node type.NodeType getNodeType (void) constβ get node type.virtual SoNode * copy (SbBool copyconnections=FALSE) constβ copy, with optionalcopyconnections.virtual void grabEventsSetup (void)β grab events setup.virtual void grabEventsCleanup (void)β grab events cleanup.virtual void startNotify (void)β start notify.uint32_t getNodeId (void) constβ get node id.virtual void writeInstance (SoOutput *out)β write instance.virtual SoNode * addToCopyDict (void) constβ add to copy dict.virtual SoFieldContainer * copyThroughConnection (void) constβ copy through connection.
π Public Member Functions inherited from SoFieldContainer π
void setToDefaults (void)β set to defaults.SbBool hasDefaultValues (void) constβ has default values?SbBool fieldsAreEqual (const SoFieldContainer *container) constβ fields are equal?void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)β copy field values.SbBool set (const char *const fielddata)β set from fielddata.void get (SbString &fielddata)β get into fielddata.virtual int getFields (SoFieldList &l) constβ get fields.virtual int getAllFields (SoFieldList &l) constβ get all fields.virtual SoField * getField (const SbName &name) constβ get field by name.virtual SoField * getEventIn (const SbName &name) constβ get event in.virtual SoField * getEventOut (const SbName &name) constβ get event out.SbBool getFieldName (const SoField *const field, SbName &name) constβ get field name.SbBool enableNotify (const SbBool flag)β enable notify.SbBool isNotifyEnabled (void) constβ is notify enabled?SbBool set (const char *fielddata, SoInput *input)β set with input.void get (SbString &fielddata, SoOutput *out)β get with output.virtual SbBool validateNewFieldValue (SoField *field, void *newval)β validate new field value.virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)β add write reference.SbBool getIsBuiltIn (void) constβ get is built in.virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constβ get fields memory size.void setUserData (void *userdata) constβ set user data.void * getUserData (void) constβ get user data.
π Public Member Functions inherited from SoBase π
void ref (void) constβ ref it.void unref (void) constβ unref it.void unrefNoDelete (void) constβ unref no delete.int32_t getRefCount (void) constβ get ref count.void touch (void)β touch.SbBool isOfType (SoType type) constβ is of type?virtual SbName getName (void) constβ get name.virtual void setName (const SbName &newname)β set name.void addAuditor (void *const auditor, const SoNotRec::Type type)β add auditor.void removeAuditor (void *const auditor, const SoNotRec::Type type)β remove auditor.const SoAuditorList & getAuditors (void) constβ get auditors.SbBool shouldWrite (void)β should write?void assertAlive (void) constβ assert alive.
β¨ Static Public Member Functions β¨
static SoType getClassTypeId (void)β get class type id.static void initClass (void)β init class.
β¨ Static Public Member Functions inherited from SoGroup β¨
static SoType getClassTypeId (void)β get class type id.static void initClass (void)β init class.
β¨ Static Public Member Functions inherited from SoNode β¨
static uint32_t getCompatibilityTypes (const SoType &nodetype)β get compatibility types.static SoType getClassTypeId (void)β get class type id.static SoNode * getByName (const SbName &name)β get by name.static int getByName (const SbName &name, SoNodeList &l)β get by name into list.static void initClass (void)β init class.static void initClasses (void)β init classes.static uint32_t getNextNodeId (void)β get next node id.static int getActionMethodIndex (const SoType type)β get action method index.static void getBoundingBoxS (SoAction *action, SoNode *node)β get bounding box S.static void GLRenderS (SoAction *action, SoNode *node)β GL render S.static void callbackS (SoAction *action, SoNode *node)β callback S.static void getMatrixS (SoAction *action, SoNode *node)β get matrix S.static void handleEventS (SoAction *action, SoNode *node)β handle event S.static void pickS (SoAction *action, SoNode *node)β pick S.static void rayPickS (SoAction *action, SoNode *node)β ray pick S.static void searchS (SoAction *action, SoNode *node)β search S.static void writeS (SoAction *action, SoNode *node)β write S.static void audioRenderS (SoAction *action, SoNode *node)β audio render S.static void getPrimitiveCountS (SoAction *action, SoNode *node)β get primitive count S.
β¨ Static Public Member Functions inherited from SoFieldContainer β¨
static void initClass (void)β init class.static SoType getClassTypeId (void)β get class type id.static void cleanupClass (void)β cleanup class.static void initCopyDict (void)β init copy dict.static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β add copy.static SoFieldContainer * checkCopy (const SoFieldContainer *orig)β check copy.static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β find copy.static void copyDone (void)β copy done.
β¨ Static Public Member Functions inherited from SoBase β¨
static void initClass (void)β init class.static SoType getClassTypeId (void)β get class type id.static void addName (SoBase *const base, const char *const name)β add name.static void removeName (SoBase *const base, const char *const name)β remove name.static void incrementCurrentWriteCounter (void)β increment current write counter.static void decrementCurrentWriteCounter (void)β decrement current write counter.static SoBase * getNamedBase (const SbName &name, SoType type)β get named base.static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β get named bases.static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)β read.static void setInstancePrefix (const SbString &c)β set instance prefix.static void setTraceRefs (SbBool trace)β set trace refs.static SbBool getTraceRefs (void)β get trace refs.static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)β connect route.static SbBool readRoute (SoInput *input)β read route.
π Public Attributes π
SoMFFloat rangeβ the range field.SoSFVec3f centerβ the center field.SoMFNode levelβ the level field.
π Protected Member Functions π
virtual const SoFieldData * getFieldData (void) constβ get field data.virtual ~SoVRMLLOD ()β destructor.virtual void notify (SoNotList *list)β notify.virtual SbBool readInstance (SoInput *in, unsigned short flags)β read instance.virtual void copyContents (const SoFieldContainer *from, SbBool copyConn)β copy contents.virtual int whichToTraverse (SoAction *action)β which to traverse.
π Protected Member Functions inherited from SoGroup π
virtual ~SoGroup ()β destructor.virtual SbBool readChildren (SoInput *in)β read children.
π Protected Member Functions inherited from SoNode π
SoNode (void)β constructor.virtual ~SoNode ()β destructor.
π Protected Member Functions inherited from SoFieldContainer π
SoFieldContainer (void)β constructor.virtual ~SoFieldContainer ()β destructor.
π Protected Member Functions inherited from SoBase π
SoBase (void)β constructor.virtual ~SoBase ()β destructor.virtual void destroy (void)β destroy.SbBool hasMultipleWriteRefs (void) constβ has multiple write refs?SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ write header.void writeFooter (SoOutput *out) constβ write footer.virtual const char * getFileFormatName (void) constβ get file format name.
π Static Protected Member Functions π
static const SoFieldData ** getFieldDataPtr (void)β get field data ptr.
π Static Protected Member Functions inherited from SoGroup π
static const SoFieldData ** getFieldDataPtr (void)β get field data ptr.
π Static Protected Member Functions inherited from SoNode π
static const SoFieldData ** getFieldDataPtr (void)β get field data ptr.static void setNextActionMethodIndex (int index)β set next action method index.static int getNextActionMethodIndex (void)β get next action method index.static void incNextActionMethodIndex (void)β inc next action method index.static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β set compatibility types.
π Static Protected Member Functions inherited from SoBase π
static uint32_t getCurrentWriteCounter (void)β get current write counter.static void staticDataLock (void)β static data lock.static void staticDataUnlock (void)β static data unlock.
π¦ Additional Inherited Members π¦
Public Types inherited from SoNode
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, COIN_3_0 = 0x8000, INVENTOR_6_0 = 0x10000 }
Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Protected Attributes inherited from SoGroup
SoChildList * childrenβ the children.
Protected Attributes inherited from SoNode
uint32_t uniqueIdβ the unique id.
Protected Attributes inherited from SoFieldContainer
SbBool isBuiltInβ is built in.
Static Protected Attributes inherited from SoNode
static uint32_t nextUniqueId = 1β next unique id.static int nextActionMethodIndex = 0β next action method index.
and that's a wrap on part 1, bestie! part 2 is coming with even more tea, so don't go anywhere. ππ¦β¨
π Detailed Description π
The SoVRMLLOD class is here to represent all the different levels of detail based on distance, bestie. Literally its whole personality.
The 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:
LOD {
exposedField MFNode level []
field SFVec3f center 0 0 0 # (-,)
field MFFloat range [] # (0,)
}
Okay so the LOD node specifies various levels of detail or complexity for a given object, and hands out hints that let browsers automatically pick the appropriate version of the object based on how far away the user is. The level field is a whole list of nodes that represent the same object (or objects) at varying levels of detail, ordered from highest level of detail down to the lowest. The range field says the ideal distances at which to switch between those levels. Subclause 4.6.5, Grouping and children nodes (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.5), has all the deets on the types of nodes that are legal values for level.
The center field is a translation offset in the local coordinate system that specifies the centre of the LOD node for distance calculations. π―
The number of nodes in the level field shall exceed the number of values in the range field by one (i.e., N+1 level values for N range values). The range field contains monotonic increasing values that shall be greater than zero. To work out which level to display, first the distance is calculated from the viewer's location, transformed into the local coordinate system of the LOD node (including any scaling transformations), to the center point of the LOD node. Then the LOD node evaluates the step function L(d) to choose a level for a given value of d (where d is the distance from the viewer position to the centre of the LOD node). Let n ranges, R0, R1, R2, ..., Rn-1, partition the domain (0, +infinity) into n+1 subintervals given by (0, R0), [R0, R1)... , [Rn-1, +infinity). Also, let n levels L0, L1, L2, ..., Ln-1 be the values of the step function function L(d). The level node, L(d), for a given distance d is defined as follows:
L(d) = L0, if d < R0,
= Li+1, if Ri <= d < Ri+1, for -1 < i < n-1,
= Ln-1, if d >= Rn-1.
Specifying too few levels will result in the last level being used repeatedly for the lowest levels of detail. If more levels than ranges are specified, the extra levels are ignored. An empty range field is an exception to this rule. This case is a hint to the browser that it may choose a level automatically to maintain a constant display rate. Each value in the range field shall be greater than the previous value. π«Ά
LOD nodes are evaluated top-down in the scene graph. Only the descendants of the currently selected level are rendered. All nodes under an LOD node continue to receive and send events regardless of which LOD node's level is active. For example, if an active TimeSensor node is contained within an inactive level of an LOD node, the TimeSensor node sends events regardless of the LOD node's state. (iconic behaviour ngl)
πΈ Constructor & Destructor Documentation πΈ
SoVRMLLOD::SoVRMLLOD (void )
Constructor. β¨
SoVRMLLOD::SoVRMLLOD (int levels)
Constructor. levels is the expected number of levels.
SoVRMLLOD::~SoVRMLLOD () [protected], [virtual]
Destructor. π
π¦ Member Function Documentation π¦
SoType SoVRMLLOD::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.
Usage example:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}
For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all 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 Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.
For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.
Reimplemented from SoGroup.
const SoFieldData * SoVRMLLOD::getFieldData (void ) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.
Reimplemented from SoGroup.
SbBool SoVRMLLOD::affectsState (void ) const [virtual]
Returns TRUE if the node could have any effect on the state during traversal.
If it returns FALSE, no data in the traversal-state will change from the pre-traversal state to the post-traversal state. The SoSeparator node will for instance return FALSE, as it pushes and pops the state before and after traversal of its children. All SoShape nodes will also return FALSE, as just pushing out geometry data to the rendering engine won't affect the actual rendering state.
The default method returns TRUE, on a "better safe than sorry" philosophy. (honestly? valid π
)
Reimplemented from SoNode.
void SoVRMLLOD::addLevel (SoNode * levelptr)
Adds a new level.
void SoVRMLLOD::insertLevel (SoNode * levelptr, int idx)
Inserts a new level.
SoNode * SoVRMLLOD::getLevel (int idx) const
Returns a level.
int SoVRMLLOD::findLevel (const SoNode * node) const
Find node, and return the level index or -1 if not found.
int SoVRMLLOD::getNumLevels (void ) const
Return the number of levels.
void SoVRMLLOD::removeLevel (int idx)
Removes the level at index idx.
void SoVRMLLOD::removeLevel (SoNode * levelptr)
Find levelptr, and remove it if found.
void SoVRMLLOD::removeAllLevels (void )
Remove all levels.
void SoVRMLLOD::replaceLevel (int idx, SoNode * node)
Replace the level at idx with node.
void SoVRMLLOD::replaceLevel (SoNode * oldnode, SoNode * newnode)
Find oldnode, and replace it with newnode.
void SoVRMLLOD::doAction (SoAction * action) [virtual]
This function performs the typical operation of a node for any action.
Reimplemented from SoGroup.
void SoVRMLLOD::callback (SoCallbackAction * action) [virtual]
Action method for SoCallbackAction.
Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph.
Reimplemented from SoGroup.
void SoVRMLLOD::GLRender (SoGLRenderAction * action) [virtual]
Action method for the SoGLRenderAction.
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.
Reimplemented from SoGroup.
void SoVRMLLOD::rayPick (SoRayPickAction * action) [virtual]
Action method for SoRayPickAction.
Checks the ray specification of the action and tests for intersection with the data of the node.
Nodes influencing relevant state variables for how picking is done also overrides this method.
Reimplemented from SoNode.
void SoVRMLLOD::getBoundingBox (SoGetBoundingBoxAction * action) [virtual]
Action method for the SoGetBoundingBoxAction.
Calculates bounding box and center coordinates for node and modifies the values of the action to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node.
Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables.
Reimplemented from SoGroup.
void SoVRMLLOD::search (SoSearchAction * action) [virtual]
Action method for SoSearchAction.
Compares the search criteria from the action to see if this node is a match. Searching is done by matching up all criteria set up in the SoSearchAction -- if any of the requested criteria is a miss, the search is not deemed successful for the node.
See also:
SoSearchAction
Reimplemented from SoGroup.
void SoVRMLLOD::write (SoWriteAction * action) [virtual]
Action method for SoWriteAction.
Writes out a node object, and any connected nodes, engines etc, if necessary.
Reimplemented from SoGroup.
void SoVRMLLOD::getPrimitiveCount (SoGetPrimitiveCountAction * action) [virtual]
Action method for the SoGetPrimitiveCountAction.
Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.
Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.
Reimplemented from SoGroup.
void SoVRMLLOD::audioRender (SoAudioRenderAction * action) [virtual]
Action method for SoAudioRenderAction.
Does common processing for SoAudioRenderAction action instances.
Reimplemented from SoGroup.
void SoVRMLLOD::GLRenderBelowPath (SoGLRenderAction * action) [virtual]
Implements the SoAction::BELOW_PATH traversal method for the rendering action.
Reimplemented from SoNode.
void SoVRMLLOD::GLRenderInPath (SoGLRenderAction * action) [virtual]
Implements the SoAction::IN_PATH traversal method for the rendering action.
Reimplemented from SoNode.
void SoVRMLLOD::GLRenderOffPath (SoGLRenderAction * action) [virtual]
Implements the SoAction::OFF_PATH traversal method for the rendering action.
Reimplemented from SoNode.
void SoVRMLLOD::addChild (SoNode * node) [virtual]
Append a child node to the list of children nodes this group node is managing.
Please note that this method is not virtual in the original SGI Inventor API.
Reimplemented from SoGroup.
void SoVRMLLOD::insertChild (SoNode * child, int newchildindex) [virtual]
Insert a child node at position newchildindex.
newchildindex must be <= this->getNumChildren()
Please note that this method is not virtual in the original SGI Inventor API.
Reimplemented from SoGroup.
SoNode * SoVRMLLOD::getChild (int index) const [virtual]
Returns pointer to child node at index.
Please note that this method is not virtual in the original SGI Inventor API.
Reimplemented from SoGroup.
int SoVRMLLOD::findChild (const SoNode * node) const [virtual]
Returns index in our list of children for child node, or -1 if node is not a child of this group node.
Please note that this method is not virtual in the original SGI Inventor API.
Reimplemented from SoGroup.
int SoVRMLLOD::getNumChildren (void ) const [virtual]
Returns number of child nodes managed by this group.
β οΈ Also, quick reminder from the previous method: this one is not virtual in the original SGI Inventor API, bestie. Reimplemented from SoGroup.
void SoVRMLLOD::removeChild (int childindex) [virtual]
Okay so this one? It literally removes the node at childindex from our list of children. Slay, bestie. π
β οΈ Not virtual in the original SGI Inventor API, no cap. Reimplemented from SoGroup.
void SoVRMLLOD::removeChild (SoNode * child) [virtual]
Not me watching child get removed from the set of children managed by this group node. It will decrease the reference count of child by 1. Bye bestie, we hardly knew ye. π
This is a convenience method. It will simply call findChild() with child as argument, and then call removeChild(int) if the child is found. So helpful, fr fr. β¨
β οΈ Not virtual in the original SGI Inventor API. Reimplemented from SoGroup.
void SoVRMLLOD::removeAllChildren (void ) [virtual]
Do not manage the children anymore. Will dereference all children by 1 as they are removed. Dramatic much? π
β οΈ Not virtual in the original SGI Inventor API. Reimplemented from SoGroup.
void SoVRMLLOD::replaceChild (int index, SoNode * newchild) [virtual]
Replace child at index with newChild. Swap! π
Dereferences the child previously at index, and increases the reference count of newChild by 1.
index must be < this->getNumChildren() so don't try anything funny, iykyk. π
β οΈ Not virtual in the original SGI Inventor API. Reimplemented from SoGroup.
void SoVRMLLOD::replaceChild (SoNode * oldchild, SoNode * newchild) [virtual]
Replace oldchild with newchild. Out with the old, in with the new. π¦
Dereferences oldchild by 1, and increases the reference count of newchild by 1.
This is a convenience method. It will simply call findChild() with oldchild as argument, and call replaceChild(int, SoNode*) if the child is found. Convenient? Iconic. β¨
β οΈ Not virtual in the original SGI Inventor API. Reimplemented from SoGroup.
SoChildList * SoVRMLLOD::getChildren (void ) const [virtual]
Returns list of children. Just the receipts, bestie. π
Reimplemented from SoGroup.
void SoVRMLLOD::notify (SoNotList * l) [protected], [virtual]
Notifies all auditors for this instance when changes are made. Gossip girl vibes. π£
Reimplemented from SoNode.
SbBool SoVRMLLOD::readInstance (SoInput * in, unsigned short flags) [protected], [virtual]
This method is mainly intended for internal use during file import operations. Not for the faint of heart. π§
It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type. Fancy. β¨
TRUE or FALSE 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 FALSE. Don't break, pls. π
flags is used internally during binary import when reading user extension nodes, group nodes or engines. Internal business, iykyk. π
Reimplemented from SoGroup.
void SoVRMLLOD::copyContents (const SoFieldContainer * from, SbBool copyconnections) [protected], [virtual]
Makes a deep copy of all data of from into this instance, except external scenegraph references if copyconnections is FALSE. Deep copy? Periodt. π
This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically. Subclass responsibly. π«Ά
For copying nodes from application code, you should not invoke this function directly, but rather call the SoNode::copy() function:
SoNode * mynewnode = templatenode->copy();
The same also goes for engines. Consistency is key. π
Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to its parent superclass in the inheritance hierarchy, as copyContents() in for instance SoNode and SoFieldContainer does important work. It should go something like this:
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..]
}
Reimplemented from SoGroup.
int SoVRMLLOD::whichToTraverse (SoAction * action) [protected], [virtual]
Returns the child to traverse based on distance to current viewpoint. Distance math? We love to see it. π
πΎ Member Data Documentation πΎ
SoMFFloat SoVRMLLOD::rangeβ The range for each level. Set the vibe for each level. πSoSFVec3f SoVRMLLOD::centerβ The center used when calculating distance. Center of attention, obviously. π―SoMFNode SoVRMLLOD::levelβ The different levels. Level up, bestie. π
π Author π
Generated automatically by Doxygen for Coin from the source code. Doxygen did that. β¨
And that's a wrap, bestie! This page was auto-generated by Doxygen for Coin from the source code, and it's Coin Version 3.1.3, SoVRMLLOD(3). Stay iconic. π
π¦
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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