Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Additional Methods

You may need to implement additional methods for certain element classes. Detailed information on matches() and copyMatchInfo() is presented in Special Considerations for Caching. The push() and pop() methods are discussed in Pushing and Popping Elements.

matches() called to determine whether an element matches another element. This method is used to compare states for cache validity. copyMatchInfo() is used to create a copy of an element to be added to a cache.
push() used in a few cases to set up a new element instance that is a copy of the one just below it in the stack. Elements that contain two or more pieces of data and elements that implement side effects (often for OpenGL rendering) need to implement a push() method. The default push() method does nothing, since most elements contain only one piece of data and the value is typically set immediately after a push. Subclasses of SoAccumulatedElement must define their own push() method to copy values from the next instance in the stack, since the new instance accumulates values on top of the old ones. Use the**SoElement** method getNextInStack().
pop() the counterpart to push(). The default method does nothing. You need to implement a pop() method if your element has side effects. For the GL matrix elements, which call glPopMatrix() when they pop (see Pushing and Popping Elements).