Garry's Mod Wiki

MeshVertex

Description

Table structure representing a mesh vertex used by various functions, such as IMesh:BuildFromTriangles and Entity:PhysicsFromMesh and returned by functions such as util.GetModelMeshes and PhysObj:GetMesh.

Members

table color
The vertex color. Uses the Color.
Vector normal
The triangles normal required to calculate lighting (Optional).
Vector tangent
The triangles tangent. Not used by the VertexLitGeneric shader.
Vector binormal
The triangles binormal. Not used by the VertexLitGeneric shader.
Vector pos
The vertex position.
number u
The U texture coordinate.
number v
The V texture coordinate.
number u1
The secondary U texture coordinate. Only works when passed to IMesh:BuildFromTriangles, Useful for LightmappedGeneric shader.
number v1
The secondary V texture coordinate. Only works when passed to IMesh:BuildFromTriangles.
table userdata
A table of four numbers. This is used by most shaders in Source to hold tangent information of the vertex ( tangentX, tangentY, tangentZ, tangentHandedness ).