PointDecimator
public static class PointDecimatorPoint decimation algorithms for reducing data at lower LOD levels.
Methods
Section titled “Methods”
DecimateUniform(int, int)
Section titled “DecimateUniform(int, int)”public static int DecimateUniform(int index, int decimationFactor)Simple uniform decimation - keep every Nth point.
Parameters
| Name | Type | Description |
|---|---|---|
index |
System.Int32 | |
decimationFactor |
System.Int32 |
Returns
System.Int32 — No return description is available.
CalculateLTTBWeight(float2, float2, float2, float2)
Section titled “CalculateLTTBWeight(float2, float2, float2, float2)”public static float CalculateLTTBWeight(float2 prev, float2 current, float2 next, float2 bucketAvg)Largest triangle three buckets (LTTB) algorithm index. Returns weight for point importance (higher = more important).
Parameters
| Name | Type | Description |
|---|---|---|
prev |
Unity.Mathematics.float2 | |
current |
Unity.Mathematics.float2 | |
next |
Unity.Mathematics.float2 | |
bucketAvg |
Unity.Mathematics.float2 |
Returns
System.Single — No return description is available.
DouglasPeuckerDistance(float2, float2, float2)
Section titled “DouglasPeuckerDistance(float2, float2, float2)”public static float DouglasPeuckerDistance(float2 point, float2 lineStart, float2 lineEnd)Douglas-Peucker perpendicular distance.
Parameters
| Name | Type | Description |
|---|---|---|
point |
Unity.Mathematics.float2 | |
lineStart |
Unity.Mathematics.float2 | |
lineEnd |
Unity.Mathematics.float2 |
Returns
System.Single — No return description is available.
VisvalingamArea(float2, float2, float2)
Section titled “VisvalingamArea(float2, float2, float2)”public static float VisvalingamArea(float2 prev, float2 current, float2 next)Visvalingam-Whyatt effective area.
Parameters
| Name | Type | Description |
|---|---|---|
prev |
Unity.Mathematics.float2 | |
current |
Unity.Mathematics.float2 | |
next |
Unity.Mathematics.float2 |
Returns
System.Single — No return description is available.