Show / Hide Table of Contents

Class MeshUtils

Inheritance
Object
MeshUtils
Namespace: Tessera
Assembly: cs.temp.dll.dll
Syntax
public static class MeshUtils

Methods

GetDeformation(MeshData, Single, Single, Boolean, Int32, Int32, Int32)

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
Type Name Description
MeshData surfaceMesh
Single tileHeight
Single sufaceOffset
Boolean smoothNormals
Int32 face
Int32 layer
Int32 subMesh
Returns
Type Description
MeshDeformation

GetDeformation(MeshData, Single, Single, Boolean, TesseraTileInstance)

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
Type Name Description
MeshData surfaceMesh
Single tileHeight
Single surfaceOffset
Boolean smoothNormals
TesseraTileInstance i
Returns
Type Description
MeshDeformation

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

TransformRecursively(GameObject, MeshDeformation)

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
Type Name Description
MeshData mesh
Int32 submesh
Int32 face
Single meshOffset1
Single meshOffset2
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>
Back to top Generated by DocFX