コード例 #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();
        }
コード例 #2
0
ファイル: GfxObjInstance.cs プロジェクト: havalina1/ACViewer
        public GfxObjInstance(uint gfxObjID)
        {
            GfxObj = GfxObjCache.Get(gfxObjID);

            Position = Vector3.Zero;
            Rotation = Quaternion.Identity;
            Scale    = Vector3.One;
        }
コード例 #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);
        }