2.2.7.81 MILCMD_MESHGEOMETRY3D
This message updates all properties of a resource of type TYPE_MESHGEOMETRY3D. This resource represents a triangle primitive for building a 3D shape.










1 









2 









3 


messageSize 

controlCode 

targetResource 

PositionsCollectionSize 

TextureCoordinatesCollectionSize 

TriangleIndicesCollectionSize 

BlendColorsCollectionSize 

PositionsCollection (variable) 

... 

TextureCoordinatesCollection (variable) 

... 

TriangleIndicesCollection (variable) 

... 

BlendColorsCollection (variable) 

... 
messageSize (4 bytes): A 32bit unsigned integer. The total size of this message and its payload in bytes. The value of this field MUST be set to a number divisible by four and greater than or equal to 0x0000001C.
controlCode (4 bytes): A 32bit unsigned integer containing the control code for this message. The value of this field MUST be equal to 0x0000007F.
targetResource (4 bytes): A 32bit unsigned integer. This field MUST be set to a valid resource handle referencing a resource of type TYPE_MESHGEOMETRY3D. This handle identifies the resource that is the target for this message.
PositionsCollectionSize (4 bytes): A 32bit unsigned integer. The size in bytes of the PositionsCollection array.
TextureCoordinatesCollectionSize (4 bytes): A 32bit unsigned integer. The size in bytes of the TextureCoordinatesCollection array.
TriangleIndicesCollectionSize (4 bytes): A 32bit unsigned integer. The size in bytes of the TriangleIndicesCollection array.
BlendColorsCollectionSize (4 bytes): A 32bit unsigned integer. The size in bytes of the BlendColorsCollection array.
PositionsCollection (variable): A variablelength array of Mil3DPoint structures. Contains the vertices of the mesh. The number of elements in this array MUST be equal to the value of the PositionsCollectionSize field divided by 24.
TextureCoordinatesCollection (variable): A variablelength array of MilPoint structures. Contains the coordinates that define the Brushtomesh mapping for each vertex. There MUST be exactly one per vertex. The number of elements in this array MUST be equal to the value of the TextureCoordinatesCollectionSize field divided by 16.
TriangleIndicesCollection (variable): A variablelength array of 32bit signed integers. Contains the indices into the Positions collection that define the triangles. If this collection is empty then the triangles are implicitly defined by each set of three vertices starting with the first, second and third, then the fourth, fifth and sixth, and so on. The number of elements in this array MUST be equal to the value of the TriangleIndicesCollectionSize field divided by 4.
BlendColorsCollection (variable): A variablelength array of 32bit integers. Contains the pervertex color that gets blended with the lighting result. These only work with DiffuseMaterial and there MUST be one per vertex. The number of elements in this array MUST be equal to the value of the BlendColorsCollectionSize field divided by 4.