public InstancedModelBuffer(MyInstancedRenderSector parent, int modelId)
            {
                m_parent = parent;
                Model = modelId;

                MyModel modelData = MyModels.GetModelOnlyData(MyModel.GetById(Model));
                ModelBb = modelData.BoundingBox;
            }
            public InstancedModelBuffer(MyInstancedRenderSector parent, int modelId)
            {
                m_parent = parent;
                Model    = modelId;

                MyModel modelData = MyModels.GetModelOnlyData(MyModel.GetById(Model));

                ModelBb = modelData.BoundingBox;
            }
        public void Init(IMyEnvironmentOwner owner, ref MyEnvironmentSectorParameters parameters)
        {
            // Copy parameters in
            SectorCenter = parameters.Center;

            Bounds = parameters.Bounds;

            m_dataRange = parameters.DataRange;

            m_environment = (MyProceduralEnvironmentDefinition)parameters.Environment;

            EnvironmentDefinition = parameters.Environment;

            m_owner = owner;

            m_provider = parameters.Provider;

            // Compute appropriate render origin.
            Vector3D center = parameters.Center;

            owner.ProjectPointToSurface(ref center);

            if (!Engine.Platform.Game.IsDedicated)
            {
                m_render = new MyInstancedRenderSector(string.Format("{0}:Sector({1:X})", owner, parameters.SectorId), MatrixD.CreateTranslation(center));
            }

            SectorId = parameters.SectorId;

            BoundingBoxD worldBounds = BoundingBoxD.CreateInvalid();

            for (int i = 0; i < 8; ++i)
            {
                worldBounds.Include(Bounds[i]);
            }

            // Entity stuff
            PositionComp.SetPosition(parameters.Center);
            PositionComp.WorldAABB = worldBounds;

            // Add missing stuff
            AddDebugRenderComponent(new MyDebugRenderComponentEnvironmentSector(this));
            GameLogic = new MyNullGameLogicComponent();
            Save      = false;

            IsClosed = false;
        }