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
mMeshDataThe current mesh data.
x1floatX position of the first point.
y1floatY position of the first point.
x2floatX position of the second point.
y2floatY position of the second point.
colorintThe 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
mMeshDataThe current mesh data.
p0Vec3fThe first point.
p1Vec3fThe second point.
p2Vec3fThe third point.
p3Vec3fThe fourth point.
colorintThe 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
modelMeshDataThe mesh data.
xfloatX position of the vertex.
yfloatY position of the vertex.
zfloatZ position of the vertex.
colorintThe color of the vertex.
GetCube(int)
Gets the cube of this line.
public static MeshData GetCube(int color = 0)
Parameters
colorintThe 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
colorintthe converted base color.
Returns
- MeshData
The mesh data for the rectangle..