RenderableInstance

Controls how a Renderable is displayed. There can be multiple RenderableInstances displaying a single Renderable.

Constructors

Link copied to clipboard
constructor(engine: Engine, assetLoader: AssetLoader, resourceLoader: ResourceLoader, transformProvider: TransformProvider, renderable: Renderable)

Types

Link copied to clipboard
Interface for modifying the bone transforms for this specific RenderableInstance.

Properties

Link copied to clipboard
open val entity: Int
Link copied to clipboard
open val filamentAsset: FilamentAsset
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var renderableId: Int
Link copied to clipboard

Functions

Link copied to clipboard
open fun animate(repeat: Boolean): ObjectAnimator
Constructs and returns an ObjectAnimator for all ModelAnimation of this object.
open fun animate(animationIndexes: Array<Int>): ObjectAnimator
Constructs and returns an ObjectAnimator for targeted ModelAnimation with a a given index of this object.
open fun animate(animations: Array<ModelAnimation>): ObjectAnimator
Constructs and returns an ObjectAnimator for a targeted ModelAnimation of this object.
open fun animate(animationNames: Array<String>): ObjectAnimator
Constructs and returns an ObjectAnimator for targeted ModelAnimation with a given name of this object.
Link copied to clipboard
Occurs when a ModelAnimation has received any property changed.
Link copied to clipboard
open fun destroy()
Detach and destroy the instance
Link copied to clipboard
open fun getAnimation(animationIndex: Int): ModelAnimation
Get the associated ModelAnimation at the given index or throw an IndexOutOfBoundsException.
Get the associated ModelAnimation by name or null if none exist with the given name.
Link copied to clipboard
Returns the number of ModelAnimation definitions in the model.
Link copied to clipboard
open fun getAnimationIndex(name: String): Int
Get the Zero-based index for the animation name of interest or -1 if not found.
Link copied to clipboard
open fun getAnimationName(animationIndex: Int): String
Get the name of the ModelAnimation at the Zero-based index This name corresponds to the one defined and exported in the renderable asset.
Link copied to clipboard
Get the names of the ModelAnimation This names correspond to the ones defined and exported in the renderable asset.
Link copied to clipboard
Get the associated ModelAnimation by name or throw an Exception if none exist with the given name.
Link copied to clipboard
Link copied to clipboard
open fun getMaterialInstance(): MaterialInstance
Returns the material bound to the first submesh.
open fun getMaterialInstance(index: Int): MaterialInstance
Returns the material bound to the specified index.
open fun getMaterialInstance(name: String): MaterialInstance
Returns the material bound to the specified name.
Link copied to clipboard
open fun getMaterialName(index: Int): String
Returns the name associated with the specified index.
Link copied to clipboard
Returns the number of materials.
Link copied to clipboard
Returns the transform of this renderable relative to it's node.
Link copied to clipboard
Returns the inverse transform of this renderable relative to it's node.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Return true if getAnimationCount>0
Link copied to clipboard
Called form the ModelAnimation when it dirty state changed.
Link copied to clipboard
open fun prepareForDraw(engine: Engine)
Link copied to clipboard
open fun setAnimationsFramePosition(framePosition: Int)
Sets the current position of (seeks) all the animations to the specified frame number according to the getFrameRate This method will apply rotation, translation, and scale to the Renderable that have been targeted.
Link copied to clipboard
open fun setAnimationsTimePosition(timePosition: Float)
Sets the current position of (seeks) the animation to the specified time position in seconds.
Link copied to clipboard
open fun setBlendOrderAt(index: Int, blendOrder: Int)
Link copied to clipboard
open fun setCulling(isCulling: Boolean)
### Changes whether or not frustum culling is on The view frustum is the region of space in the modeled world that may appear on the screen.
Link copied to clipboard
open fun setMaterial(@IntRange(from = 0) primitiveIndex: Int, material: Material)
Sets the material bound to the specified index.
open fun setMaterial(entityIndex: Int, @IntRange(from = 0) primitiveIndex: Int, material: Material)
Sets the material bound to the specified index and entityIndex
Link copied to clipboard
open fun setMaterialInstance(materialInstance: MaterialInstance)
Sets the material bound to the first index.
open fun setMaterialInstance(@IntRange(from = 0) primitiveIndex: Int, materialInstance: MaterialInstance)
Sets the material bound to the specified index.
open fun setMaterialInstance(entityIndex: Int, @IntRange(from = 0) primitiveIndex: Int, materialInstance: MaterialInstance)
Sets the material bound to the specified index and entityIndex
Link copied to clipboard
open fun setModelMatrix(transformManager: TransformManager, @Size(min = 16) transform: Array<Float>)
Link copied to clipboard
Link copied to clipboard
open fun updateAnimations(force: Boolean): Boolean
Apply animations changes if fore==true or the animation has dirty values.