Struct MeshSource
Burst friendly struct for storing mesh data that later can be used to create a Unity mesh.
Meant to be used in a Jobs
Assembly: fwt.core.dll
Syntax
public struct MeshSource : IDisposable, IMeshSource
Fields
Allocator
Declaration
public Allocator Allocator
Field Value
| Type |
Description |
| Allocator |
|
BoundsData
2 values: MinVertex, MaxVertex
Declaration
public NativeArray<float3> BoundsData
Field Value
| Type |
Description |
| NativeArray<float3> |
|
Colors
Colors per vertex of the mesh
Declaration
public NativeList<Color> Colors
Field Value
| Type |
Description |
| NativeList<Color> |
|
Indices
16 indices layers (submeshes)
Declaration
public FixedArray16<NativeList<uint>> Indices
Field Value
MeshSourceMode
Declaration
public MeshSourceMode MeshSourceMode
Field Value
MeshTopology
Declaration
public MeshTopology MeshTopology
Field Value
| Type |
Description |
| MeshTopology |
|
Normals
Declaration
public NativeList<float3> Normals
Field Value
| Type |
Description |
| NativeList<float3> |
|
Uvs
Declaration
public FixedArray4<NativeList<Vector2>> Uvs
Field Value
Vertexes
Declaration
public NativeList<VertexData> Vertexes
Field Value
Verts
Declaration
public NativeList<float3> Verts
Field Value
| Type |
Description |
| NativeList<float3> |
|
Properties
Bounds
Declaration
public Bounds Bounds { get; }
Property Value
BoundsCenter
Declaration
public float3 BoundsCenter { get; }
Property Value
BoundsSize
Declaration
public float3 BoundsSize { get; }
Property Value
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
MaxVertPos
Declaration
public float3 MaxVertPos { get; set; }
Property Value
MinVertPos
Declaration
public float3 MinVertPos { get; set; }
Property Value
Methods
AddIndice(int, uint)
Declaration
public void AddIndice(int submeshIndex, uint indice)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| uint |
indice |
|
AddTriangle(int, uint, uint, uint, bool)
Declaration
public void AddTriangle(int submeshIndex, uint indice0, uint indice1, uint indice2, bool isRecalcNormals = true)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| uint |
indice0 |
|
| uint |
indice1 |
|
| uint |
indice2 |
|
| bool |
isRecalcNormals |
|
AddVertex(VertexData)
Declaration
public void AddVertex(VertexData vertex)
Parameters
CalculateBounds()
Declaration
public Bounds CalculateBounds()
Returns
Clear()
Declaration
Dispose()
Declaration
FillMesh(Mesh, bool, bool, bool)
Fills the provided mesh with data from the mesh source
Declaration
public void FillMesh(Mesh mesh, bool isRecalculateBounds, bool isRecalculateNormals, bool isRecalculateTangents)
Parameters
| Type |
Name |
Description |
| Mesh |
mesh |
|
| bool |
isRecalculateBounds |
|
| bool |
isRecalculateNormals |
|
| bool |
isRecalculateTangents |
|
GetVertexCount()
Declaration
public uint GetVertexCount()
Returns
InitAll(Allocator)
Declaration
public void InitAll(Allocator allocator)
Parameters
| Type |
Name |
Description |
| Allocator |
allocator |
|
IsInitialized()
Declaration
public bool IsInitialized()
Returns
RecalcTriangleNormals(uint, uint, uint)
Declaration
public void RecalcTriangleNormals(uint indice0, uint indice1, uint indice2)
Parameters
| Type |
Name |
Description |
| uint |
indice0 |
|
| uint |
indice1 |
|
| uint |
indice2 |
|
UpdateBounds(float3)
Declaration
public void UpdateBounds(float3 position)
Parameters
| Type |
Name |
Description |
| float3 |
position |
|
Implements
Extension Methods