Class SoBase

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    SoFieldContainer, SoPath

    public class SoBase
    extends Inventor
    implements SafeDisposable
    Base class for all nodes, paths, and engines. Abstract base class for Open Inventor node, path, and engine classes. This class handles reference counting, notification, and naming.

    Instances should be referenced when they will be used outside of the routine in which they were initialized. (A typical example of this is maintaining a reference to the root of a graph.)

    See Also:
    SoFieldContainer, SoNode, SoPath, SoEngine, SoDB
    • Method Detail

      • dispose

        public boolean dispose()
        Description copied from class: Inventor
        Explicitly call this method to force object to dispose its unmanaged resources. The object may not be reused in the application code after this call.
        Specified by:
        dispose in interface SafeDisposable
        Overrides:
        dispose in class Inventor
        Returns:
        true if this object native resources were successfully disposed; false if it was already disposed or no native resources has been registered for this object.
      • touch

        public void touch()
        Marks an instance as modified, simulating a change to it. This will notify auditors (parent nodes, connected engines, and so on) of a change to this object and cause attached sensors to be triggered.
      • setSynchronizable

        public void setSynchronizable​(boolean b)
        Sets this to be a ScaleViz synchronizable object. By default all objects are synchronizable.
      • isSynchronizable

        public boolean isSynchronizable()
        Gets the ScaleViz synchronizable state of this object.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of an instance. Object names are preserved when objects are written to or read from files. Object names must not begin with a digit, and must not contain spaces or control characters, periods, single or double quote characters, backslashes, curly braces, square brackets or the plus character. This method will replace any bad characters in the name with underscore characters, and will print out an error message if the application is using the Open Inventor debugging library.

        The same name may be assigned to more than one instance.

        Avoid using names that begin with "OIV_". Such names may be used internally.

        Nodes may be queried by name using the SoNode.getByName methods. Node names may also be used with SoSearchAction.

      • getName

        public java.lang.String getName()
        Returns the name of an instance. If the instance has not been named, an empty string is returned. Objects that are named can be looked up using the getByName() methods of SoNode, SoEngine, or SoPath.