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
MeshDataThe current mesh data.
x1
floatX position of the first point.
y1
floatY position of the first point.
x2
floatX position of the second point.
y2
floatY position of the second point.
color
intThe 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
MeshDataThe current mesh data.
p0
Vec3fThe first point.
p1
Vec3fThe second point.
p2
Vec3fThe third point.
p3
Vec3fThe fourth point.
color
intThe 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
MeshDataThe mesh data.
x
floatX position of the vertex.
y
floatY position of the vertex.
z
floatZ position of the vertex.
color
intThe color of the vertex.
GetCube(int)
Gets the cube of this line.
public static MeshData GetCube(int color = 0)
Parameters
color
intThe 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
intthe converted base color.
Returns
- MeshData
The mesh data for the rectangle..