Class Mesh
Provides the ability to create or interact directly with the point data.
Inheritance
Inherited Members
Namespace: Fusee.Engine.Core.Scene
Assembly: Fusee.Engine.Core.dll
Syntax
public class Mesh : SceneComponent, IComponent, IManagedMesh, IDisposable
Constructors
Mesh()
Protected ctor
Declaration
protected Mesh()
Mesh(ICollection<UInt32>, ICollection<float3>, ICollection<float3>, ICollection<float2>, ICollection<float4>, ICollection<float4>, ICollection<float4>, ICollection<float3>, ICollection<UInt32>, ICollection<UInt32>, ICollection<UInt32>, ICollection<UInt32>)
Generates a new Mesh instance
Declaration
public Mesh(ICollection<uint> triangles, ICollection<float3> vertices, ICollection<float3> normals = null, ICollection<float2> uvs = null, ICollection<float4> boneWeights = null, ICollection<float4> boneIndices = null, ICollection<float4> tangents = null, ICollection<float3> biTangents = null, ICollection<uint> colors = null, ICollection<uint> colors1 = null, ICollection<uint> colors2 = null, ICollection<uint> flags = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<System.UInt32> | triangles | |
System.Collections.Generic.ICollection<float3> | vertices | |
System.Collections.Generic.ICollection<float3> | normals | |
System.Collections.Generic.ICollection<float2> | uvs | |
System.Collections.Generic.ICollection<float4> | boneWeights | |
System.Collections.Generic.ICollection<float4> | boneIndices | |
System.Collections.Generic.ICollection<float4> | tangents | |
System.Collections.Generic.ICollection<float3> | biTangents | |
System.Collections.Generic.ICollection<System.UInt32> | colors | |
System.Collections.Generic.ICollection<System.UInt32> | colors1 | |
System.Collections.Generic.ICollection<System.UInt32> | colors2 | |
System.Collections.Generic.ICollection<System.UInt32> | flags |
Properties
BiTangents
The bi tangents
Declaration
public MeshAttributes<float3> BiTangents { get; }
Property Value
Type | Description |
---|---|
MeshAttributes<float3> |
BiTangentsSet
Gets a value indicating whether bi tangents are set.
Declaration
public bool BiTangentsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BoneIndices
The bone indices
Declaration
public MeshAttributes<float4> BoneIndices { get; }
Property Value
Type | Description |
---|---|
MeshAttributes<float4> |
BoneIndicesSet
Gets a value indicating whether bone indices are set.
Declaration
public bool BoneIndicesSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BoneWeights
The bine weights
Declaration
public MeshAttributes<float4> BoneWeights { get; }
Property Value
Type | Description |
---|---|
MeshAttributes<float4> |
BoneWeightsSet
Gets a value indicating whether bone weights are set.
Declaration
public bool BoneWeightsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
BoundingBox
The bounding box of this geometry chunk.
Declaration
public AABBf BoundingBox { get; }
Property Value
Type | Description |
---|---|
AABBf |
Colors0
The vertex color field 0
Declaration
public MeshAttributes<uint> Colors0 { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<System.UInt32> |
Colors0Set
Gets a value indicating whether a color is set.
Declaration
public bool Colors0Set { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Colors1
The vertex color field 1
Declaration
public MeshAttributes<uint> Colors1 { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<System.UInt32> |
Colors1Set
Gets a value indicating whether a color is set.
Declaration
public bool Colors1Set { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Colors2
The vertex color field 2
Declaration
public MeshAttributes<uint> Colors2 { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<System.UInt32> |
Colors2Set
Gets a value indicating whether a color is set.
Declaration
public bool Colors2Set { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Flags
The vertex flags field
Declaration
public MeshAttributes<uint> Flags { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<System.UInt32> |
FlagsSet
Gets a value indicating whether flags are set.
Declaration
public bool FlagsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MeshType
The type of mesh which is represented by this instance (e. g. triangle mesh, point, line, etc...)
Declaration
public PrimitiveType MeshType { get; set; }
Property Value
Type | Description |
---|---|
PrimitiveType |
Normals
The normals
Declaration
public MeshAttributes<float3> Normals { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<float3> |
NormalsSet
Gets a value indicating whether normals are set.
Declaration
public bool NormalsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SessionUniqueIdentifier
SessionUniqueIdentifier is used to verify a Mesh's uniqueness in the current session.
Declaration
public Suid SessionUniqueIdentifier { get; }
Property Value
Type | Description |
---|---|
Suid |
Tangents
The tangents
Declaration
public MeshAttributes<float4> Tangents { get; }
Property Value
Type | Description |
---|---|
MeshAttributes<float4> |
TangentsSet
Gets a value indicating whether tangents are set.
Declaration
public bool TangentsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Triangles
The triangles
Declaration
public MeshAttributes<uint> Triangles { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<System.UInt32> |
TrianglesSet
Gets a value indicating whether triangles are set.
Declaration
public bool TrianglesSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
UpdatePerFrame
Update all changed MeshAttributes<T> data after each frame?
Declaration
public bool UpdatePerFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UVs
The UV coordinates
Declaration
public MeshAttributes<float2> UVs { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<float2> |
UVsSet
Gets a value indicating whether UVs are set.
Declaration
public bool UVsSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Vertices
The vertices
Declaration
public MeshAttributes<float3> Vertices { get; protected set; }
Property Value
Type | Description |
---|---|
MeshAttributes<float3> |
VerticesSet
Gets a value indicating whether vertices are set.
Declaration
public bool VerticesSet { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
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()
ResetIndexLists()
Reset all dirty flags
Declaration
public void ResetIndexLists()
Events
DisposeData
MeshChanged event notifies observing MeshManager about property changes and the Mesh's disposal.
Declaration
public event EventHandler<MeshChangedEventArgs> DisposeData
Event Type
Type | Description |
---|---|
System.EventHandler<MeshChangedEventArgs> |