Class MyEnvironmentSector
  
  
  
  
    Inheritance
    System.Object
    
    MyEnvironmentSector
   
  
  
  
  Assembly: Sandbox.Game.dll
  Syntax
  
    public class MyEnvironmentSector : MyEntity, IMyEntity, IMyEntity
   
  Constructors
  
  
  
  
  MyEnvironmentSector()
  
  
  Declaration
  
    public MyEnvironmentSector()
   
  Properties
  
  
  
  
  Bounds
  
  
  Declaration
  
    public Vector3D[] Bounds { get; }
   
  Property Value
  
  
  
  
  DataView
  
  
  Declaration
  
    public MyEnvironmentDataView DataView { get; }
   
  Property Value
  
  
  
  
  EnvironmentDefinition
  
  
  Declaration
  
    public MyWorldEnvironmentDefinition EnvironmentDefinition { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | Sandbox.Game.WorldEnvironment.Definitions.MyWorldEnvironmentDefinition |  | 
    
  
  
  
  
  HasParallelWorkInProgress
  
  
  Declaration
  
    public bool HasParallelWorkInProgress { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  HasParallelWorkPending
  
  
  Declaration
  
    public bool HasParallelWorkPending { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  HasPhysics
  
  
  Declaration
  
    public bool HasPhysics { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  HasSerialWorkPending
  
  
  Declaration
  
    public bool HasSerialWorkPending { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  IsClosed
  
  
  Declaration
  
    public bool IsClosed { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  IsLoaded
  
  
  Declaration
  
    public bool IsLoaded { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  IsPendingLodSwitch
  
  
  Declaration
  
    public bool IsPendingLodSwitch { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  IsPendingPhysicsToggle
  
  
  Declaration
  
    public bool IsPendingPhysicsToggle { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  IsPinned
  
  
  Declaration
  
    public bool IsPinned { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  LodLevel
  
  
  Declaration
  
    public int LodLevel { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
  
  
  Owner
  
  
  Declaration
  
    public IMyEnvironmentOwner Owner { get; }
   
  Property Value
  
  
  
  
  SectorCenter
  
  
  Declaration
  
    public Vector3D SectorCenter { get; }
   
  Property Value
  
  
  
  
  SectorId
  
  
  Declaration
  
    public long SectorId { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int64 |  | 
    
  
  Methods
  
  
  
  
  
  
  
  Declaration
  
    public void add_OnContactPoint(MySectorContactEvent value)
   
  Parameters
  
  
  
  
  BuildInstanceBuffers(Int32)
  
  
  Declaration
  
    public void BuildInstanceBuffers(int lod)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | lod |  | 
    
  
  
  
  
  CancelParallel()
  
  
  Declaration
  
    public void CancelParallel()
   
  
  
  
  Close()
  
  
  Declaration
  
  
  
  
  Closing()
  
  
  Declaration
  
    protected override void Closing()
   
  Overrides
  
  
  
  
  DebugDraw()
  
  
  Declaration
  
  
  
  
  DoParallelWork()
  
  
  Declaration
  
    public void DoParallelWork()
   
  
  
  
  DoSerialWork()
  
  
  Declaration
  
    public bool DoSerialWork()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
  EnableItem(Int32, Boolean)
  
  
  Declaration
  
    public void EnableItem(int itemId, bool enabled)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
      
        | System.Boolean | enabled |  | 
    
  
  
  
  
  EnablePhysics(Boolean)
  
  
  Declaration
  
    public void EnablePhysics(bool physics)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | physics |  | 
    
  
  
  
  
  ForceLoadDataView()
  
  
  Declaration
  
    public void ForceLoadDataView()
   
  
  
  
  GetDefinition(Int32)
  
  
  Declaration
  
    public MyPhysicalModelDefinition GetDefinition(int itemId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
    
  
  Returns
  
  
  
  
  GetEnvironmentalItemDefinitionId(Int32)
  
  
  Declaration
  
    public string GetEnvironmentalItemDefinitionId(int itemId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  GetHashCode()
  
  
  Declaration
  
    public override int GetHashCode()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
  
  
  GetItemDefinitionId(Int32)
  
  
  Declaration
  
    public int GetItemDefinitionId(int itemId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
  
  
  GetItemFromShapeKey(UInt32)
  
  
  Declaration
  
    public int GetItemFromShapeKey(uint shapekey)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.UInt32 | shapekey |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
  
  
  GetItemInfo(Int32, out UInt32, out Int32)
  
  
  Declaration
  
    public void GetItemInfo(int itemId, out uint renderObjectId, out int instanceIndex)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
      
        | System.UInt32 | renderObjectId |  | 
      
        | System.Int32 | instanceIndex |  | 
    
  
  
  
  
  GetModelIndex(Int32)
  
  
  Declaration
  
    public short GetModelIndex(int itemId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int16 |  | 
    
  
  
  
  
  GetModule(Type)
  
  
  Declaration
  
    public IMyEnvironmentModuleProxy GetModule(Type moduleType)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Type | moduleType |  | 
    
  
  Returns
  
  
  
  
  GetModule<T>()
  
  
  Declaration
  
    public T GetModule<T>()
    where T : class, IMyEnvironmentModuleProxy
   
  Returns
  
  Type Parameters
  
  
  
  
  GetModuleForDefinition<T>(MyRuntimeEnvironmentItemInfo)
  
  
  Declaration
  
    public T GetModuleForDefinition<T>(MyRuntimeEnvironmentItemInfo itemEnvDefinition)
    where T : class, IMyEnvironmentModuleProxy
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Sandbox.Game.WorldEnvironment.Definitions.MyRuntimeEnvironmentItemInfo | itemEnvDefinition |  | 
    
  
  Returns
  
  Type Parameters
  
  
  
  
  Init(IMyEnvironmentOwner, ref MyEnvironmentSectorParameters)
  
  
  Declaration
  
    public void Init(IMyEnvironmentOwner owner, ref MyEnvironmentSectorParameters parameters)
   
  Parameters
  
  
  
  
  OnItemChange(Int32, Int16)
  
  
  Declaration
  
    public void OnItemChange(int index, short newModelIndex)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | index |  | 
      
        | System.Int16 | newModelIndex |  | 
    
  
  
  
  
  OnItemsChange(Int32, List<Int32>, Int16)
  
  
  Declaration
  
    public void OnItemsChange(int sector, List<int> indices, short newModelIndex)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | sector |  | 
      
        | System.Collections.Generic.List<System.Int32> | indices |  | 
      
        | System.Int16 | newModelIndex |  | 
    
  
  
  
  
  RaiseItemEvent<TModule>(TModule, Int32, Boolean)
  
  
  Declaration
  
    public void RaiseItemEvent<TModule>(TModule module, int item, bool fromClient = false)
    where TModule : IMyEnvironmentModuleProxy
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | TModule | module |  | 
      
        | System.Int32 | item |  | 
      
        | System.Boolean | fromClient |  | 
    
  
  Type Parameters
  
  
  
  
  RaiseItemEvent<TModule, TArgument>(TModule, Int32, TArgument, Boolean)
  
  
  Declaration
  
    public void RaiseItemEvent<TModule, TArgument>(TModule module, int item, TArgument eventData, bool fromClient = false)
    where TModule : IMyEnvironmentModuleProxy
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | TModule | module |  | 
      
        | System.Int32 | item |  | 
      
        | TArgument | eventData |  | 
      
        | System.Boolean | fromClient |  | 
    
  
  Type Parameters
  
    
      
        | Name | Description | 
    
    
      
        | TModule |  | 
      
        | TArgument |  | 
    
  
  
  
  
  RaiseOnLodCommitEvent(Int32)
  
  
  Declaration
  
    public void RaiseOnLodCommitEvent(int lod)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | lod |  | 
    
  
  
  
  
  RaiseOnPhysicsCommitEvent(Boolean)
  
  
  Declaration
  
    public void RaiseOnPhysicsCommitEvent(bool enabled)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | enabled |  | 
    
  
  
  
  
  ReEnableSectorItem(Int32)
  
  
  Declaration
  
    public void ReEnableSectorItem(int itemId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | itemId |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public void remove_OnContactPoint(MySectorContactEvent value)
   
  Parameters
  
  
  
  
  SetLod(Int32)
  
  
  Declaration
  
    public void SetLod(int lod)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | lod |  | 
    
  
  
  
  
  ToString()
  
  
  Declaration
  
    public override string ToString()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  Overrides
  
  Events
  
  
  
  
  
  
  Declaration
  
    public event MySectorContactEvent OnContactPoint
   
  Event Type
  
  
  
  OnLodCommit
  
  
  Declaration
  
    public event Action<MyEnvironmentSector, int> OnLodCommit
   
  Event Type
  
  
  
  OnPhysicsClose
  
  
  Declaration
  
    public event Action OnPhysicsClose
   
  Event Type
  
    
      
        | Type | Description | 
    
    
      
        | System.Action |  | 
    
  
  
  
  OnPhysicsCommit
  
  
  Declaration
  
    public event Action<MyEnvironmentSector, bool> OnPhysicsCommit
   
  Event Type
  
  Implements
  
  
  Extension Methods