Interface ICommonMeshBuilder
Provides functions to generate the Vertex3D arrays for a selection of mesh types for the MeshRender stage
Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public interface ICommonMeshBuilder
Methods
CreateCrtMesh(float, float, uint, float, float)
Declaration
Vertex3D[] CreateCrtMesh(float width, float height, uint numMeshDivisionsPerAxis, float horizontalAngularCurvatureFraction, float cornerRoundingFraction)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | |
| float | height | |
| uint | numMeshDivisionsPerAxis | |
| float | horizontalAngularCurvatureFraction | |
| float | cornerRoundingFraction |
Returns
| Type | Description |
|---|---|
| Vertex3D[] |
CreateQuadMesh(float, float)
Creates a Quad Mesh from two triangles
Declaration
Vertex3D[] CreateQuadMesh(float width, float height)
Parameters
| Type | Name | Description |
|---|---|---|
| float | width | Width of Quad |
| float | height | Height of Quad |
Returns
| Type | Description |
|---|---|
| Vertex3D[] |
CreateRectangularCuboidMesh(Vector3, float, float, float, float, RectangularCuboidMeshTexCoords?)
Declaration
Vertex3D[] CreateRectangularCuboidMesh(Vector3 position, float width, float height, float depth, float rotationDegreesAroundY, RectangularCuboidMeshTexCoords? textureCoords = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | |
| float | width | |
| float | height | |
| float | depth | |
| float | rotationDegreesAroundY | |
| RectangularCuboidMeshTexCoords? | textureCoords |
Returns
| Type | Description |
|---|---|
| Vertex3D[] |
CreateSphericalMesh(Vector3, float, float, float, float, uint, uint)
Creates a Spherical mesh, which is deformed / resized in each dimension. When width == height == depth, a sphere is generated
Declaration
Vertex3D[] CreateSphericalMesh(Vector3 position, float width, float height, float depth, float rotationDegreesClockwiseYAxis, uint numDivsHorizontal, uint numDivsVertical)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | Centre position of spherical mesh |
| float | width | Width of mesh shape |
| float | height | Height of mesh shape |
| float | depth | Depth of mesh shape |
| float | rotationDegreesClockwiseYAxis | Angle in degress to rotate shape around Y (up) axis" |
| uint | numDivsHorizontal | Defines the number of segments that the curved surface is divided into around the spherical shapes equator |
| uint | numDivsVertical |
Returns
| Type | Description |
|---|---|
| Vertex3D[] |