Make the first face transparent
// Make the first face transparent and the rest
// different colors.
//
Adesk::UInt32 numFaces = (numRows - 1)
* (numCols - 1);
Adesk::UInt8 *pFaceVisArray =
new Adesk::UInt8[numFaces];
short *pFaceColorArray = new short[numFaces];
AcGiFaceData faceInfo;
faceInfo.setVisibility(pFaceVisArray);
for (i = 0; i < numFaces; i++) {
pFaceVisArray[i] =
i ? kAcGiVisible : kAcGiInvisible;
pFaceColorArray[i] = (short)(i + 1);
}
faceInfo.setColors(pFaceColorArray);
// If the fill type is kAcGiFillAlways, then a shell,
// mesh, or polygon will be interpreted as faces;
// otherwise, they will be interpreted as edges.
//
// Output mesh as faces.
//
pW->subEntityTraits().setFillType(kAcGiFillAlways);
pW->geometry().mesh(numRows, numCols, pVerts, NULL, &faceInfo);
// Output mesh as edges over the faces.
//
pW->subEntityTraits().setFillType(kAcGiFillNever);
pW->geometry().mesh(numRows, numCols, pVerts, &edgeInfo);
delete [] pVerts;
delete [] pEdgeColorArray;
delete [] pFaceColorArray;
delete [] pFaceVisArray;
return Adesk::kTrue;
}
Для лиц в сети, Вы можете прикреплять цвет, уровень, GS маркер, нормаль, и черты видимости. Чтобы назначать свойства на лица в сети, Вы перечисляете значения для лиц в порядке строк, как обозначено следующим рисунком:
Данные Вершины для сети перечислены в том же самом порядке как в списке вершины. Свойства, которые могут быть установлены с AcGiVertexData - нормали и ориентация.
Содержание Назад Вперед