// Initializes a 3D mesh to deform every frame private void InitializeMesh() { var vertices = _currentFaceModel.CalculateVerticesForAlignment( _currentFaceAlignment ); _triangleIndices = _currentFaceModel.TriangleIndices; for (int i = 0; i < _triangleIndices.Count; i += 3) { // Set the initial points to be blank // (will be updated immediately) for (int j = 0; j < 3; j++) { _polygonPoints.Add(Point3d.Origin); } // We want a 0 offset for each polygon _polygonPositions.Add(Point3d.Origin); // Although each has 3 sides, each has different lengths // so we treat them all seperately rather than instanced _numPolygonPositions.Add(1); // Each will have three vertices _numPolygonPoints.Add(3); // Let's go with a lighter grey outline for each face _outlineColors.Add( new EntityColor(ColorMethod.ByAci, 8) ); // And a darker grey fill _fillColors.Add( new EntityColor(ColorMethod.ByAci, 9) ); // Solid linestyle for the outline _outlineTypes.Add(Linetype.Solid); // And full opacity _fillOpacities.Add(new Transparency(255)); } }