Share via


2.2.7.82 MILCMD_MESHGEOMETRY2D

This message updates all properties of a resource of type TYPE_MESHGEOMETRY2D. This resource represents a mesh that draws a 2-D shape by defining vertices and triangles.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

messageSize

controlCode

targetResource

PositionsCollectionSize

TextureCoordinatesCollectionSize

VertexOpacitiesCollectionSize

TriangleIndicesCollectionSize

PositionsCollection (variable)

...

TextureCoordinatesCollection (variable)

...

VertexOpacitiesCollection (variable)

...

TriangleIndicesCollection (variable)

...

messageSize (4 bytes): A 32-bit 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 32-bit unsigned integer containing the control code for this message. The value of this field MUST be equal to 0x00000080.

targetResource (4 bytes): A 32-bit unsigned integer. This field MUST be set to a valid resource handle referencing a resource of type TYPE_MESHGEOMETRY2D. This handle identifies the resource that is the target for this message.

PositionsCollectionSize (4 bytes): A 32-bit unsigned integer. The size in bytes of the PositionsCollection array.

TextureCoordinatesCollectionSize (4 bytes): A 32-bit unsigned integer. The size in bytes of the TextureCoordinatesCollection array.

VertexOpacitiesCollectionSize (4 bytes): A 32-bit unsigned integer. The size in bytes of the VertexOpacitiesCollection array.

TriangleIndicesCollectionSize (4 bytes): A 32-bit unsigned integer. The size in bytes of the TriangleIndicesCollection array.

PositionsCollection (variable): A variable-length array of Mil3DPoint structures. Contains the vertices on 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 variable-length array of MilPoint structures. Contains the coordinates that define the brush-to-mesh 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.

VertexOpacitiesCollection (variable): A variable-length array of 32-bit integers. Contains the opacity of each vertex in the mesh. There MUST be exactly one per vertex. The number of elements in this array MUST be equal to the value of the VertexOpacitiesCollectionSize field divided by 4.

TriangleIndicesCollection (variable): A variable-length array of 32-bit 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.