Esempio n. 1
0
        public Setup(uint setupID)
        {
            // make simple setup if gfxobj
            if (setupID >> 24 == 0x1)
            {
                MakeSimpleSetup(setupID);
                BuildBoundingBox();
                return;
            }

            _setup = DatManager.PortalDat.ReadFromDat <SetupModel>(setupID);

            Parts = new List <GfxObj>();

            foreach (var part in _setup.Parts)
            {
                Parts.Add(GfxObjCache.Get(part));
            }

            PlacementFrames = new List <Matrix>();

            foreach (var placementFrame in _setup.PlacementFrames[0].AnimFrame.Frames)
            {
                PlacementFrames.Add(placementFrame.ToXna());
            }

            BuildBoundingBox();
        }
Esempio n. 2
0
        public GfxObjInstance(uint gfxObjID)
        {
            GfxObj = GfxObjCache.Get(gfxObjID);

            Position = Vector3.Zero;
            Rotation = Quaternion.Identity;
            Scale    = Vector3.One;
        }
Esempio n. 3
0
        public void MakeSimpleSetup(uint gfxObjID)
        {
            _setup = SetupModel.CreateSimpleSetup();

            Parts = new List <GfxObj>(1);

            var gfxObj = GfxObjCache.Get(gfxObjID);

            Parts.Add(gfxObj);

            // always identity?
            PlacementFrames = new List <Matrix>(1);
            PlacementFrames.Add(Matrix.Identity);
        }