示例#1
0
        //#######################################################################################
        //# Box
        //#######################################################################################

        private static void ReadBox(BinaryReader br)
        {
            Model.Box box        = new Model.Box();
            Version   version    = GetVersion(ReadLong(br));
            long      attributes = ReadLong(br);
            string    name       = ReadLongFixedString(br);
            Vector4   color      = ReadRGBA(br);

            box.center = ReadVector(br);
            box.extend = ReadVector(br);

            model.box = box;
        }
示例#2
0
        public BoxView(GraphicsDevice device, View.Camera camera)
        {
            this.box = new Model.Box ();
            this.line = new View.LineDrawer (device);
            this.camera = camera;

            /*
            this.box.Top = this.camera.BoxMargin + this.camera.BoxWindowDisplacement.Y;
            this.box.Bottom = this.camera.BoxMargin + this.camera.BoxSize + this.camera.BoxWindowDisplacement.Y;
            this.box.Left = this.camera.BoxMargin + this.camera.BoxWindowDisplacement.X;
            this.box.Right = this.camera.BoxMargin + this.camera.BoxSize + this.camera.BoxWindowDisplacement.X;
            */

            this.box.Top = this.camera.BoxMargin;
            this.box.Bottom = device.Viewport.Height - this.camera.BoxMargin;
            this.box.Left = this.camera.BoxMargin;
            this.box.Right = device.Viewport.Width - this.camera.BoxMargin;
        }
示例#3
0
        //#######################################################################################
        //# Box
        //#######################################################################################
        private static void ReadBox(BinaryReader br)
        {
            Model.Box box = new Model.Box();
            Version version = GetVersion(ReadLong(br));
            long attributes = ReadLong(br);
            string name = ReadLongFixedString(br);
            Vector4 color = ReadRGBA(br);
            box.center = ReadVector(br);
            box.extend = ReadVector(br);

            model.box = box;
        }