Show / Hide Table of Contents

Class MeshUtils

Utility for working with meshes.

Note

This class is available only in Tessera Pro

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 surfaceOffset, bool smoothNormals, int face, int layer, int subMesh)
Parameters
Type Name Description
MeshData surfaceMesh
Single tileHeight
Single surfaceOffset
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

TileToTri(TesseraTrianglePrismTile, Vector3Int)

Declaration
public static Matrix4x4 TileToTri(TesseraTrianglePrismTile tile, Vector3Int offset)
Parameters
Type Name Description
TesseraTrianglePrismTile 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
Back to top Generated by DocFX