osg.Object¶
- class osg.Object¶
- Represents:
c++ class
- Wraps:
osg::Object
- Bases:
Base class/standard interface for objects which require IO support, cloning and reference counting.
Methods:
- :clone(osg.CopyOp copyop)¶
Clone an object with specified copy operator
- Parameters:
copyop (
osg.CopyOp) – Copy operator- Return type:
- :libraryName()¶
Get the name of the object’s library (NodeKit). If an object’s class is
osg.Node- ‘osg’ will be returned etc.- Return type:
- :className()¶
Get the name of object’s class. If an object’s class is
osg.Node- ‘Node’ will be returned etc.- Return type:
- :asNode()¶
Convert ‘this’ into a Node if
osg.Objectis aosg.Node, otherwise return nil.- Return type:
- :asNodeVisitor()¶
Convert ‘this’ into a NodeVisitor if
osg.Objectis aosg.NodeVisitor, otherwise return nil.- Return type:
- :asStateSet()¶
Convert ‘this’ into a StateSet if
osg.Objectis aosg.StateSet, otherwise return nil.- Return type:
- :asStateAttribute()¶
Convert ‘this’ into a StateAttribute if
osg.Objectis aosg.StateAttribute, otherwise return nil.- Return type:
- :asUniform()¶
Convert ‘this’ into a Uniform if
osg.Objectis aosg.Uniform, otherwise return nil.- Return type:
- :asCamera()¶
Convert ‘this’ into a Camera if
osg.Objectis aosg.Camera, otherwise return nil.- Return type:
- :asDrawable()¶
Convert ‘this’ into a Drawable if
osg.Objectis aosg.Drawable, otherwise return nil.- Return type:
- :asCallback()¶
Convert ‘this’ into a Callback if
osg.Objectis aosg.Callback, otherwise return nil.- Return type:
- :asUserDataContainer()¶
Convert ‘this’ into a UserDataContainer if
osg.Objectis aosg.UserDataContainer, otherwise return nil.- Return type:
- :asImage()¶
Convert ‘this’ into a Image if
osg.Objectis aosg.Image, otherwise return nil.- Return type:
- :setName(std.string name)¶
Set the name of this object.
- Parameters:
name (
std.string) – Name of object
- :getName()¶
Get the name of this object
- Return type:
- :setDataVariance(osg.Object.DataVariance dv)¶
Set the data variance of this object.
- Parameters:
dv (
osg.Object.DataVariance) – Data variance
- :getDataVariance()¶
Get the data variance of this object.
- Return type:
- :computeDataVariance()¶
Compute the DataVariance based on an assessment of callback etc.
- :setUserDataContainer(osg.UserDataContainer udc)¶
Set UserDataContainer for ‘this’ object.
- Parameters:
udc (
osg.UserDataContainer) – UserDataContainer to be set.
- :getUserDataContainer()¶
Return UserDataContainer if set or nil.
- Return type:
- :getOrCreateUserDataContainer()¶
Convenience method that returns the
osg.UserDataContainer, and if one doesn’t already exist creates and assigns aosg.DefaultUserDataContainerto the Object and then return this new UserDataContainer.- Return type:
- :setUserData(osg.Referenced obj)¶
Set user data for ‘this’ object.
- Parameters:
obj (
osg.Referenced) – User data object must be subclassed fromosg.Referencedto allow automatic memory handling
- :getUserData()¶
Return user data object is set or nil.
- Return type: