Class EntityInstantiator
Inheritance
EntityInstantiator
Assembly: glTFast.dots.dll
Syntax
public class EntityInstantiator : IInstantiator
Constructors
EntityInstantiator(IGltfReadable, Entity, ICodeLogger, InstantiationSettings)
Declaration
public EntityInstantiator(IGltfReadable gltf, Entity parent, ICodeLogger logger = null, InstantiationSettings settings = null)
Parameters
Type |
Name |
Description |
IGltfReadable |
gltf |
|
Entity |
parent |
|
ICodeLogger |
logger |
|
InstantiationSettings |
settings |
|
Fields
m_Gltf
Declaration
protected IGltfReadable m_Gltf
Field Value
Type |
Description |
IGltfReadable |
|
m_Logger
Declaration
protected ICodeLogger m_Logger
Field Value
Type |
Description |
ICodeLogger |
|
m_Nodes
Declaration
protected Dictionary<uint, Entity> m_Nodes
Field Value
m_Parent
Declaration
protected Entity m_Parent
Field Value
m_Settings
Declaration
protected InstantiationSettings m_Settings
Field Value
Type |
Description |
InstantiationSettings |
|
Methods
AddAnimation(AnimationClip[])
Declaration
public void AddAnimation(AnimationClip[] animationClips)
Parameters
AddCamera(uint, uint)
Declaration
public void AddCamera(uint nodeIndex, uint cameraIndex)
Parameters
Type |
Name |
Description |
uint |
nodeIndex |
|
uint |
cameraIndex |
|
AddLightPunctual(uint, uint)
Declaration
public void AddLightPunctual(uint nodeIndex, uint lightIndex)
Parameters
Type |
Name |
Description |
uint |
nodeIndex |
|
uint |
lightIndex |
|
AddPrimitive(uint, string, MeshResult, uint[], uint?, float[], int)
Declaration
public virtual void AddPrimitive(uint nodeIndex, string meshName, MeshResult meshResult, uint[] joints = null, uint? rootJoint = null, float[] morphTargetWeights = null, int primitiveNumeration = 0)
Parameters
Type |
Name |
Description |
uint |
nodeIndex |
|
string |
meshName |
|
MeshResult |
meshResult |
|
uint[] |
joints |
|
uint? |
rootJoint |
|
float[] |
morphTargetWeights |
|
int |
primitiveNumeration |
|
AddPrimitiveInstanced(uint, string, MeshResult, uint, NativeArray<Vector3>?, NativeArray<Quaternion>?, NativeArray<Vector3>?, int)
Declaration
public void AddPrimitiveInstanced(uint nodeIndex, string meshName, MeshResult meshResult, uint instanceCount, NativeArray<Vector3>? positions, NativeArray<Quaternion>? rotations, NativeArray<Vector3>? scales, int primitiveNumeration = 0)
Parameters
BeginScene(string, uint[])
Declaration
public void BeginScene(string name, uint[] nodeIndices)
Parameters
Type |
Name |
Description |
string |
name |
|
uint[] |
nodeIndices |
|
CreateNode(uint, uint?, Vector3, Quaternion, Vector3)
Declaration
public void CreateNode(uint nodeIndex, uint? parentIndex, Vector3 position, Quaternion rotation, Vector3 scale)
Parameters
EndScene(uint[])
Declaration
public virtual void EndScene(uint[] rootNodeIndices)
Parameters
Type |
Name |
Description |
uint[] |
rootNodeIndices |
|
SetNodeName(uint, string)
Declaration
public void SetNodeName(uint nodeIndex, string name)
Parameters