예제 #1
0
    public virtual bool Load(LBinaryFile fs, uint version)
    {
        Normal = SLBinary.LoadVector3(fs);
        Dist   = fs.Reader.ReadSingle();
        int elenum = fs.Reader.ReadInt32();

        for (int i = 0; i < elenum; i++)
        {
            int vid = fs.Reader.ReadInt32();
            AddElement(vid);
        }
        return(true);
    }
예제 #2
0
    // Load and save method
    public bool Load(LBinaryFile fs)
    {
        Release();
        BoundAABB = SLBinary.LoadAABB(fs);
        Flags     = fs.Reader.ReadUInt32();
        int numsides = fs.Reader.ReadInt32();

        for (int i = 0; i < numsides; i++)
        {
            Vector3 normal = SLBinary.LoadVector3(fs);
            float   dist   = fs.Reader.ReadSingle();
            bool    bevel  = SLBinary.LoadBool(fs);
            CDSide  side   = new CDSide();
            side.Init(normal, dist, bevel);
            LstSides.Add(side);
        }

        return(true);
    }
예제 #3
0
    public virtual bool Load(LBinaryFile fs, uint version)
    {
        Reset();

        mFlags = fs.Reader.ReadUInt32();
        int vertnum = fs.Reader.ReadInt32();

        for (int i = 0; i < vertnum; i++)
        {
            Vector3 vec = SLBinary.LoadVector3(fs);
            mLstVertices.Add(vec);
        }
        int facenum = fs.Reader.ReadInt32();

        for (int i = 0; i < facenum; i++)
        {
            CovFace face = new CovFace();
            face.Load(fs, version);
            mLstCovFace.Add(face);
        }
        //mAABBDirty = true;

        return(true);
    }