Matrix1 Utility Plug-ins

# ADD NEW LIMB

Syntax

ADD NEW LIMB VertexCount, IndexCount ADD NEW LIMB VertexCount, IndexCount, Fvf ADD NEW LIMB VertexCount, IndexCount, Fvf, InitialiseBuffers LimbId = ADD NEW LIMB ( VertexCount, IndexCount ) LimbId = ADD NEW LIMB ( VertexCount, IndexCount, Fvf ) LimbId = ADD NEW LIMB ( VertexCount, IndexCount, Fvf, InitialiseBuffers ) LimbId = ADD NEW LIMB ( )

Description

This command adds a new blank limb to the complex object. The command will create the limb with the number of Vertices and Indices requested, and the Fvf set. If one of the forms without an Fvf value is used, the default value of 274 will be used. The function form of this command will return a limb id that can be used by a later limb to set as a parent limb (SET NEW LIMB PARENT). This id will become useless after the object has been finalised and should not be used beyond that point. If the Index count is not 0, then it needs to be a multiple of 3, as 3 points are required for each polygon. If the Index count is 0, then the Vertex count needs to be a multiple of 3 for the same reason. Note that unlike the other object creation commands in this plug-in, it is legal and safe to create a limb with no vertices. This new limb can then be used as a parent to other limbs. There is a version of the function specifically for this circumstance (shown last in the usage list). The InitialiseBuffers parameter allows you to skip initialising the buffers with zeros by using an Initialise value of 0 - use only when you are going to immediately set the values yourself using the VERTEXDATA commands. 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