BBMOD_Vertex

A variable defined in BBMOD_Vertex.gml

new BBMOD_Vertex(_vertexFormat)

Arguments

Name Type Description
_vertexFormat Struct.BBMOD_VertexFormat The format of the vertex. This drives which properties of the vertex should be defined.

Properties

Name Description
Bones The bone ids of the vertex or undefined if the vertex format does not have bones.
Color The ARGB color of the vertex or undefined if the vertex format does not have colors.
Id The id of the model in a dynamic batch or undefined if the vertex format does not have ids.
Normal The normal vector of the vertex or undefined if the vertex format does not have normals.
Position The 3D position of the vertex or undefined if the vertex format does not have positions.
TangentW The tangent vector & bitangent sign of the vertex or undefined if the vertex format does not have tangents & bitangents.
TextureCoord The texture coordinates of the vertex or undefined if the vertex format does not have texture coordinates.
VertexFormat The vertex format. This drives which properties of the vertex should be defined.
Weights The bone weights of the vertex or undefined if the vertex format does not have bones.

Methods

Name Description
to_vertex_buffer Adds the vertex to the vertex buffer.

Example

Following code shows how the constructor fills in the vertex properties to default values if they are enabled in the vertex format.

var _vformat = new BBMOD_VertexFormat(true);
var _vertex = new BBMOD_Vertex(_vformat);
show_debug_message(_vertex.Normal); // Prints undefined

var _vformatWithNormals = new BBMOD_VertexFormat(true, true);
var _vertexWithNormal = new BBMOD_Vertex(_vformatWithNormals);
show_debug_message(_vertex.Normal); // Prints array [0, 0, 0]
Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on January 21, 2024 using GMDoc.