Class MeshAttributes<T>
Attribute class which contains the mesh data, as well as methods to modify the underlying data fields
Inheritance
System.Object
MeshAttributes<T>
Inherited Members
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 sealed class MeshAttributes<T>
where T : struct
Type Parameters
Name | Description |
---|---|
T |
Constructors
MeshAttributes(in ICollection<T>)
Generate data
Declaration
public MeshAttributes(in ICollection<T> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<T> | data |
Properties
AsReadOnlySpan
Quick readonly access to data Use MeshAttributes<T> indexer for read/write access
Declaration
public ReadOnlySpan<T> AsReadOnlySpan { get; }
Property Value
Type | Description |
---|---|
System.ReadOnlySpan<T> |
DirtyIndex
Are there any dirty indices which need to be updated on the GPU?
Declaration
public bool DirtyIndex { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Access read/write mesh attribute data
Declaration
public T this[int idx] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx |
Property Value
Type | Description |
---|---|
T |
Length
Get length of data
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Fill(in T, Int32, Int32)
Fills the array with given value beginning at index start
until length
is reached.
Declaration
public void Fill(in T data, int start = 0, int length = -1)
Parameters
Type | Name | Description |
---|---|---|
T | data | |
System.Int32 | start | default = 0 |
System.Int32 | length | default = -1, if -1 is given the entire length is being used |
SetAttributeData(in T[], Int32)
Sets attributes by given data
, replacing all elements beginning at given start
Declaration
public void SetAttributeData(in T[] data, int start = 0)
Parameters
Type | Name | Description |
---|---|---|
T[] | data | |
System.Int32 | start | default = 0 |
ToArray()
Returns the backing field value as array
Declaration
public T[] ToArray()
Returns
Type | Description |
---|---|
T[] |