Class MeshHelper
Syntax
public static class MeshHelper
Methods
AsNativeArray<T>(ref BlobArray<T>)
Declaration
public static NativeArray<T> AsNativeArray<T>(ref BlobArray<T> ba)
where T : struct
Parameters
Type |
Name |
Description |
BlobArray<T> |
ba |
|
Returns
Type |
Description |
NativeArray<T> |
|
Type Parameters
AsNativeArray<T>(BlobBuilderArray<T>)
Declaration
public static NativeArray<T> AsNativeArray<T>(this BlobBuilderArray<T> bba)
where T : struct
Parameters
Type |
Name |
Description |
BlobBuilderArray<T> |
bba |
|
Returns
Type |
Description |
NativeArray<T> |
|
Type Parameters
ComputeBounds(NativeArray<LitVertex>)
Declaration
public static AABB ComputeBounds(NativeArray<LitVertex> vertices)
Parameters
Type |
Name |
Description |
NativeArray<LitVertex> |
vertices |
|
Returns
ComputeBounds(NativeArray<SimpleVertex>)
Declaration
public static AABB ComputeBounds(NativeArray<SimpleVertex> vertices)
Parameters
Returns
ComputeNormals(NativeArray<LitVertex>, NativeArray<UInt16>, Boolean)
Declaration
public static void ComputeNormals(NativeArray<LitVertex> vertices, NativeArray<ushort> indices, bool clear = false)
Parameters
ComputeTangentAndBinormal(NativeArray<LitVertex>, NativeArray<UInt16>)
Declaration
public static void ComputeTangentAndBinormal(NativeArray<LitVertex> vertices, NativeArray<ushort> indices)
Parameters
Type |
Name |
Description |
NativeArray<LitVertex> |
vertices |
|
NativeArray<UInt16> |
indices |
|
CreateBoxMesh(float3, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreateBoxMesh(float3 size, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
CreateDonutMesh(Single, Int32, Single, Int32, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreateDonutMesh(float innerR, int innerN, float outerR, int outerN, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
CreateExtrudedLineMesh(Single, Single, Single, Int32, NativeArray<float3>, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreateExtrudedLineMesh(float radius, float taperLen, float uLen, int nSegments, NativeArray<float3> centerline, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
CreatePlane(float3, float3, float3, out MeshBounds, out SimpleMeshRenderData)
Declaration
public static void CreatePlane(float3 org, float3 du, float3 dv, out MeshBounds mb, out SimpleMeshRenderData smrd)
Parameters
CreatePlaneLit(float3, float3, float3, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreatePlaneLit(float3 org, float3 du, float3 dv, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
CreateSuperEllipsoid(float3, NativeArray<LitVertex>, NativeArray<UInt16>, Single, Single, Int32, Int32, out AABB)
Declaration
public static void CreateSuperEllipsoid(float3 size, NativeArray<LitVertex> vertices, NativeArray<ushort> indices, float e, float n, int tessU, int tessV, out AABB bb)
Parameters
CreateSuperEllipsoidMesh(float3, Single, Single, Int32, Int32, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreateSuperEllipsoidMesh(float3 size, float r, float t, int tessU, int tessV, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
CreateSuperTorusKnotMesh(Single, Int32, Single, Int32, Int32, Int32, Single, Single, out MeshBounds, out LitMeshRenderData)
Declaration
public static void CreateSuperTorusKnotMesh(float innerR, int innerN, float outerR, int outerN, int p, int q, float innerE, float outerE, out MeshBounds mb, out LitMeshRenderData lmrd)
Parameters
ECos(Single, Single)
Declaration
public static float ECos(float x, float e)
Parameters
Returns
ESin(Single, Single)
Declaration
public static float ESin(float x, float e)
Parameters
Returns
EvalCatmullRom(float3x4, Single)
Declaration
public static float3 EvalCatmullRom(in float3x4 m, float t)
Parameters
Type |
Name |
Description |
float3x4 |
m |
|
Single |
t |
|
Returns
EvalSuperCircle(Single, Single)
Declaration
public static float2 EvalSuperCircle(float phi, float e)
Parameters
Returns
EvalSuperTorusKnotCenterLine(Single, Int32, Int32, Single)
Declaration
public static float3 EvalSuperTorusKnotCenterLine(float phi, int p, int q, float e)
Parameters
Returns
ExtrudedLineMeshRequiredIndices(Int32, Int32)
Declaration
public static int ExtrudedLineMeshRequiredIndices(int nCenterLineVertices, int nSegments)
Parameters
Type |
Name |
Description |
Int32 |
nCenterLineVertices |
|
Int32 |
nSegments |
|
Returns
ExtrudedLineMeshRequiredVertices(Int32, Int32)
Declaration
public static int ExtrudedLineMeshRequiredVertices(int nCenterLineVertices, int nSegments)
Parameters
Type |
Name |
Description |
Int32 |
nCenterLineVertices |
|
Int32 |
nSegments |
|
Returns
FillBoxMesh(float3, NativeArray<LitVertex>, NativeArray<UInt16>, out AABB)
Declaration
public static void FillBoxMesh(float3 size, NativeArray<LitVertex> vertices, NativeArray<ushort> indices, out AABB bb)
Parameters
Type |
Name |
Description |
float3 |
size |
|
NativeArray<LitVertex> |
vertices |
|
NativeArray<UInt16> |
indices |
|
AABB |
bb |
|
FillDonut(NativeArray<LitVertex>, NativeArray<UInt16>, Single, Int32, Single, Int32)
Declaration
public static void FillDonut(NativeArray<LitVertex> vertices, NativeArray<ushort> indices, float innerR, int innerN, float outerR, int outerN)
Parameters
FillExtrudedLine(NativeArray<LitVertex>, NativeArray<UInt16>, Single, Single, Single, NativeArray<float3>, NativeArray<float2>, NativeArray<Single>, Boolean)
Declaration
public static void FillExtrudedLine(NativeArray<LitVertex> vertices, NativeArray<ushort> indices, float radius, float taperLen, float uLen, NativeArray<float3> centerline, NativeArray<float2> profile, NativeArray<float> taper, bool closed)
Parameters
FillExtrudedLineCircle(NativeArray<LitVertex>, NativeArray<UInt16>, Single, Single, Single, NativeArray<float3>, Int32, Boolean)
Declaration
public static void FillExtrudedLineCircle(NativeArray<LitVertex> vertices, NativeArray<ushort> indices, float radius, float taperLen, float uLen, NativeArray<float3> centerline, int nSegments, bool closed)
Parameters
FillPlanarIndices(Int32, Int32, NativeArray<UInt16>)
Declaration
public static void FillPlanarIndices(int tessU, int tessV, NativeArray<ushort> indices)
Parameters
FillPlaneMesh(NativeArray<SimpleVertex>, NativeArray<UInt16>, float3, float3, float3, out AABB)
Declaration
public static void FillPlaneMesh(NativeArray<SimpleVertex> destVertices, NativeArray<ushort> destIndices, float3 org, float3 du, float3 dv, out AABB bb)
Parameters
Type |
Name |
Description |
NativeArray<SimpleVertex> |
destVertices |
|
NativeArray<UInt16> |
destIndices |
|
float3 |
org |
|
float3 |
du |
|
float3 |
dv |
|
AABB |
bb |
|
FillPlaneMeshLit(NativeArray<LitVertex>, NativeArray<UInt16>, float3, float3, float3, out AABB)
Declaration
public static void FillPlaneMeshLit(NativeArray<LitVertex> destVertices, NativeArray<ushort> destIndices, float3 org, float3 du, float3 dv, out AABB bb)
Parameters
Type |
Name |
Description |
NativeArray<LitVertex> |
destVertices |
|
NativeArray<UInt16> |
destIndices |
|
float3 |
org |
|
float3 |
du |
|
float3 |
dv |
|
AABB |
bb |
|
FillSuperTorusKnot(NativeArray<LitVertex>, NativeArray<UInt16>, Single, Int32, Single, Int32, Int32, Int32, Single, Single)
Declaration
public static void FillSuperTorusKnot(NativeArray<LitVertex> vertices, NativeArray<ushort> indices, float innerR, int innerN, float outerR, int outerN, int p, int q, float innerE, float outerE)
Parameters
InitCatmullRom(float3, float3, float3, float3)
Declaration
public static float3x4 InitCatmullRom(float3 p0, float3 p1, float3 p2, float3 p3)
Parameters
Type |
Name |
Description |
float3 |
p0 |
|
float3 |
p1 |
|
float3 |
p2 |
|
float3 |
p3 |
|
Returns
Type |
Description |
float3x4 |
|
ResampleCatmullRom(NativeArray<float3>, Single, Boolean, Allocator)
Declaration
public static NativeList<float3> ResampleCatmullRom(NativeArray<float3> curve, float stepDistance, bool closed, Allocator allocator)
Parameters
Type |
Name |
Description |
NativeArray<float3> |
curve |
|
Single |
stepDistance |
|
Boolean |
closed |
|
Allocator |
allocator |
|
Returns
Type |
Description |
NativeList<float3> |
|
ResampleLinear(NativeArray<float3>, Single, Allocator)
Declaration
public static NativeList<float3> ResampleLinear(NativeArray<float3> curve, float stepDistance, Allocator allocator)
Parameters
Type |
Name |
Description |
NativeArray<float3> |
curve |
|
Single |
stepDistance |
|
Allocator |
allocator |
|
Returns
Type |
Description |
NativeList<float3> |
|
Declaration
public static float SampleNativeArrayUniformLinear(NativeArray<float> arr, float t)
Parameters
Returns
SetAlbedoColor(NativeArray<LitVertex>, float4)
Declaration
public static void SetAlbedoColor(NativeArray<LitVertex> dest, float4 albedo_opacity)
Parameters
Type |
Name |
Description |
NativeArray<LitVertex> |
dest |
|
float4 |
albedo_opacity |
|
Declaration
public static void SetMetalSmoothness(NativeArray<LitVertex> dest, float2 metal_smoothness)
Parameters
Type |
Name |
Description |
NativeArray<LitVertex> |
dest |
|
float2 |
metal_smoothness |
|
SmoothCurve(NativeArray<float3>)
Declaration
public static void SmoothCurve(NativeArray<float3> curve)
Parameters
Type |
Name |
Description |
NativeArray<float3> |
curve |
|