Пример #1
0
        public void Save(SceneDataSaver saver)
        {
            var dataRowLength = 3 + _segmentsU;
            var totalRows     = _virtualPoints.Count / dataRowLength;

            saver.EmitObjectInfo(Scene.WorldObjectType.BSplineSurface, Name);
            saver.EmitInt(dataRowLength);
            saver.EmitInt(totalRows);
            saver.EmitChar(_folded ? 'C' : 'R');
            saver.EmitChar('H');
            saver.EmitEndOfLine();

            for (var row = 0; row < totalRows; ++row)
            {
                for (var column = 0; column < dataRowLength; ++column)
                {
                    var dataRow    = row;
                    var dataColumn = column;
                    var pos        = _virtualPoints[dataColumn
                                                    + dataRow * dataRowLength].SharedPoint;
                    saver.EmitInt(saver.CreateReferencePoint(pos));
                }
            }

            saver.EmitObjectDataEnd();
        }
Пример #2
0
        public void Save(SceneDataSaver saver)
        {
            saver.EmitObjectInfo(Scene.WorldObjectType.BSplineCurve, Name);
            saver.EmitInt(Objects.Count);

            foreach (var cp in Objects)
            {
                //var id = saver.GetWorldObjectId(cp.Reference);
                //saver.EmitInt(id);
            }

            saver.EmitObjectDataEnd();
        }