API reference
API reference
Select your platform
No SDKs available
No versions available

IsdkSceneObjectPool Class

Modifiers: final
Internal class for managing the lifetime of SceneObjects used by the IsdkDefaultCursorSystem. Each SceneObject has a Mesh, returned by the meshFactory. The scene objects will not be frustum culled. It is not possible to return just a single SceneObject - calling reset() will mark all scene objects as returned.

Signature

class IsdkSceneObjectPool(scene: Scene, meshFactory: () -> SceneMesh, namePrefix: String)

Constructors

IsdkSceneObjectPool ( scene , meshFactory , namePrefix )
Signature
constructor(scene: Scene, meshFactory: () -> SceneMesh, namePrefix: String)
Parameters
scene: Scene
meshFactory: Function0
namePrefix: String

Methods

borrow ()
Borrows a SceneObject from the pool. If all SceneObjects are in use, a new one is created.
Signature
fun borrow(): SceneObject
Returns
  SceneObject - the borrowed SceneObject.
destroy ()
Destroys all SceneObjects in the pool.
Signature
fun destroy()
getBorrowedCount ()
Returns the count of currently borrowed SceneObjects.
Signature
fun getBorrowedCount(): Int
Returns
Int
  Int - the number of SceneObjects currently in use.
reset ()
Resets the pool by making all borrowed SceneObjects invisible and resetting the used count.
Signature
fun reset()