Class MeshUtils
Provides mesh utility methods for Terrain.
Inherited Members
Namespace: UnityEditor.TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
Syntax
public static class MeshUtils
  Properties
defaultProjectionMaterial
Gets the default projection Material.
Declaration
public static Material defaultProjectionMaterial { get; }
  Property Value
| Type | Description | 
|---|---|
| Material | 
Methods
QuaternionFromMatrix(Matrix4x4)
Converts a Matrix4x4 into a Quaternion.
Declaration
public static Quaternion QuaternionFromMatrix(Matrix4x4 m)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Matrix4x4 | m | The Matrix4x4 to convert from.  | 
      
Returns
| Type | Description | 
|---|---|
| Quaternion | Returns a converted Quaternion.  | 
      
RenderTopdownProjection(Mesh, Matrix4x4, RenderTexture, Material, ShaderPass)
Renders the top down projection of a Mesh into a RenderTexture.
Declaration
public static void RenderTopdownProjection(Mesh mesh, Matrix4x4 model, RenderTexture destination, Material mat, MeshUtils.ShaderPass pass)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Mesh | mesh | The Mesh to render.  | 
      
| Matrix4x4 | model | The transformation Matrix4x4.  | 
      
| RenderTexture | destination | The RenderTexture designated as the destination.  | 
      
| Material | mat | The Material to update.  | 
      
| MeshUtils.ShaderPass | pass | The MeshUtils.ShaderPass to use.  | 
      
TransformBounds(Matrix4x4, Bounds)
Transforms a Bounds.
Declaration
public static Bounds TransformBounds(Matrix4x4 m, Bounds bounds)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Matrix4x4 | m | The transformation Matrix4x4.  | 
      
| Bounds | bounds | The Bounds to transform.  | 
      
Returns
| Type | Description | 
|---|---|
| Bounds | Returns the transformed Bounds.  |