LODObject - stingray.LODObject object reference - Stingray Lua API Reference

stingray.LODObject object reference

Description

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.

Functions

Parameters

self :

stingray.LODObject

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.
Returns

stingray.BoundingVolume

The bounding volume of the LOD object.

Parameters

self :

stingray.LODObject

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 :

stingray.BoundingVolume

The new bounding volume to set for the LOD object.

Returns
This function does not return any values.
Parameters

self :

stingray.LODObject

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 :

stingray.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.

Returns
This function does not return any values.
Parameters

self :

stingray.LODObject

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.

Returns
This function does not return any values.

Set to -1 to re-enable dynamic LOD selection.

Scene placement

The functions in this group control the placement of an object of this type in the scene.

Parameters

self :

stingray.LODObject

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.
Returns

stingray.Matrix4x4

The position and orientation of the object in local space.

Parameters

self :

stingray.LODObject

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.
Returns

stingray.Vector3

The position of the object in local space.

Parameters

self :

stingray.LODObject

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.
Returns

stingray.Quaternion

The rotation of the object in local space.

Parameters

self :

stingray.LODObject

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.
Returns

integer

The ID of the specified object in the scene graph.

Parameters

self :

stingray.LODObject

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 :

stingray.Unit

The parent Unit that owns this object.

pose :

stingray.Matrix4x4

The new position and orientation for the object in local space.

Returns
This function does not return any values.
Parameters

self :

stingray.LODObject

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 :

stingray.Unit

The parent Unit that owns this object.

position :

stingray.Vector3

The new position for the object in local space.

Returns
This function does not return any values.
Parameters

self :

stingray.LODObject

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 :

stingray.Unit

The parent Unit that owns this object.

rotation :

stingray.Quaternion

The new rotation for the object in local space.

Returns
This function does not return any values.
Parameters

self :

stingray.LODObject

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.
Returns

stingray.Matrix4x4

The position and orientation of the object in world space.

Parameters

self :

stingray.LODObject

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.
Returns

stingray.Vector3

The position of the object in world space.

Parameters

self :

stingray.LODObject

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.
Returns

stingray.Quaternion

The rotation of the object in world space.