Structures/MeshVertex

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Ok let's now correct the Color type. Color is not a type, it's a table structure.)
Line 1: Line 1:
 
{{Structure
 
{{Structure
 
|Description=Table used by various functions, such as {{ClassFunction|IMesh|BuildFromTriangles}}.
 
|Description=Table used by various functions, such as {{ClassFunction|IMesh|BuildFromTriangles}}.
|Fields=
+
|Fields={{StructureField|table|color|The vertex color. Uses the {{Struct|Color}}.}}{{StructureField|Vector|normal|The triangles normal required to calculate lighting(optional).}}{{StructureField|Vector|tangent|The triangles tangent. Not used by the VertexLitGeneric shader.}}{{StructureField|Vector|binormal|The triangles binormal. Not used by the VertexLitGeneric shader.}}{{StructureField|Vector|pos|The vertex position.}}{{StructureField|number|u|The u texture scale.}}{{StructureField|number|v|The v texture scale.}}{{StructureField|table|userdata|{{NextUpdate}}
{{StructureField|table|color|The vertex color. Uses the {{Struct|Color}}.}}
+
 
{{StructureField|Vector|normal|The triangles normal required to calculate lighting(optional).}}
+
A table of four numbers. This is used by most shaders in Source to hold tangent information of the vertex ( tangentX, tangentY, tangentZ, tangentHandedness ).
{{StructureField|Vector|tangent|The triangles tangent.}}
+
}}
{{StructureField|Vector|binormal|The triangles binormal.}}
+
{{StructureField|Vector|pos|The vertex position.}}
+
{{StructureField|number|u|The u texture scale.}}
+
{{StructureField|number|v|The v texture scale.}}
+
 
}}
 
}}

Revision as of 15:30, 15 February 2018

Table used by various functions, such as IMesh:BuildFromTriangles.



Type Name Description
table color

The vertex color. Uses the Color structure.

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 scale.

number v

The v texture scale.

table userdata
Next Update Change

This feature is only available in the next update.

A table of four numbers. This is used by most shaders in Source to hold tangent information of the vertex ( tangentX, tangentY, tangentZ, tangentHandedness ).

Personal tools
Navigation