Example #1
0
 protected static void checkIndexComponentIndicesInRange(AbstractMeshAttribute indexMeshComponent, int numberOfVertices)
 {
     AbstractMeshAttribute.Uint32Accessor accessor = indexMeshComponent.getUint32Accessor();
     for (int i = 0; i < indexMeshComponent.length; i++)
     {
         // TODO< should throw exception on missmatch >
         Debug.Assert(accessor[i].Length < numberOfVertices);
     }
 }
Example #2
0
        public VerticesWithAttributesAndIndex(AbstractMeshAttribute[] meshComponents, AbstractMeshAttribute indexMeshAttribute, int positionComponentIndex)
        {
            verticesAndAttributes = new VerticesWithAttributes(meshComponents, positionComponentIndex);

            this.protectedIndexMeshComponent = indexMeshAttribute;

            Debug.Assert(indexMeshAttribute.dataType == AbstractMeshAttribute.EnumDataType.UINT32);
            checkIndexComponentIndicesInRange(indexMeshAttribute, (int)numberOfVertices);
        }