This interface provides a Level of Detail selector: a wrapper over a number of mesh objects that selects which mesh should be rendered depending on the screen space projection of the LOD object's bounding sphere.
You set up LODObjects for your units in the Unit Editor.
Constructors and accessors
Other related reference items
bounding_volume ( self ) : stingray.BoundingVolumeRetrieves the bounding volume of the LOD object.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The bounding volume of the LOD object. |
set_bounding_volume ( self, bv )Sets the bounding volume that the LOD object should use when calculating screen space coverage.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
bv : | The new bounding volume to set for the LOD object. |
This function does not return any values. |
set_orientation_node ( self, unit, node_idx )Changes the LOD object's orientation node to the scene graph node pointed to by the unit and node.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
unit : | The unit to which the LOD object belongs. | |
node_idx : | integer | The node index in the unit's scene graph to use for the orientation of the LOD object. |
This function does not return any values. |
set_static_select ( self, select )Forces a static LOD step to be used.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
select : | integer | The selection type for LOD. |
This function does not return any values. |
Set to -1 to re-enable dynamic LOD selection.
The functions in this group control the placement of an object of this type in the scene.
local_pose ( self ) : stingray.Matrix4x4Returns the position and orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The position and orientation of the object in local space. |
local_position ( self ) : stingray.Vector3Returns the position of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The position of the object in local space. |
local_rotation ( self ) : stingray.QuaternionReturns the orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The rotation of the object in local space. |
node ( self ) : integerReturns the ID of the specified object within the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
integer |
The ID of the specified object in the scene graph. |
set_local_pose ( self, parent, pose )Sets the position and orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
parent : | The parent Unit that owns this object. | |
pose : | The new position and orientation for the object in local space. |
This function does not return any values. |
set_local_position ( self, parent, position )Sets the position of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
parent : | The parent Unit that owns this object. | |
position : | The new position for the object in local space. |
This function does not return any values. |
set_local_rotation ( self, parent, rotation )Sets the orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. | |
parent : | The parent Unit that owns this object. | |
rotation : | The new rotation for the object in local space. |
This function does not return any values. |
world_pose ( self ) : stingray.Matrix4x4Returns the position and orientation of the specified scene graph object in world space.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The position and orientation of the object in world space. |
world_position ( self ) : stingray.Vector3Returns the position of the specified scene graph object in world space.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The position of the object in world space. |
world_rotation ( self ) : stingray.QuaternionReturns the rotation of the specified scene graph object in world space.
|
self : | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
The rotation of the object in world space. |