Package com.openinventor.inventor.misc
Class SoBase
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandispose()Explicitly call this method to force object to dispose its unmanaged resources.java.lang.StringgetName()Returns the name of an instance.booleanisDisposable()Returns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.booleanisSynchronizable()Gets the ScaleViz synchronizable state of this object.voidsetName(java.lang.String name)Sets the name of an instance.voidsetSynchronizable(boolean b)Sets this to be a ScaleViz synchronizable object.voidtouch()Marks an instance as modified, simulating a change to it.-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
isDisposable
public boolean isDisposable()
Description copied from interface:SafeDisposableReturns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.- Specified by:
isDisposablein interfaceSafeDisposable- Returns:
trueif the object can be disposed in a safe manner
-
dispose
public boolean dispose()
Description copied from class:InventorExplicitly 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:
disposein interfaceSafeDisposable- Overrides:
disposein classInventor- Returns:
trueif this object native resources were successfully disposed;falseif 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.getByNamemethods. Node names may also be used withSoSearchAction.
-
getName
public java.lang.String getName()
-
-