Exemple #1
0
        public static CrushPoint Load(DocumentParser file)
        {
            CrushPoint cp = new CrushPoint
            {
                VertexIndex = file.ReadInt(),
                LimitMin    = file.ReadVector3(),
                LimitMax    = file.ReadVector3(),
                SoftnessNeg = file.ReadVector3(),
                SoftnessPos = file.ReadVector3()
            };

            int neighbourCount = file.ReadInt();

            for (int i = 0; i < neighbourCount; i++)
            {
                cp.Neighbours.Add(CrushPointNeighbour.Load(file));
            }

            return(cp);
        }
Exemple #2
0
        public static Crush Load(DocumentParser file)
        {
            Crush crush = new Crush
            {
                SoftnessFactor = file.ReadSingle(),
                FoldFactor     = file.ReadVector2(),
                WibbleFactor   = file.ReadSingle(),
                LimitDeviant   = file.ReadSingle(),
                SplitChance    = file.ReadSingle(),
                MinYFoldDown   = file.ReadSingle()
            };

            int pointCount = file.ReadInt();

            for (int i = 0; i < pointCount; i++)
            {
                crush.Points.Add(CrushPoint.Load(file));
            }

            return(crush);
        }