143 void push(
int childIndex) { append(childIndex); }
146 void pop() { truncate(getFullLength() - 1); }
160 {
return (nodes[getLength() - 1 - i]); }
170 {
return (indices[getLength() - 1 - i]); }
198 int numNodes = 0)
const;
261 static SoType classTypeId;
264 int getFullLength()
const {
return nodes.
getLength(); }
268 void append(
SoNode *node,
int index);
271 static void * createInstance();
277 void truncate(
int start,
bool doNotify);
308 void pop() { truncate(getFullLength() - 1); }
312 {
return (nodes[getFullLength() - 1]); }
316 {
return (nodes[getFullLength() - 1 - i]); }
322 {
return (indices[getFullLength() - 1 - i]); }
364 { indices.
append(childIndex);}
369 void push(
int childIndex) { append(childIndex); }
371 void pop() { truncate(getFullLength() - 1); }
373 { indices.
set(getFullLength()-1,(
void *)(
size_t)childIndex);}
375 {
return getNode(getFullLength()-1);}
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
INVENTOR_API bool operator==(const SbBox3f &b1, const SbBox3f &b2)
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
INVENTOR_API bool operator==(const SoPath &p1, const SoPath &p2)
List of generic (void *) pointers.
void append(int integer)
Adds given pointer to end of list.
Character string stored in a hash table.
void truncate(int start)
Removes all pointers after one with given index, inclusive.
int getLength() const
Returns number of pointers in list.
Abstract base class for all actions.
Base class for all nodes, paths, and engines.
virtual bool readInstance(SoInput *in, unsigned short flags)=0
Reads stuff into instance of subclass.
This SoEXTENDER class allows expert users to examine "hidden" children in paths.
void pop()
Override methods that normally stop at last public child:
SoNode * getNodeFromTail(int i) const
Returns a pointer to the i'th node. Passing 0 for i returns the tail node.
int getLength() const
Returns length of path chain (number of nodes).
int getIndexFromTail(int i) const
Returns the index of the i'th node (within its parent) in the chain, counting backward from the tail ...
SoNode * getTail() const
These return the first and last nodes in a path chain.
A SoLightweightPath is a light-weight version of an SoTempPath, intended to be used just to keep trac...
SoNode * getNode(int i) const
Returns pointer to ith node in chain.
void setTail(int childIndex)
void push(int childIndex)
Allows path to be treated as a stack: push a node at the end of the chain and pop the last node off.
void makeTempPath(SoTempPath *tmpPath) const
fills in nodes for a TempPath that is represented by this SoLightweightPath.
SoLightweightPath(int approxLength)
Constructor given approximate number of nodes in chain.
void truncate(int start)
Removes all nodes from indexed node on.
int getFullLength() const
Returns full length of path chain (number of nodes) note that public/private distinction is ignored.
void append(int childIndex)
Adds node specified by childindex to end of chain.
SoNode * getHead() const
Returns the first node in a path chain.
void setHead(SoNode *node)
Sets head node (first node in chain) Resulting path has only one node.
Maintains a list of pointers to nodes.
Abstract base class for all database nodes.
Holds a list of SoNotRec notification records.
Maintains a list of pointers to paths.
Path that points to a list of hierarchical nodes.
bool isRelevantNotification(SoNotList *list) const
Returns TRUE if the given notification list involves a change to a node that affects the path.
SoPath()
Constructs an empty path.
SoPath(int approxLength)
Constructs a path with a hint to length (number of nodes in chain).
bool containsNode(const SoNode *node) const
Returns TRUE if the node is found anywhere in the path chain.
SoPath * copy(int startFromNodeIndex=0, int numNodes=0) const
Creates and returns a new path that is a copy of some or all of this path.
void insertIndex(SoNode *parent, int newIndex)
This is called when a node in the path chain has a child added.
SoPath(SoNode *node)
Constructs a path and sets the head node to the given node.
static int getByName(const SbName &name, SoPathList &list)
These methods lookup and return paths with a given name.
void pop()
These allow a path to be treated as a stack; they push a node at the end of the chain and pop the las...
virtual void write(SoWriteAction *writeAction) const
Writes path using given write action.
void append(int childIndex)
Adds node to end of chain; the node is the childIndex'th child of the current tail node.
SoNode * getHead() const
These return the first and last nodes in a path chain.
int getLength() const
Returns length of path chain (number of nodes).
void setHead(SoNode *node)
Sets head node (first node in chain).
void replaceIndex(SoNode *parent, int index, SoNode *newChild)
This is called when a node in the path chain replaces a child.
void auditPath(bool flag)
Allows internal SoTempPath subclass to forego auditor overhead.
void append(SoNode *childNode)
Adds node to end of chain; uses the first occurrence of childNode as child of current tail node.
static SoType getClassTypeId()
Returns type identifier for SoPath class.
void truncate(int start)
Truncates the path chain, removing all nodes from index start on.
void removeIndex(SoNode *parent, int oldIndex)
This is called when a node in the path chain has a child removed.
SoNode * getNode(int i) const
Returns a pointer to the i'th node in the chain.
int getIndex(int i) const
Return the index of the i'th node (within its parent) in the chain.
static void initClass()
Initializes path class.
int findFork(const SoPath *path) const
If the two paths have different head nodes, this returns -1.
void push(int childIndex)
These allow a path to be treated as a stack; they push a node at the end of the chain and pop the las...
SoNode * getNodeFromTail(int i) const
Returns a pointer to the i'th node.
int getIndexFromTail(int i) const
Return the index of the i'th node (within its parent) in the chain, counting backward from the tail n...
virtual SoType getTypeId() const
Returns type identifier for path instance.
static SoPath * getByName(const SbName &name)
SoNode * getTail() const
These return the first and last nodes in a path chain.
void append(const SoPath *fromPath)
Adds all nodes in fromPath's chain to end of chain; the head node of fromPath must be the same as or ...
bool containsPath(const SoPath *path) const
Returns TRUE if the nodes in the chain in the passed path are contained (in consecutive order) in thi...
This class is internal to Inventor.
SoType has no virtual functions to keep it small...
Writes a scene graph to a file.