Class ConvexMeshGenerationFlags
Set of flags used to generate model convex mesh. Allows to customize process.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public sealed class ConvexMeshGenerationFlags : Enum
Fields
FastCook
The combination of flags that improve the collision data cooking performance at the cost of quality and features. Recommend for runtime dynamic or deformable objects that need quick collision updates.
Declaration
public const ConvexMeshGenerationFlags FastCook
Field Value
ConvexMeshGenerationFlags
|
None
Nothing.
Declaration
public const ConvexMeshGenerationFlags None
Field Value
ConvexMeshGenerationFlags
|
ShiftVertices
Convex hull input vertices are shifted to be around origin to provide better computation stability. It is recommended to provide input vertices around the origin, otherwise use this flag to improve numerical stability.
Declaration
public const ConvexMeshGenerationFlags ShiftVertices
Field Value
ConvexMeshGenerationFlags
|
SkipValidation
Disables the convex mesh validation to speed-up hull creation. Creating a convex mesh with invalid input data without prior validation may result in undefined behavior.
Declaration
public const ConvexMeshGenerationFlags SkipValidation
Field Value
ConvexMeshGenerationFlags
|
SuppressFaceRemapTable
If checked, the face remap table is not created. This saves a significant amount of memory, but disabled ability to remap the cooked collision geometry into original mesh using raycast hit info.
Declaration
public const ConvexMeshGenerationFlags SuppressFaceRemapTable
Field Value
ConvexMeshGenerationFlags
|
UseFastInteriaComputation
Inertia tensor computation is faster using SIMD code, but the precision is lower, which may result in incorrect inertia for very thin hulls.
Declaration
public const ConvexMeshGenerationFlags UseFastInteriaComputation
Field Value
ConvexMeshGenerationFlags
|
UsePlaneShifting
Enables plane shifting vertex limit algorithm.
Plane shifting is an alternative algorithm for the case when the computed hull has more vertices than the specified vertex limit.
The default algorithm computes the full hull, and an OBB around the input vertices. This OBB is then sliced with the hull planes until the vertex limit is reached. The default algorithm requires the vertex limit to be set to at least 8, and typically produces results that are much better quality than are produced by plane shifting.
When plane shifting is enabled, the hull computation stops when vertex limit is reached.The hull planes are then shifted to contain all input vertices, and the new plane intersection points are then used to generate the final hull with the given vertex limit.Plane shifting may produce sharp edges to vertices very far away from the input cloud, and does not guarantee that all input vertices are inside the resulting hull. However, it can be used with a vertex limit as low as 4.
Declaration
public const ConvexMeshGenerationFlags UsePlaneShifting
Field Value
ConvexMeshGenerationFlags
|
value__
Declaration
public int value__
Field Value
System.Int32
|