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