Primitive ordering (index numbering)

Currently in a mesh a primitive § has an implicit index. Although most elements also have an implicit index it would be useful to add an explicit index (probably optional) to the primitive element.

The main reason for this is to more closely represent the authoring tool’s indexing of primitives into the collada file. For example:

<geometry id=“shape-lib” name=“shape”>
<source id=“shape-lib-Position”>
<polygons material="#material1" count=“2”>
<input semantic=“VERTEX” idx=“0” source="#shape-lib-Vertex"/>
<p idx=“0”>0 1 2</p>
<p idx=“2”>1 3 2</p>
<polygons material="#material2" count=“2”>
<input semantic=“VERTEX” idx=“0” source="#shape-lib-Vertex"/>
<p idx=“1”>4 5 6</p>
<p idx=“3”>5 7 6</p>

The above example has 4 primitives, 0, 1, 2, 3 where 0 and 2 use material1 and 1 and 3 use material2. So without expressing the index explicity the ordering of the primitives would be different than in the authoring tool. This can be very important when trying to trace problems back to the original primitive in an authoring tool.

If we were to add a feature to identify individual primitives it would probably be with a “name” attribute to be consistent with other parts of COLLADA.

The main reason that the

elements are terse and do not have attributes is because it is a high frequency part of the document and we want to minimize overhead in such places.