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 |
|
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<int>> Indices
Field Value
MeshTopology
Declaration
public MeshTopology MeshTopology
Field Value
| Type |
Description |
| MeshTopology |
|
Uvs
Declaration
public FixedArray4<NativeList<Vector2>> Uvs
Field Value
Verts
Declaration
public NativeList<float3> Verts
Field Value
| Type |
Description |
| NativeList<float3> |
|
Properties
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
Methods
AddColor(Color)
Declaration
public void AddColor(Color color)
Parameters
| Type |
Name |
Description |
| Color |
color |
|
AddIndice(int, int)
Declaration
public void AddIndice(int submeshIndex, int indice)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| int |
indice |
|
AddIndice(int, NativeList<int>)
Declaration
public void AddIndice(int submeshIndex, NativeList<int> indices)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| NativeList<int> |
indices |
|
AddQuad(int, int, float3, Vector3, Vector3, float3, Color, Color, Color, Color, Vector2, Vector2, Vector2, Vector2)
Declaration
public void AddQuad(int submeshIndex, int uvChannel, float3 vert0, Vector3 vert1, Vector3 vert2, float3 vert3, Color color0, Color color1, Color color2, Color color3, Vector2 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| int |
uvChannel |
|
| float3 |
vert0 |
|
| Vector3 |
vert1 |
|
| Vector3 |
vert2 |
|
| float3 |
vert3 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
| Color |
color3 |
|
| Vector2 |
uv0 |
|
| Vector2 |
uv1 |
|
| Vector2 |
uv2 |
|
| Vector2 |
uv3 |
|
AddQuad(int, float3, float3, float3, float3, Color, Color, Color, Color)
Declaration
public void AddQuad(int submeshIndex, float3 vert0, float3 vert1, float3 vert2, float3 vert3, Color color0, Color color1, Color color2, Color color3)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| float3 |
vert0 |
|
| float3 |
vert1 |
|
| float3 |
vert2 |
|
| float3 |
vert3 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
| Color |
color3 |
|
AddQuad(int, float3, Vector3, Vector3, Vector3, Color, Color, Color, Color, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2)
Declaration
public void AddQuad(int submeshIndex, float3 vert0, Vector3 vert1, Vector3 vert2, Vector3 vert3, Color color0, Color color1, Color color2, Color color3, Vector2 uv0_0, Vector2 uv1_0, Vector2 uv2_0, Vector2 uv3_0, Vector2 uv0_1, Vector2 uv1_1, Vector2 uv2_1, Vector2 uv3_1, Vector2 uv0_2, Vector2 uv1_2, Vector2 uv2_2, Vector2 uv3_2, Vector2 uv0_3, Vector2 uv1_3, Vector2 uv2_3, Vector2 uv3_3)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| float3 |
vert0 |
|
| Vector3 |
vert1 |
|
| Vector3 |
vert2 |
|
| Vector3 |
vert3 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
| Color |
color3 |
|
| Vector2 |
uv0_0 |
|
| Vector2 |
uv1_0 |
|
| Vector2 |
uv2_0 |
|
| Vector2 |
uv3_0 |
|
| Vector2 |
uv0_1 |
|
| Vector2 |
uv1_1 |
|
| Vector2 |
uv2_1 |
|
| Vector2 |
uv3_1 |
|
| Vector2 |
uv0_2 |
|
| Vector2 |
uv1_2 |
|
| Vector2 |
uv2_2 |
|
| Vector2 |
uv3_2 |
|
| Vector2 |
uv0_3 |
|
| Vector2 |
uv1_3 |
|
| Vector2 |
uv2_3 |
|
| Vector2 |
uv3_3 |
|
AddTriangle(int, int, Vector3, Vector3, float3, Color, Color, Color, Vector2, Vector2, Vector2)
Declaration
public void AddTriangle(int submeshIndex, int uvChannel, Vector3 vert0, Vector3 vert1, float3 vert2, Color color0, Color color1, Color color2, Vector2 uv0, Vector2 uv1, Vector2 uv2)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| int |
uvChannel |
|
| Vector3 |
vert0 |
|
| Vector3 |
vert1 |
|
| float3 |
vert2 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
| Vector2 |
uv0 |
|
| Vector2 |
uv1 |
|
| Vector2 |
uv2 |
|
AddTriangle(int, float3, float3, float3, Color, Color, Color, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2)
Declaration
public void AddTriangle(int submeshIndex, float3 vert0, float3 vert1, float3 vert2, Color color0, Color color1, Color color2, Vector2 uv0_0, Vector2 uv1_0, Vector2 uv2_0, Vector2 uv0_1, Vector2 uv1_1, Vector2 uv2_1, Vector2 uv0_2, Vector2 uv1_2, Vector2 uv2_2, Vector2 uv0_3, Vector2 uv1_3, Vector2 uv2_3)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| float3 |
vert0 |
|
| float3 |
vert1 |
|
| float3 |
vert2 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
| Vector2 |
uv0_0 |
|
| Vector2 |
uv1_0 |
|
| Vector2 |
uv2_0 |
|
| Vector2 |
uv0_1 |
|
| Vector2 |
uv1_1 |
|
| Vector2 |
uv2_1 |
|
| Vector2 |
uv0_2 |
|
| Vector2 |
uv1_2 |
|
| Vector2 |
uv2_2 |
|
| Vector2 |
uv0_3 |
|
| Vector2 |
uv1_3 |
|
| Vector2 |
uv2_3 |
|
AddTriangle(int, Vector3, float3, Vector3, Color, Color, Color)
Declaration
public void AddTriangle(int submeshIndex, Vector3 vert0, float3 vert1, Vector3 vert2, Color color0, Color color1, Color color2)
Parameters
| Type |
Name |
Description |
| int |
submeshIndex |
|
| Vector3 |
vert0 |
|
| float3 |
vert1 |
|
| Vector3 |
vert2 |
|
| Color |
color0 |
|
| Color |
color1 |
|
| Color |
color2 |
|
AddUv(int, NativeList<Vector2>)
Declaration
public void AddUv(int uvChannel, NativeList<Vector2> uv)
Parameters
| Type |
Name |
Description |
| int |
uvChannel |
|
| NativeList<Vector2> |
uv |
|
AddUv(int, Vector2)
Declaration
public void AddUv(int uvChannel, Vector2 uv)
Parameters
| Type |
Name |
Description |
| int |
uvChannel |
|
| Vector2 |
uv |
|
AddUv(int, Vector2, Vector2, Vector2)
Declaration
public void AddUv(int uvChannel, Vector2 uv0, Vector2 uv1, Vector2 uv2)
Parameters
| Type |
Name |
Description |
| int |
uvChannel |
|
| Vector2 |
uv0 |
|
| Vector2 |
uv1 |
|
| Vector2 |
uv2 |
|
AddUv(int, Vector2, Vector2, Vector2, Vector2)
Declaration
public void AddUv(int uvChannel, Vector2 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3)
Parameters
| Type |
Name |
Description |
| int |
uvChannel |
|
| Vector2 |
uv0 |
|
| Vector2 |
uv1 |
|
| Vector2 |
uv2 |
|
| Vector2 |
uv3 |
|
AddVertex(float3)
Declaration
public void AddVertex(float3 vert)
Parameters
| Type |
Name |
Description |
| float3 |
vert |
|
AddVertex(float3, float3, float3)
Declaration
public void AddVertex(float3 v0, float3 v1, float3 v2)
Parameters
| Type |
Name |
Description |
| float3 |
v0 |
|
| float3 |
v1 |
|
| float3 |
v2 |
|
AddVertex(float3, float3, float3, float3)
Declaration
public void AddVertex(float3 v0, float3 v1, float3 v2, float3 v3)
Parameters
| Type |
Name |
Description |
| float3 |
v0 |
|
| float3 |
v1 |
|
| float3 |
v2 |
|
| float3 |
v3 |
|
Clear()
Declaration
Dispose()
Declaration
FillMesh(Mesh)
Fills the provided mesh with data from the mesh source
Declaration
public void FillMesh(Mesh mesh)
Parameters
| Type |
Name |
Description |
| Mesh |
mesh |
|
InitAll(Allocator)
Declaration
public void InitAll(Allocator allocator)
Parameters
| Type |
Name |
Description |
| Allocator |
allocator |
|
IsInitialized()
Declaration
public bool IsInitialized()
Returns
Implements
Extension Methods