Show / Hide Table of Contents

Class InstanceData

Inheritance
System.Object
SceneComponent
InstanceData
Implements
IComponent
IManagedInstanceData
System.IDisposable
Inherited Members
SceneComponent.Name
SceneComponent.Active
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Core.Scene
Assembly: Fusee.Engine.Core.dll
Syntax
public class InstanceData : SceneComponent, IComponent, IManagedInstanceData, IDisposable

Constructors

InstanceData(Int32, float3[], float3[], float3[], float4[])

Creates a new instance of type InstanceData. Will fail if the length of a provided array doesn't match Amount.

Declaration
public InstanceData(int amount, float3[] positions, float3[] rotations = null, float3[] scales = null, float4[] colors = null)
Parameters
Type Name Description
System.Int32 amount

The amount of instances that will be rendered.

float3[] positions

The position of each instance.

float3[] rotations

The rotation of each instance.

float3[] scales

The scale of each instance.

float4[] colors

The color of each instance.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

Properties

Amount

The amount of instances that will be rendered.

Declaration
public int Amount { get; }
Property Value
Type Description
System.Int32

Colors

The color of each instance. This array needs to be as long as Amount.

Declaration
public float4[] Colors { get; set; }
Property Value
Type Description
float4[]

Positions

The position of each instance. This array needs to be as long as Amount.

Declaration
public float3[] Positions { get; set; }
Property Value
Type Description
float3[]

Rotations

The rotation of each instance. This array needs to be as long as Amount.

Declaration
public float3[] Rotations { get; set; }
Property Value
Type Description
float3[]

Scales

The scale of each instance. This array needs to be as long as Amount.

Declaration
public float3[] Scales { get; set; }
Property Value
Type Description
float3[]

SessionUniqueId

The unique id of this object.

Declaration
public Suid SessionUniqueId { get; }
Property Value
Type Description
Suid

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Dispose(Boolean)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

Finalize()

Finalizers (historically referred to as destructors) are used to perform any necessary final clean-up when a class instance is being collected by the garbage collector.

Declaration
protected void Finalize()

Events

DataChanged

MeshChanged event notifies observing MeshManager about property changes and the Mesh's disposal.

Declaration
public event EventHandler<InstanceDataChangedEventArgs> DataChanged
Event Type
Type Description
System.EventHandler<InstanceDataChangedEventArgs>

DisposeData

MeshChanged event notifies observing MeshManager about property changes and the Mesh's disposal.

Declaration
public event EventHandler<InstanceDataChangedEventArgs> DisposeData
Event Type
Type Description
System.EventHandler<InstanceDataChangedEventArgs>

Implements

IComponent
IManagedInstanceData
System.IDisposable
Generated by DocFX
GitHub Repo
Back to top