Matrix1 Utility Plug-ins

# MAKE OBJECT PLAIN

Syntax

MAKE OBJECT PLAIN Object number, Width, Depth, Columns, Rows MAKE OBJECT PLAIN Object number, Width, Depth, Columns, Rows, FVF MAKE OBJECT PLAIN Object number, Width, Depth, Columns, Rows, LimbsX, LimbsZ MAKE OBJECT PLAIN Object number, Width, Depth, Columns, Rows, LimbsX, LimbsZ, FVF

Description

These commands can be used to create a multi-vertex plain. The original DBPro command creates a plain out of 2 triangles. These command will create a plain out of many triangles. Any plain created can only have up to 65536 vertices or the command will fail. The number of vertices is calculated as (Columns+1)*(Rows+1). The first command will create a plain with an FVF setting of 274, while the second command will use the value you have specified. The object will be populated with the following data: - Position - Normal (set to 0, 1, 0) - Diffuse (set to all white, full alpha) - texture coordinates for texture layer 1 (evenly spread across the object) All other values will be set to zero. The 'origin' of the plain will be set to the centre of the plain. By default, the first vertex is in the far left corner of the plain (when looking along the objects z axis). The next vertex position is to its right, and so on until the end of the row. At that point, the vertex position is reset back to the left side, and moved one row nearer the negative side of the z axis. If the Width is specified as a negative number, then the vertices are reordered to start on the right and to advance to the left. If the Depth is specified as a negative number, then the vertices are reordered to start at the nearest point on the z axis and to advance towards the positive size of the z axis. Both Width and Depth can be any combination of negative/positive value and the object will be created correctly. In any combination, the object produced will be visible from above, but culled when looked at from below, unless you have changed the objects cull setting. Constants for all allowable FVF settings: #constant FVF_XYZ = 0x002 #constant FVF_XYZRHW = 0x004 #constant FVF_XYZB1 = 0x006 #constant FVF_XYZB2 = 0x008 #constant FVF_XYZB3 = 0x00a #constant FVF_XYZB4 = 0x00c #constant FVF_XYZB5 = 0x00e #constant FVF_NORMAL = 0x010 #constant FVF_PSIZE = 0x020 #constant FVF_DIFFUSE = 0x040 #constant FVF_SPECULAR = 0x080 #constant FVF_TEX0 = 0x000 #constant FVF_TEX1 = 0x100 #constant FVF_TEX2 = 0x200 #constant FVF_TEX3 = 0x300 #constant FVF_TEX4 = 0x400 #constant FVF_TEX5 = 0x500 #constant FVF_TEX6 = 0x600 #constant FVF_TEX7 = 0x700 #constant FVF_TEX8 = 0x800

Go back to ...

Matrix1Util_18 Commands Menu
Matrix1 Utils Main Index
Matrix1 Utils Command List
Commands Menu
Main Menu

Copyright © Ian Mold - Matrix1 Software 2006 - 2011