MD2 (file Format) - Example

Example

This is an example of how to read a single frame and display it, written in pseudocode.

loop while $(int)index is less than $(int)num_tris texture_function_s $(float)texture_coordinates.textureindex ].s / skinwidth texture_function_t $(float)texture_coordinates.textureindex ].t / skinheight normal_function $(unsigned char)vertex.vertexindex ].lightnormalindex vertex_function_x ($(unsigned char)vertex.vertexindex ].v * scale) + translate vertex_function_y ($(unsigned char)vertex.vertexindex ].v * scale) + translate vertex_function_z ($(unsigned char)vertex.vertexindex ].v * scale) + translate $(int)index = $(int)index + 1 end loop

Read more about this topic:  MD2 (file Format)

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)