Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | Events | List of all members
Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems Class Reference

Base class for collecting environment items (of one type) in entity. Useful for drawing of instanced data, or physical shapes instances. More...

Inheritance diagram for Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems:
VRage.Game.Entity.MyEntity VRage.Network.IMyEventProxy VRage.ModAPI.IMyEntity VRage.Network.IMyEventOwner VRage.Game.ModAPI.Ingame.IMyEntity Sandbox.Game.Entities.EnvironmentItems.MyDestroyableItems Sandbox.Game.Entities.EnvironmentItems.MyTrees

Classes

struct  ItemInfo
 
struct  MyEnvironmentItemData
 
class  MyEnvironmentItemsSpawnData
 

Public Member Functions

 MyEnvironmentItems ()
 
override void Init (MyObjectBuilder_EntityBase objectBuilder)
 
override MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 Gets object builder from object. More...
 
void UnloadGraphics ()
 
void ClosePhysics (MyEnvironmentItemsSpawnData data)
 
void PrepareItemsGraphics ()
 
void PrepareItemsPhysics (MyEnvironmentItemsSpawnData spawnData)
 
bool IsValidPosition (Vector3D position)
 
void BeginBatch (bool sync)
 
void BatchAddItem (Vector3D position, MyStringHash subtypeId, bool sync)
 
void BatchModifyItem (int localId, MyStringHash subtypeId, bool sync)
 
void BatchRemoveItem (int localId, bool sync)
 
void EndBatch (bool sync)
 
bool ModifyItemModel (int itemInstanceId, MyStringHash newSubtypeId, bool updateSector, bool sync)
 
bool TryGetItemInfoById (int itemId, out ItemInfo result)
 
void GetPhysicalItemsInRadius (Vector3D position, float radius, List< ItemInfo > result)
 
void GetAllItemsInRadius (Vector3D point, float radius, List< ItemInfo > output)
 
void GetItemsInSector (Vector3I sectorId, List< ItemInfo > output)
 
int GetItemsCount (MyStringHash id)
 
void GetSectorsInRadius (Vector3D position, float radius, List< MyEnvironmentSector > sectors)
 
void GetSectorIdsInRadius (Vector3D position, float radius, List< Vector3I > sectorIds)
 
void RemoveItemsAroundPoint (Vector3D point, double radius)
 
bool RemoveItem (int itemInstanceId, bool sync, bool immediateUpdate=true)
 
void RemoveItemsOfSubtype (HashSet< MyStringHash > subtypes)
 
virtual void DoDamage (float damage, int instanceId, Vector3D position, Vector3 normal, MyStringHash type)
 Default implementation does nothing. If you want env. items to react to damage, subclass this. More...
 
void DestroyItemAndCreateDebris (Vector3D position, Vector3 normal, double energy, int itemId)
 
void GetItems (ref Vector3D point, List< Vector3D > output)
 
void GetItemsInRadius (ref Vector3D point, float radius, List< Vector3D > output)
 
bool HasItem (int localId)
 
void GetAllItems (List< ItemInfo > output)
 
void GetItemsInSector (ref Vector3D point, List< ItemInfo > output)
 
MyEnvironmentSector GetSector (ref Vector3D worldPosition)
 
MyEnvironmentSector GetSector (ref Vector3I sectorId)
 
Vector3I GetSectorId (ref Vector3D worldPosition)
 
override void UpdateAfterSimulation100 ()
 
int GetItemInstanceId (uint shapeKey)
 
bool IsItemEnabled (int localId)
 
MyStringHash GetItemSubtype (int localId)
 
MyEnvironmentItemDefinition GetItemDefinition (int itemInstanceId)
 
MyEnvironmentItemDefinition GetItemDefinitionFromShapeKey (uint shapeKey)
 
bool GetItemWorldMatrix (int itemInstanceId, out MatrixD worldMatrix)
 
- Public Member Functions inherited from VRage.Game.Entity.MyEntity
void DebugDraw ()
 
void DebugDrawInvalidTriangles ()
 
void AddDebugRenderComponent (MyDebugRenderComponentBase render)
 
void ClearDebugRenderComponents ()
 
MyEntity GetTopMostParent (Type type=null)
 Return top most parent of this entity More...
 
virtual List< MyHudEntityParamsGetHudParams (bool allowBlink)
 
 MyEntity ()
 
 MyEntity (bool initComponents=true)
 Initializes a new instance of the MyEntity class. More...
 
void CreateSync ()
 
MyEntitySubpart GetSubpart (string name)
 
bool TryGetSubpart (string name, out MyEntitySubpart subpart)
 
virtual void UpdateOnceBeforeFrame ()
 
virtual void UpdateBeforeSimulation ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdatingStopped ()
 
virtual void UpdateBeforeSimulation10 ()
 Called each 10th frame if registered for update10 More...
 
virtual void UpdateAfterSimulation10 ()
 
virtual void UpdateBeforeSimulation100 ()
 Called each 100th frame if registered for update100 More...
 
virtual string GetFriendlyName ()
 
virtual MatrixD GetViewMatrix ()
 
void SetSpeedsAccordingToServerValues ()
 
virtual void SetWorldMatrix (MatrixD worldMatrix, bool forceUpdate=false, bool updateChildren=true)
 
virtual void DebugDrawPhysics ()
 Draw physical representation of entity More...
 
virtual bool GetIntersectionWithLine (ref LineD line, out Vector3D?v, bool useCollisionModel=true, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
virtual bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?t, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
virtual Vector3D GetIntersectionWithLineAndBoundingSphere (ref LineD line, float boundingSphereRadiusMultiplier)
 
virtual bool GetIntersectionWithSphere (ref BoundingSphereD sphere)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 
virtual bool DoOverlapSphereTest (float sphereRadius, Vector3D spherePos)
 
double GetSmallestDistanceBetweenCameraAndBoundingSphere ()
 
double GetLargestDistanceBetweenCameraAndBoundingSphere ()
 
double GetDistanceBetweenCameraAndBoundingSphere ()
 
double GetDistanceBetweenPlayerPositionAndBoundingSphere ()
 
double GetDistanceBetweenCameraAndPosition ()
 
virtual MyEntity GetBaseEntity ()
 
virtual void OnAddedToScene (object source)
 Called when [activated] which for entity means that was added to scene. More...
 
virtual void OnRemovedFromScene (object source)
 
void AddToGamePruningStructure ()
 
void RemoveFromGamePruningStructure ()
 
void UpdateGamePruningStructure ()
 
void RaisePhysicsChanged ()
 
void HackyComponentInitByMiroPleaseDontUseEver (MyDefinitionId id)
 DONT USE THIS METHOD, EVER! More...
 
virtual void Init (StringBuilder displayName, string model, MyEntity parentObject, float?scale, string modelCollision=null)
 
virtual void RefreshModels (string model, string modelCollision)
 
void Delete ()
 Every object must have this method, but not every phys object must necessarily have something to cleanup More...
 
void Close ()
 This method marks this entity for close which means, that Close will be called after all entities are updated More...
 
virtual void BeforeSave ()
 Called before method GetObjectBuilder, when saving sector More...
 
virtual void PrepareForDraw ()
 Method is called defacto from Update, preparation fo Draw More...
 
virtual void BeforePaste ()
 
virtual void AfterPaste ()
 
void SetEmissiveParts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on entity. More...
 
void SetEmissivePartsForSubparts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on all entity subparts. More...
 
override string ToString ()
 
virtual MyInventoryBase GetInventoryBase (int index)
 Search for inventory component with maching index. More...
 
MyInventoryBase GetInventoryBase ()
 Simply get the MyInventoryBase component stored in this entity. More...
 
delegate MyObjectBuilder_EntityBase MyEntityFactoryCreateObjectBuilderDelegate (MyEntity entity)
 
delegate MySyncComponentBase CreateDefaultSyncEntityDelegate (MyEntity thisEntity)
 
delegate bool MyWeldingGroupsGroupExistsDelegate (MyEntity entity)
 
virtual void SerializeControls (BitStream stream)
 
virtual void DeserializeControls (BitStream stream, bool outOfOrder)
 
virtual void ApplyLastControls ()
 
- Public Member Functions inherited from VRage.ModAPI.IMyEntity
bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?tri, IntersectionFlags flags)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, System.Collections.Generic.List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 

Static Public Member Functions

static MyEnvironmentItemsSpawnData BeginSpawn (MyEnvironmentItemsDefinition itemsDefinition, bool addToScene=true, long withEntityId=0)
 Spawn Environment Items instance (e.g. forest) object which can be then used for spawning individual items (e.g. trees). More...
 
static bool SpawnItem (MyEnvironmentItemsSpawnData spawnData, MyEnvironmentItemDefinition itemDefinition, Vector3D position, Vector3D up, int userdata=-1, bool silentOverlaps=true)
 Spawn environment item with the definition subtype on world position. More...
 
static void EndSpawn (MyEnvironmentItemsSpawnData spawnData, bool updateGraphics=true, bool updatePhysics=true)
 Ends spawning - finishes preparetion of items data. More...
 
static string GetModelName (MyStringHash itemSubtype)
 
static int GetModelId (MyStringHash subtypeId)
 

Public Attributes

Vector3 BaseColor
 
Vector2 ColorSpread
 
- Public Attributes inherited from VRage.Game.Entity.MyEntity
MyDefinitionId DefinitionId = null
 
string Name
 
bool DebugAsyncLoading
 
DebugCreatedBy DebugCreatedBy
 
float m_massChangeForCollisions = 1f
 
Vector3D m_serverPosition = new Vector3D()
 
Quaternion m_serverOrientation = new Quaternion()
 
MatrixD m_serverWorldMatrix = new MatrixD()
 
Vector3 m_serverLinearVelocity
 
Vector3 m_serverAngularVelocity
 
bool m_positionResetFromServer
 
bool SentFromServer
 
int GamePruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
int TopMostPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
bool StaticForPruningStructure = false
 
int TargetPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
Dictionary< IMyReplicable, Action > ReadyForReplicationAction = new Dictionary<IMyReplicable, Action>()
 

Protected Member Functions

bool RemoveItem (int itemInstanceId, int physicsInstanceId, bool sync, bool immediateUpdate)
 
bool RemoveNonPhysicalItem (int itemInstanceId, bool sync, bool immediateUpdate)
 
virtual void OnRemoveItem (int localId, ref Matrix matrix, MyStringHash myStringId, int userData)
 
virtual MyEntity DestroyItem (int itemInstanceId)
 
override void ClampToWorld ()
 
- Protected Member Functions inherited from VRage.Game.Entity.MyEntity
virtual bool CanBeAddedToRender ()
 
virtual MySyncComponentBase OnCreateSync ()
 
virtual void BeforeDelete ()
 
virtual void Closing ()
 
virtual void OnInventoryComponentAdded (MyInventoryBase inventory)
 
virtual void OnInventoryComponentRemoved (MyInventoryBase inventory)
 

Protected Attributes

readonly Dictionary< int, MyEnvironmentItemDatam_itemsData = new Dictionary<int, MyEnvironmentItemData>()
 
readonly Dictionary< int, int > m_physicsShapeInstanceIdToLocalId = new Dictionary<int, int>()
 
readonly Dictionary< int, int > m_localIdToPhysicsShapeInstanceId = new Dictionary<int, int>()
 
readonly Dictionary< Vector3I, MyEnvironmentSectorm_sectors = new Dictionary<Vector3I, MyEnvironmentSector>(Vector3I.Comparer)
 
List< HkdShapeInstanceInfo > m_childrenTmp = new List<HkdShapeInstanceInfo>()
 
- Protected Attributes inherited from VRage.Game.Entity.MyEntity
List< MyHudEntityParamsm_hudParams
 
MyModel m_modelCollision
 

Static Protected Attributes

static readonly Dictionary< MyStringHash, int > m_subtypeToModels = new Dictionary<MyStringHash, int>(MyStringHash.Comparer)
 
static List< HkBodyCollision > m_tmpResults = new List<HkBodyCollision>()
 
static List< MyEnvironmentSectorm_tmpSectors = new List<MyEnvironmentSector>()
 

Properties

Dictionary< Vector3I, MyEnvironmentSectorSectors [get]
 
MyEnvironmentItemsDefinition Definition [get]
 
bool IsBatching [get]
 
float BatchTime [get]
 
new MyPhysicsBody Physics [get, set]
 
Vector3D CellsOffset [get, set]
 
- Properties inherited from VRage.Game.Entity.MyEntity
MyEntityComponentContainer Components [get]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyGameLogicComponent GameLogic [get, set]
 
long EntityId [get, set]
 Entity id, can be set by subclasses (for example when using pool...) More...
 
MySyncComponentBase SyncObject [get, protected set]
 
MyModStorageComponentBase Storage [get, set]
 
bool Closed [get, protected set]
 
bool MarkedForClose [get, protected set]
 
virtual float MaxGlassDistSq [get]
 
bool Save [get, set]
 
bool IsPreview [get, set]
 
bool IsReadyForReplication [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
MatrixD WorldMatrix [get, set]
 
MyEntity Parent [get]
 Gets or sets the parent. More...
 
MyHierarchyComponent< MyEntityHierarchy [get, set]
 
MyPhysicsComponentBase Physics [get, set]
 Gets the physic component of the entity. More...
 
bool InvalidateOnMove [get, set]
 
bool SyncFlag [get, set]
 
bool InScene [get, set]
 
virtual bool IsVolumetric [get]
 
virtual Vector3D LocationForHudMarker [get]
 
MyModel Model [get]
 
MyModel ModelCollision [get]
 
string DisplayName [get, set]
 
string DebugName [get]
 
Dictionary< string, MyEntitySubpartSubparts [get]
 
virtual bool IsCCDForProjectiles [get]
 
int InventoryCount [get]
 Iterate through inventories and return their count. More...
 
bool HasInventory [get]
 Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventoryBase() != null. More...
 
virtual String DisplayNameText [get, set]
 Display Name for GUI etc. Override in descendant classes. Usually used to display in terminal or inventory controls. More...
 
EntityFlags Flags [get, set]
 
- Properties inherited from VRage.ModAPI.IMyEntity
MyEntityComponentContainer Components [get]
 
MyPhysicsComponentBase Physics [get, set]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyEntityComponentBase GameLogic [get, set]
 
MyHierarchyComponentBase Hierarchy [get, set]
 
MySyncComponentBase SyncObject [get]
 
MyModStorageComponentBase Storage [get, set]
 Custom storage for mods. Shared with all mods. More...
 
EntityFlags Flags [get, set]
 
long EntityId [get, set]
 
string Name [get, set]
 
bool MarkedForClose [get]
 
bool Closed [get]
 
bool DebugAsyncLoading [get]
 
bool Save [get, set]
 
MyPersistentEntityFlags2 PersistentFlags [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
IMyEntity Parent [get]
 
Matrix LocalMatrix [get, set]
 
bool NearFlag [get, set]
 
bool CastShadows [get, set]
 
bool FastCastShadowResolve [get, set]
 
bool NeedsResolveCastShadow [get, set]
 
float MaxGlassDistSq [get]
 
bool NeedsDraw [get, set]
 
bool NeedsDrawFromParent [get, set]
 
bool Transparent [get, set]
 
bool ShadowBoxLod [get, set]
 
bool SkipIfTooSmall [get, set]
 
bool Visible [get, set]
 
bool InScene [get, set]
 
bool InvalidateOnMove [get]
 
new VRageMath.MatrixD WorldMatrix [get, set]
 
VRageMath.MatrixD WorldMatrixInvScaled [get]
 
VRageMath.MatrixD WorldMatrixNormalizedInv [get]
 
bool IsVolumetric [get]
 
BoundingBox LocalAABB [get, set]
 
BoundingBox LocalAABBHr [get]
 
BoundingSphere LocalVolume [get, set]
 
Vector3 LocalVolumeOffset [get, set]
 
Vector3 LocationForHudMarker [get]
 
bool IsCCDForProjectiles [get]
 
string DisplayName [get, set]
 
- Properties inherited from VRage.Game.ModAPI.Ingame.IMyEntity
MyEntityComponentContainer Components [get]
 
long EntityId [get]
 
VRageMath.BoundingBoxD WorldAABB [get]
 
VRageMath.BoundingBoxD WorldAABBHr [get]
 
VRageMath.MatrixD WorldMatrix [get]
 
VRageMath.BoundingSphereD WorldVolume [get]
 
VRageMath.BoundingSphereD WorldVolumeHr [get]
 

Events

Action< MyEnvironmentItems, ItemInfoItemAdded
 
Action< MyEnvironmentItems, ItemInfoItemRemoved
 
Action< MyEnvironmentItems, ItemInfoItemModified
 
Action< MyEnvironmentItemsBatchEnded
 
- Events inherited from VRage.Game.Entity.MyEntity
Action< MyEntityOnMarkForClose
 This event may not be invoked at all, when calling MyEntities.CloseAll, marking is bypassed More...
 
Action< MyEntityOnClose
 
Action< MyEntityOnClosing
 
Action< MyEntityOnPhysicsChanged
 
- Events inherited from VRage.ModAPI.IMyEntity
Action< IMyEntityOnClose
 
Action< IMyEntityOnClosing
 
Action< IMyEntityOnMarkForClose
 
Action< IMyEntityOnPhysicsChanged
 

Additional Inherited Members

- Static Public Attributes inherited from VRage.Game.Entity.MyEntity
static Action< MyEntityAddToGamePruningStructureExtCallBack = null
 
static Action< MyEntityRemoveFromGamePruningStructureExtCallBack = null
 
static Action< MyEntityUpdateGamePruningStructureExtCallBack = null
 
static MyEntityFactoryCreateObjectBuilderDelegate MyEntityFactoryCreateObjectBuilderExtCallback = null
 
static CreateDefaultSyncEntityDelegate CreateDefaultSyncEntityExtCallback
 
static Action< MyEntityMyWeldingGroupsAddNodeExtCallback = null
 
static Action< MyEntityMyWeldingGroupsRemoveNodeExtCallback = null
 
static Action< MyEntity, List< MyEntity > > MyWeldingGroupsGetGroupNodesExtCallback = null
 
static MyWeldingGroupsGroupExistsDelegate MyWeldingGroupsGroupExistsExtCallback = null
 
static Action< MyEntityMyProceduralWorldGeneratorTrackEntityExtCallback = null
 
static Action< MyEntityCreateStandardRenderComponentsExtCallback = null
 
static Action< MyComponentContainer, MyObjectBuilderType, MyStringHash, MyObjectBuilder_ComponentContainerInitComponentsExtCallback = null
 
static Func< MyObjectBuilder_EntityBase, bool, MyEntityMyEntitiesCreateFromObjectBuilderExtCallback = null
 
- Static Protected Member Functions inherited from VRage.Game.Entity.MyEntity
static void UpdateNamedEmissiveParts (uint renderObjectId, string emissiveName, Color emissivePartColor, float emissivity)
 

Detailed Description

Base class for collecting environment items (of one type) in entity. Useful for drawing of instanced data, or physical shapes instances.

Definition at line 46 of file MyEnvironmentItems.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.MyEnvironmentItems ( )
inline

Definition at line 156 of file MyEnvironmentItems.cs.

Member Function Documentation

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BatchAddItem ( Vector3D  position,
MyStringHash  subtypeId,
bool  sync 
)
inline

Definition at line 569 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BatchModifyItem ( int  localId,
MyStringHash  subtypeId,
bool  sync 
)
inline

Definition at line 581 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BatchRemoveItem ( int  localId,
bool  sync 
)
inline

Definition at line 593 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BeginBatch ( bool  sync)
inline

Definition at line 561 of file MyEnvironmentItems.cs.

static MyEnvironmentItemsSpawnData Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BeginSpawn ( MyEnvironmentItemsDefinition  itemsDefinition,
bool  addToScene = true,
long  withEntityId = 0 
)
inlinestatic

Spawn Environment Items instance (e.g. forest) object which can be then used for spawning individual items (e.g. trees).

Definition at line 265 of file MyEnvironmentItems.cs.

override void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ClampToWorld ( )
inlineprotectedvirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1323 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ClosePhysics ( MyEnvironmentItemsSpawnData  data)
inline

Definition at line 347 of file MyEnvironmentItems.cs.

virtual MyEntity Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.DestroyItem ( int  itemInstanceId)
inlineprotectedvirtual
void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.DestroyItemAndCreateDebris ( Vector3D  position,
Vector3  normal,
double  energy,
int  itemId 
)
inline

Definition at line 1128 of file MyEnvironmentItems.cs.

virtual void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.DoDamage ( float  damage,
int  instanceId,
Vector3D  position,
Vector3  normal,
MyStringHash  type 
)
inlinevirtual

Default implementation does nothing. If you want env. items to react to damage, subclass this.

Reimplemented in Sandbox.Game.Entities.EnvironmentItems.MyTrees, and Sandbox.Game.Entities.EnvironmentItems.MyDestroyableItems.

Definition at line 1068 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.EndBatch ( bool  sync)
inline

Definition at line 605 of file MyEnvironmentItems.cs.

static void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.EndSpawn ( MyEnvironmentItemsSpawnData  spawnData,
bool  updateGraphics = true,
bool  updatePhysics = true 
)
inlinestatic

Ends spawning - finishes preparetion of items data.

Definition at line 309 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetAllItems ( List< ItemInfo output)
inline

Definition at line 1259 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetAllItemsInRadius ( Vector3D  point,
float  radius,
List< ItemInfo output 
)
inline

Definition at line 772 of file MyEnvironmentItems.cs.

MyEnvironmentItemDefinition Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemDefinition ( int  itemInstanceId)
inline

Definition at line 1355 of file MyEnvironmentItems.cs.

MyEnvironmentItemDefinition Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemDefinitionFromShapeKey ( uint  shapeKey)
inline

Definition at line 1363 of file MyEnvironmentItems.cs.

int Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemInstanceId ( uint  shapeKey)
inline

Definition at line 1328 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItems ( ref Vector3D  point,
List< Vector3D output 
)
inline

Definition at line 1234 of file MyEnvironmentItems.cs.

int Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemsCount ( MyStringHash  id)
inline

Definition at line 790 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemsInRadius ( ref Vector3D  point,
float  radius,
List< Vector3D output 
)
inline

Definition at line 1244 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemsInSector ( Vector3I  sectorId,
List< ItemInfo output 
)
inline

Definition at line 782 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemsInSector ( ref Vector3D  point,
List< ItemInfo output 
)
inline

Definition at line 1267 of file MyEnvironmentItems.cs.

MyStringHash Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemSubtype ( int  localId)
inline

Definition at line 1350 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetItemWorldMatrix ( int  itemInstanceId,
out MatrixD  worldMatrix 
)
inline

Definition at line 1375 of file MyEnvironmentItems.cs.

static int Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetModelId ( MyStringHash  subtypeId)
inlinestatic

Definition at line 362 of file MyEnvironmentItems.cs.

static string Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetModelName ( MyStringHash  itemSubtype)
inlinestatic

Definition at line 356 of file MyEnvironmentItems.cs.

override MyObjectBuilder_EntityBase Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetObjectBuilder ( bool  copy = false)
inlinevirtual

Gets object builder from object.

Returns

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 229 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetPhysicalItemsInRadius ( Vector3D  position,
float  radius,
List< ItemInfo result 
)
inline

Definition at line 741 of file MyEnvironmentItems.cs.

MyEnvironmentSector Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetSector ( ref Vector3D  worldPosition)
inline

Definition at line 1277 of file MyEnvironmentItems.cs.

MyEnvironmentSector Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetSector ( ref Vector3I  sectorId)
inline

Definition at line 1289 of file MyEnvironmentItems.cs.

Vector3I Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetSectorId ( ref Vector3D  worldPosition)
inline

Definition at line 1300 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetSectorIdsInRadius ( Vector3D  position,
float  radius,
List< Vector3I sectorIds 
)
inline

Definition at line 815 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.GetSectorsInRadius ( Vector3D  position,
float  radius,
List< MyEnvironmentSector sectors 
)
inline

Definition at line 801 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.HasItem ( int  localId)
inline

Definition at line 1254 of file MyEnvironmentItems.cs.

override void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.Init ( MyObjectBuilder_EntityBase  objectBuilder)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 165 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.IsItemEnabled ( int  localId)
inline

Definition at line 1345 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.IsValidPosition ( Vector3D  position)
inline

Definition at line 556 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ModifyItemModel ( int  itemInstanceId,
MyStringHash  newSubtypeId,
bool  updateSector,
bool  sync 
)
inline

Definition at line 671 of file MyEnvironmentItems.cs.

virtual void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.OnRemoveItem ( int  localId,
ref Matrix  matrix,
MyStringHash  myStringId,
int  userData 
)
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.EnvironmentItems.MyTrees.

Definition at line 1012 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.PrepareItemsGraphics ( )
inline

Definition at line 489 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.PrepareItemsPhysics ( MyEnvironmentItemsSpawnData  spawnData)
inline

Definition at line 498 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.RemoveItem ( int  itemInstanceId,
bool  sync,
bool  immediateUpdate = true 
)
inline

Definition at line 886 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.RemoveItem ( int  itemInstanceId,
int  physicsInstanceId,
bool  sync,
bool  immediateUpdate 
)
inlineprotected

Definition at line 902 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.RemoveItemsAroundPoint ( Vector3D  point,
double  radius 
)
inline

Definition at line 829 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.RemoveItemsOfSubtype ( HashSet< MyStringHash subtypes)
inline

Definition at line 993 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.RemoveNonPhysicalItem ( int  itemInstanceId,
bool  sync,
bool  immediateUpdate 
)
inlineprotected

Definition at line 963 of file MyEnvironmentItems.cs.

static bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.SpawnItem ( MyEnvironmentItemsSpawnData  spawnData,
MyEnvironmentItemDefinition  itemDefinition,
Vector3D  position,
Vector3D  up,
int  userdata = -1,
bool  silentOverlaps = true 
)
inlinestatic

Spawn environment item with the definition subtype on world position.

Definition at line 287 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.TryGetItemInfoById ( int  itemId,
out ItemInfo  result 
)
inline

Definition at line 726 of file MyEnvironmentItems.cs.

void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.UnloadGraphics ( )
inline

Definition at line 339 of file MyEnvironmentItems.cs.

override void Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.UpdateAfterSimulation100 ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Reimplemented in Sandbox.Game.Entities.EnvironmentItems.MyTrees.

Definition at line 1305 of file MyEnvironmentItems.cs.

Member Data Documentation

Vector3 Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BaseColor

Definition at line 138 of file MyEnvironmentItems.cs.

Vector2 Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ColorSpread

Definition at line 139 of file MyEnvironmentItems.cs.

List<HkdShapeInstanceInfo> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_childrenTmp = new List<HkdShapeInstanceInfo>()
protected

Definition at line 113 of file MyEnvironmentItems.cs.

readonly Dictionary<int, MyEnvironmentItemData> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_itemsData = new Dictionary<int, MyEnvironmentItemData>()
protected

Definition at line 100 of file MyEnvironmentItems.cs.

readonly Dictionary<int, int> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_localIdToPhysicsShapeInstanceId = new Dictionary<int, int>()
protected

Definition at line 105 of file MyEnvironmentItems.cs.

readonly Dictionary<int, int> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_physicsShapeInstanceIdToLocalId = new Dictionary<int, int>()
protected

Definition at line 102 of file MyEnvironmentItems.cs.

readonly Dictionary<Vector3I, MyEnvironmentSector> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_sectors = new Dictionary<Vector3I, MyEnvironmentSector>(Vector3I.Comparer)
protected

Definition at line 110 of file MyEnvironmentItems.cs.

readonly Dictionary<MyStringHash, int> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_subtypeToModels = new Dictionary<MyStringHash, int>(MyStringHash.Comparer)
staticprotected

Definition at line 107 of file MyEnvironmentItems.cs.

List<HkBodyCollision> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_tmpResults = new List<HkBodyCollision>()
staticprotected

Definition at line 116 of file MyEnvironmentItems.cs.

List<MyEnvironmentSector> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.m_tmpSectors = new List<MyEnvironmentSector>()
staticprotected

Definition at line 117 of file MyEnvironmentItems.cs.

Property Documentation

float Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BatchTime
get

Definition at line 134 of file MyEnvironmentItems.cs.

Vector3D Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.CellsOffset
getset

Definition at line 1387 of file MyEnvironmentItems.cs.

MyEnvironmentItemsDefinition Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.Definition
get

Definition at line 121 of file MyEnvironmentItems.cs.

bool Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.IsBatching
get

Definition at line 133 of file MyEnvironmentItems.cs.

new MyPhysicsBody Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.Physics
getset

Definition at line 142 of file MyEnvironmentItems.cs.

Dictionary<Vector3I, MyEnvironmentSector> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.Sectors
get

Definition at line 111 of file MyEnvironmentItems.cs.

Event Documentation

Action<MyEnvironmentItems> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.BatchEnded

Definition at line 136 of file MyEnvironmentItems.cs.

Action<MyEnvironmentItems, ItemInfo> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ItemAdded

Definition at line 123 of file MyEnvironmentItems.cs.

Action<MyEnvironmentItems, ItemInfo> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ItemModified

Definition at line 125 of file MyEnvironmentItems.cs.

Action<MyEnvironmentItems, ItemInfo> Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems.ItemRemoved

Definition at line 124 of file MyEnvironmentItems.cs.


The documentation for this class was generated from the following file: