Class MeshUtils
Assembly: cs.temp.dll.dll
Syntax
public static class MeshUtils
Methods
Transforms from a unit cube centered on the origin to the surface of the mesh
Declaration
public static MeshDeformation GetDeformation(MeshData surfaceMesh, float tileHeight, float sufaceOffset, bool smoothNormals, int face, int layer, int subMesh)
Parameters
Returns
Deforms from tile local space to the surface of the mesh
Declaration
public static MeshDeformation GetDeformation(MeshData surfaceMesh, float tileHeight, float surfaceOffset, bool smoothNormals, TesseraTileInstance i)
Parameters
Returns
TileToCube(TesseraTile, Vector3Int)
Matrix that transforms from tile local co-ordinates to a unit centered cube, mapping the cube at the given offset to the unit cube.
Declaration
public static Matrix4x4 TileToCube(TesseraTile tile, Vector3Int offset)
Parameters
Type |
Name |
Description |
TesseraTile |
tile |
|
Vector3Int |
offset |
|
Returns
Type |
Description |
Matrix4x4 |
|
Applies Transform gameObject and its children.
Components affected:
- MeshFilter
- MeshColldier
- BoxCollider
Declaration
public static void TransformRecursively(GameObject gameObject, MeshDeformation meshDeformation)
Parameters
Type |
Name |
Description |
GameObject |
gameObject |
|
MeshDeformation |
meshDeformation |
|
TrilinearInterpolate(MeshData, Int32, Int32, Single, Single)
Sets up a function that does trilinear interpolation from a unit cube centered on the origin
to a cube made by extruding a given face of the mesh by meshOffset1 (for y=-0.5) and meshOffset2 (for y=0.5)
Declaration
public static Func<Vector3, Vector3> TrilinearInterpolate(MeshData mesh, int submesh, int face, float meshOffset1, float meshOffset2)
Parameters
Returns
Type |
Description |
Func<Vector3, Vector3> |
|
TrilinearInterpolate(Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2, Vector2)
Declaration
public static Func<Vector3, Vector2> TrilinearInterpolate(Vector2 v1, Vector2 v2, Vector2 v3, Vector2 v4, Vector2 v5, Vector2 v6, Vector2 v7, Vector2 v8)
Parameters
Type |
Name |
Description |
Vector2 |
v1 |
|
Vector2 |
v2 |
|
Vector2 |
v3 |
|
Vector2 |
v4 |
|
Vector2 |
v5 |
|
Vector2 |
v6 |
|
Vector2 |
v7 |
|
Vector2 |
v8 |
|
Returns
Type |
Description |
Func<Vector3, Vector2> |
|
TrilinearInterpolate(Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3, Vector3)
Declaration
public static Func<Vector3, Vector3> TrilinearInterpolate(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, Vector3 v5, Vector3 v6, Vector3 v7, Vector3 v8)
Parameters
Type |
Name |
Description |
Vector3 |
v1 |
|
Vector3 |
v2 |
|
Vector3 |
v3 |
|
Vector3 |
v4 |
|
Vector3 |
v5 |
|
Vector3 |
v6 |
|
Vector3 |
v7 |
|
Vector3 |
v8 |
|
Returns
Type |
Description |
Func<Vector3, Vector3> |
|
TrilinearInterpolate(Vector4, Vector4, Vector4, Vector4, Vector4, Vector4, Vector4, Vector4)
Declaration
public static Func<Vector3, Vector4> TrilinearInterpolate(Vector4 v1, Vector4 v2, Vector4 v3, Vector4 v4, Vector4 v5, Vector4 v6, Vector4 v7, Vector4 v8)
Parameters
Type |
Name |
Description |
Vector4 |
v1 |
|
Vector4 |
v2 |
|
Vector4 |
v3 |
|
Vector4 |
v4 |
|
Vector4 |
v5 |
|
Vector4 |
v6 |
|
Vector4 |
v7 |
|
Vector4 |
v8 |
|
Returns
Type |
Description |
Func<Vector3, Vector4> |
|