Empeld
Empeld plugin documentation.
pluginbase.Objects.Models.IModelInstance Interface Reference

An interface that represents a model Instance An instance is a readonly model with extra data specific to an instance This model has not been instantiated in the world More...

Public Member Functions

void QueueAnimation (ModelAnimation mode, ModelAnimationFlag flag=ModelAnimationFlag.Default)
 Queue an animation, to be played More...
 
void QueueAnimation (string slug, ModelAnimationFlag flag=ModelAnimationFlag.Default)
 Queue animation, by name, to be played More...
 
bool IsGroupVisible (string groupName)
 Determines whether or not a group, by name, is visible More...
 
void SetGroupVisibility (string groupName, bool visible)
 Sets a group names visibility More...
 
void SetAllVisibility (bool visible)
 Sets all visibility of all groups in the model More...
 
Matrix4 GetFinalTransform ()
 Gets the final computed transform, after both the instance matrix, and the model's matrix, have been applied More...
 
IModelInstance GetGroupComponent (string name)
 Get a sub-component of the model instance (eg an assembled model) Not supported by all model types More...
 
bool TryGetLabelPosition (string name, out Vector3 vec)
 Gets position by label name (transformed) More...
 

Properties

IReadonlyModel Model [get]
 The reference to the model the instances is of More...
 
ModelAnimation CurrentAnimation [get]
 The current animation the instance is playing, if any More...
 
float CurrentFrame [get]
 The current frame the instance is playing, if any More...
 
bool [] VisibleGroupMap [get]
 Gets the visible group map. More...
 
Matrix4 Transform [get, set]
 An instance-level model transformation matrix More...
 
AxisAlignedBox CurrentBoundingBox [get]
 Get the current bounding box, after transforms have been applied. Uses the current animated frame More...
 
IEnumerable< IModelInstanceGroupComponents [get]
 Get all sub-components of a model More...
 

Events

Action< IModelInstanceOnAnimationComplete
 Occurs when animation completes. More...
 

Detailed Description

An interface that represents a model Instance An instance is a readonly model with extra data specific to an instance This model has not been instantiated in the world

Member Function Documentation

◆ GetFinalTransform()

Matrix4 pluginbase.Objects.Models.IModelInstance.GetFinalTransform ( )

Gets the final computed transform, after both the instance matrix, and the model's matrix, have been applied

Returns
The final transform.

◆ GetGroupComponent()

IModelInstance pluginbase.Objects.Models.IModelInstance.GetGroupComponent ( string  name)

Get a sub-component of the model instance (eg an assembled model) Not supported by all model types

Returns
The component.
Parameters
nameName.

◆ IsGroupVisible()

bool pluginbase.Objects.Models.IModelInstance.IsGroupVisible ( string  groupName)

Determines whether or not a group, by name, is visible

Returns
true if this instance is group visible the specified groupName; otherwise, false.
Parameters
groupNameGroup name.

◆ QueueAnimation() [1/2]

void pluginbase.Objects.Models.IModelInstance.QueueAnimation ( ModelAnimation  mode,
ModelAnimationFlag  flag = ModelAnimationFlag.Default 
)

Queue an animation, to be played

Parameters
modeMode.
flagFlags to specify how the animation progresses

◆ QueueAnimation() [2/2]

void pluginbase.Objects.Models.IModelInstance.QueueAnimation ( string  slug,
ModelAnimationFlag  flag = ModelAnimationFlag.Default 
)

Queue animation, by name, to be played

Parameters
slugSlug.
flagFlags to specify how the animation progresses

◆ SetAllVisibility()

void pluginbase.Objects.Models.IModelInstance.SetAllVisibility ( bool  visible)

Sets all visibility of all groups in the model

Parameters
visibleIf set to true visible.

◆ SetGroupVisibility()

void pluginbase.Objects.Models.IModelInstance.SetGroupVisibility ( string  groupName,
bool  visible 
)

Sets a group names visibility

Parameters
groupNameGroup name.
visibleIf set to true visible.

◆ TryGetLabelPosition()

bool pluginbase.Objects.Models.IModelInstance.TryGetLabelPosition ( string  name,
out Vector3  vec 
)

Gets position by label name (transformed)

Returns
The label position.
Parameters
nameName.

Property Documentation

◆ CurrentAnimation

ModelAnimation pluginbase.Objects.Models.IModelInstance.CurrentAnimation
get

The current animation the instance is playing, if any

The current animation.

◆ CurrentBoundingBox

AxisAlignedBox pluginbase.Objects.Models.IModelInstance.CurrentBoundingBox
get

Get the current bounding box, after transforms have been applied. Uses the current animated frame

The current bounding box.

◆ CurrentFrame

float pluginbase.Objects.Models.IModelInstance.CurrentFrame
get

The current frame the instance is playing, if any

The current frame.

◆ GroupComponents

IEnumerable<IModelInstance> pluginbase.Objects.Models.IModelInstance.GroupComponents
get

Get all sub-components of a model

The components.

◆ Model

IReadonlyModel pluginbase.Objects.Models.IModelInstance.Model
get

The reference to the model the instances is of

The model.

◆ Transform

Matrix4 pluginbase.Objects.Models.IModelInstance.Transform
getset

An instance-level model transformation matrix

The transform.

◆ VisibleGroupMap

bool [] pluginbase.Objects.Models.IModelInstance.VisibleGroupMap
get

Gets the visible group map.

The visible group map.

Event Documentation

◆ OnAnimationComplete

Action<IModelInstance> pluginbase.Objects.Models.IModelInstance.OnAnimationComplete

Occurs when animation completes.


The documentation for this interface was generated from the following file: