Class PatchMesh
Smoothly interpolated patch surface mesh controlled by a 2D grid of control points.
Inheritance
System.Object
PatchMesh
Namespace: VRSketchingGeometry.Meshing
Assembly: VRSketchingGeometry.dll
Syntax
public class PatchMesh
Remarks
Original author: tterpi
Methods
GeneratePatchMesh(List<Vector3>, Int32, Int32, Int32, Int32)
Generates a patch surface mesh from a grid of control points.
Declaration
public static Mesh GeneratePatchMesh(List<Vector3> controlPoints, int width, int height, int resolutionWidth, int resolutionHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<UnityEngine.Vector3> | controlPoints | Flattened list of control points grid. |
| System.Int32 | width | Number of control points horizontally. |
| System.Int32 | height | Number of control points vertically. |
| System.Int32 | resolutionWidth | Vertices between two control points horizontally. |
| System.Int32 | resolutionHeight | Vertices between two control points vertically. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Mesh |
GenerateVerticesOfPatch(List<Vector3>, Int32, Int32, Int32, Int32)
Generate the vertices of a patch surface from a grid of control points.
Declaration
public static Vector3[] GenerateVerticesOfPatch(List<Vector3> controlPoints, int width, int height, int resolutionWidth, int resolutionHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<UnityEngine.Vector3> | controlPoints | |
| System.Int32 | width | Number of control points horizontally |
| System.Int32 | height | Number of control point vertically |
| System.Int32 | resolutionWidth | Number of points to generate between two control points horizontally |
| System.Int32 | resolutionHeight | Number of points to generate between two control points vertically |
Returns
| Type | Description |
|---|---|
| UnityEngine.Vector3[] |