Show / Hide Table of Contents

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(Single, Single, UInt32, Single, Single)

Declaration
Vertex3D[] CreateCrtMesh(float width, float height, uint numMeshDivisionsPerAxis, float horizontalAngularCurvatureFraction, float cornerRoundingFraction)
Parameters
Type Name Description
System.Single width
System.Single height
System.UInt32 numMeshDivisionsPerAxis
System.Single horizontalAngularCurvatureFraction
System.Single cornerRoundingFraction
Returns
Type Description
Vertex3D[]

CreateQuadMesh(Single, Single)

Creates a Quad Mesh from two triangles

Declaration
Vertex3D[] CreateQuadMesh(float width, float height)
Parameters
Type Name Description
System.Single width

Width of Quad

System.Single height

Height of Quad

Returns
Type Description
Vertex3D[]

CreateRectangularCuboidMesh(Vector3, Single, Single, Single, Single, Nullable<RectangularCuboidMeshTexCoords>)

Declaration
Vertex3D[] CreateRectangularCuboidMesh(Vector3 position, float width, float height, float depth, float rotationDegreesAroundY, RectangularCuboidMeshTexCoords? textureCoords = null)
Parameters
Type Name Description
Vector3 position
System.Single width
System.Single height
System.Single depth
System.Single rotationDegreesAroundY
System.Nullable<RectangularCuboidMeshTexCoords> textureCoords
Returns
Type Description
Vertex3D[]

CreateSphericalMesh(Vector3, Single, Single, Single, Single, UInt32, UInt32)

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

System.Single width

Width of mesh shape

System.Single height

Height of mesh shape

System.Single depth

Depth of mesh shape

System.Single rotationDegreesClockwiseYAxis

Angle in degress to rotate shape around Y (up) axis"

System.UInt32 numDivsHorizontal

Defines the number of segments that the curved surface is divided into around the spherical shapes equator

System.UInt32 numDivsVertical
Returns
Type Description
Vertex3D[]
In This Article
Back to top yak2D - Alex Paterson