Table of Contents

Class LineMeshUtil

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class LineMeshUtil
Inheritance
LineMeshUtil
Inherited Members
Extension Methods

Methods

AddLine2D(MeshData, float, float, float, float, int)

Adds a 2D line to the mesh data.

public static void AddLine2D(MeshData m, float x1, float y1, float x2, float y2, int color)

Parameters

m MeshData

The current mesh data.

x1 float

X position of the first point.

y1 float

Y position of the first point.

x2 float

X position of the second point.

y2 float

Y position of the second point.

color int

The converted base color.

AddLineLoop(MeshData, Vec3f, Vec3f, Vec3f, Vec3f, int)

Adds a collection of lines to the given mesh.

public static void AddLineLoop(MeshData m, Vec3f p0, Vec3f p1, Vec3f p2, Vec3f p3, int color)

Parameters

m MeshData

The current mesh data.

p0 Vec3f

The first point.

p1 Vec3f

The second point.

p2 Vec3f

The third point.

p3 Vec3f

The fourth point.

color int

The color of the resulting lines.

AddVertex(MeshData, float, float, float, int)

Adds a vertex to the mesh data.

public static void AddVertex(MeshData model, float x, float y, float z, int color)

Parameters

model MeshData

The mesh data.

x float

X position of the vertex.

y float

Y position of the vertex.

z float

Z position of the vertex.

color int

The color of the vertex.

GetCube(int)

Gets the cube of this line.

public static MeshData GetCube(int color = 0)

Parameters

color int

The converted base color.

Returns

MeshData

The mesh data for the cube.

GetRectangle(int)

Gets the current rectangle for the line.

public static MeshData GetRectangle(int color = 0)

Parameters

color int

the converted base color.

Returns

MeshData

The mesh data for the rectangle..