Space Engineers
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Properties | Events | List of all members
VRage.Game.Entity.MyEntity Class Reference
Inheritance diagram for VRage.Game.Entity.MyEntity:
VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Ingame.IMyEntity Sandbox.Engine.Utils.MyCutsceneCamera Sandbox.Game.Entities.Debris.MyDebrisBase Sandbox.Game.Entities.EnvironmentItems.MyEnvironmentItems Sandbox.Game.Entities.MyAreaMarker Sandbox.Game.Entities.MyControllableSphere Sandbox.Game.Entities.MyCubeBlock Sandbox.Game.Entities.MyCubeGrid Sandbox.Game.Entities.MyFloatingObject Sandbox.Game.Entities.MyFracturedPiece Sandbox.Game.Entities.MyGhostCharacter Sandbox.Game.Entities.MyHandToolBase Sandbox.Game.Entities.MyInventoryBagEntity Sandbox.Game.Entities.MyManipulationTool Sandbox.Game.Entities.MyMeteor Sandbox.Game.Entities.MyRope Sandbox.Game.Entities.MySkinnedEntity Sandbox.Game.Entities.MyVoxelBase Sandbox.Game.GameSystems.Conveyors.MyConveyorPacket Sandbox.Game.Gui.MyDebugEntity Sandbox.Game.Weapons.MyAmmoBase Sandbox.Game.Weapons.MyAutomaticRifleGun Sandbox.Game.Weapons.MyBaseInventoryItemEntity Sandbox.Game.Weapons.MyEngineerToolBase Sandbox.Game.Weapons.MyHandDrill Sandbox.Game.WorldEnvironment.MyEnvironmentSector VRage.Game.Entity.MyEntitySubpart

Public Member Functions

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 void UpdateAfterSimulation100 ()
 
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 (MyObjectBuilder_EntityBase objectBuilder)
 
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 MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 Gets object builder from object. 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)
 

Public Attributes

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>()
 

Static Public Attributes

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
 

Protected Member Functions

virtual bool CanBeAddedToRender ()
 
virtual MySyncComponentBase OnCreateSync ()
 
virtual void ClampToWorld ()
 
virtual void BeforeDelete ()
 
virtual void Closing ()
 
virtual void OnInventoryComponentAdded (MyInventoryBase inventory)
 
virtual void OnInventoryComponentRemoved (MyInventoryBase inventory)
 

Static Protected Member Functions

static void UpdateNamedEmissiveParts (uint renderObjectId, string emissiveName, Color emissivePartColor, float emissivity)
 

Protected Attributes

List< MyHudEntityParamsm_hudParams
 
MyModel m_modelCollision
 

Properties

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< 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
 

Detailed Description

Definition at line 27 of file MyEntity.cs.

Constructor & Destructor Documentation

VRage.Game.Entity.MyEntity.MyEntity ( )
inline

Definition at line 491 of file MyEntity.cs.

VRage.Game.Entity.MyEntity.MyEntity ( bool  initComponents = true)
inline

Initializes a new instance of the MyEntity class.

Definition at line 499 of file MyEntity.cs.

Member Function Documentation

void VRage.Game.Entity.MyEntity.AddDebugRenderComponent ( MyDebugRenderComponentBase  render)
inline

Definition at line 111 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.AddToGamePruningStructure ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 981 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.AfterPaste ( )
inlinevirtual

Reimplemented in Sandbox.Game.Entities.MyPlanet.

Definition at line 1452 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.ApplyLastControls ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.BeforeDelete ( )
inlineprotectedvirtual
virtual void VRage.Game.Entity.MyEntity.BeforePaste ( )
inlinevirtual

Reimplemented in Sandbox.Game.Entities.MyPlanet.

Definition at line 1448 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.BeforeSave ( )
inlinevirtual

Called before method GetObjectBuilder, when saving sector

Implements VRage.ModAPI.IMyEntity.

Definition at line 1432 of file MyEntity.cs.

virtual bool VRage.Game.Entity.MyEntity.CanBeAddedToRender ( )
inlineprotectedvirtual

Definition at line 425 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.ClampToWorld ( )
inlineprotectedvirtual
void VRage.Game.Entity.MyEntity.ClearDebugRenderComponents ( )
inline

Definition at line 116 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.Close ( )
inline

This method marks this entity for close which means, that Close will be called after all entities are updated

Implements VRage.ModAPI.IMyEntity.

Definition at line 1361 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.Closing ( )
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter, Sandbox.Game.Entities.Cube.MyShipConnector, Sandbox.Game.Entities.Blocks.MyProjectorBase, Sandbox.Game.Weapons.MyLargeTurretBase, Sandbox.Game.Entities.Cube.MyProductionBlock, SpaceEngineers.Game.Entities.Blocks.MyShipMergeBlock, SpaceEngineers.Game.Entities.Blocks.MyLandingGear, Sandbox.Game.Entities.MyCubeBlock, Sandbox.Game.Entities.MyAdvancedDoor, Sandbox.Game.Weapons.MyEngineerToolBase, SpaceEngineers.Game.Entities.Blocks.MyAirVent, Sandbox.Game.Entities.MyPlanet, SpaceEngineers.Game.Entities.Blocks.MySoundBlock, Sandbox.Game.Entities.Blocks.MyGasGenerator, Sandbox.Game.Entities.MyThrust, Sandbox.Game.Entities.MyAirtightDoorGeneric, Sandbox.Game.Entities.Blocks.MyLightingBlock, Sandbox.Game.Entities.MyFloatingObject, Sandbox.Game.Weapons.MyAutomaticRifleGun, Sandbox.Game.Weapons.MyShipToolBase, Sandbox.Game.Weapons.MySmallMissileLauncher, SpaceEngineers.Game.Entities.Blocks.MyMedicalRoom, Sandbox.Game.Weapons.MyHandDrill, Sandbox.Game.Entities.MyDoor, Sandbox.Game.Entities.Cube.MyFracturedBlock, Sandbox.Game.Entities.MyManipulationTool, Sandbox.Game.Entities.Cube.MyBeacon, SpaceEngineers.Game.Entities.Blocks.MyButtonPanel, Sandbox.Game.Entities.Cube.MyRadioAntenna, Sandbox.Game.Weapons.MyShipDrill, Sandbox.Game.Entities.MyCompoundCubeBlock, Sandbox.Game.Weapons.MyMissile, Sandbox.Game.Entities.MyBatteryBlock, Sandbox.Game.Weapons.MySmallGatlingGun, Sandbox.Game.Entities.Cube.MyTerminalBlock, Sandbox.Game.Weapons.MyAmmoBase, Sandbox.Game.Entities.MyAreaMarker, Sandbox.Game.Entities.Cube.MyFunctionalBlock, Sandbox.Game.Entities.MyReactor, SpaceEngineers.Game.Entities.Blocks.MySolarPanel, and Sandbox.Game.WorldEnvironment.MyEnvironmentSector.

Definition at line 1353 of file MyEntity.cs.

delegate MySyncComponentBase VRage.Game.Entity.MyEntity.CreateDefaultSyncEntityDelegate ( MyEntity  thisEntity)
void VRage.Game.Entity.MyEntity.CreateSync ( )
inline

Definition at line 587 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.DebugDraw ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 88 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.DebugDrawInvalidTriangles ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 103 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.DebugDrawPhysics ( )
inlinevirtual

Draw physical representation of entity

Reimplemented in Sandbox.Game.Entities.Cube.MyShipConnector, and Sandbox.Game.Entities.MyPlanet.

Definition at line 694 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.Delete ( )
inline

Every object must have this method, but not every phys object must necessarily have something to cleanup

Implements VRage.ModAPI.IMyEntity.

Definition at line 1267 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.DeserializeControls ( BitStream  stream,
bool  outOfOrder 
)
inlinevirtual
virtual bool VRage.Game.Entity.MyEntity.DoOverlapSphereTest ( float  sphereRadius,
Vector3D  spherePos 
)
inlinevirtual

Implements VRage.ModAPI.IMyEntity.

Reimplemented in Sandbox.Game.Entities.MyVoxelBase.

Definition at line 824 of file MyEntity.cs.

virtual MyEntity VRage.Game.Entity.MyEntity.GetBaseEntity ( )
inlinevirtual

Definition at line 876 of file MyEntity.cs.

double VRage.Game.Entity.MyEntity.GetDistanceBetweenCameraAndBoundingSphere ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 852 of file MyEntity.cs.

double VRage.Game.Entity.MyEntity.GetDistanceBetweenCameraAndPosition ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 869 of file MyEntity.cs.

double VRage.Game.Entity.MyEntity.GetDistanceBetweenPlayerPositionAndBoundingSphere ( )
inline

Definition at line 861 of file MyEntity.cs.

virtual string VRage.Game.Entity.MyEntity.GetFriendlyName ( )
inlinevirtual

Implements VRage.ModAPI.IMyEntity.

Reimplemented in Sandbox.Game.Entities.MyVoxelMap.

Definition at line 661 of file MyEntity.cs.

virtual List<MyHudEntityParams> VRage.Game.Entity.MyEntity.GetHudParams ( bool  allowBlink)
inlinevirtual
virtual bool VRage.Game.Entity.MyEntity.GetIntersectionWithLine ( ref LineD  line,
out Vector3D v,
bool  useCollisionModel = true,
IntersectionFlags  flags = IntersectionFlags.ALL_TRIANGLES 
)
inlinevirtual
virtual bool VRage.Game.Entity.MyEntity.GetIntersectionWithLine ( ref LineD  line,
out VRage.Game.Models.MyIntersectionResultLineTriangleEx t,
IntersectionFlags  flags = IntersectionFlags.ALL_TRIANGLES 
)
inlinevirtual

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter.

Definition at line 743 of file MyEntity.cs.

virtual Vector3D VRage.Game.Entity.MyEntity.GetIntersectionWithLineAndBoundingSphere ( ref LineD  line,
float  boundingSphereRadiusMultiplier 
)
inlinevirtual

Implements VRage.ModAPI.IMyEntity.

Definition at line 784 of file MyEntity.cs.

virtual bool VRage.Game.Entity.MyEntity.GetIntersectionWithSphere ( ref BoundingSphereD  sphere)
inlinevirtual
virtual MyInventoryBase VRage.Game.Entity.MyEntity.GetInventoryBase ( int  index)
inlinevirtual

Search for inventory component with maching index.

Reimplemented in Sandbox.Game.Entities.Cube.MyProductionBlock.

Definition at line 1493 of file MyEntity.cs.

MyInventoryBase VRage.Game.Entity.MyEntity.GetInventoryBase ( )
inline

Simply get the MyInventoryBase component stored in this entity.

Returns

Definition at line 1505 of file MyEntity.cs.

double VRage.Game.Entity.MyEntity.GetLargestDistanceBetweenCameraAndBoundingSphere ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 843 of file MyEntity.cs.

virtual MyObjectBuilder_EntityBase VRage.Game.Entity.MyEntity.GetObjectBuilder ( bool  copy = false)
inlinevirtual
double VRage.Game.Entity.MyEntity.GetSmallestDistanceBetweenCameraAndBoundingSphere ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 833 of file MyEntity.cs.

MyEntitySubpart VRage.Game.Entity.MyEntity.GetSubpart ( string  name)
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 592 of file MyEntity.cs.

MyEntity VRage.Game.Entity.MyEntity.GetTopMostParent ( Type  type = null)
inline

Return top most parent of this entity

Returns

Implements VRage.ModAPI.IMyEntity.

Definition at line 324 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.GetTrianglesIntersectingSphere ( ref BoundingSphereD  sphere,
Vector3 referenceNormalVector,
float?  maxAngle,
List< MyTriangle_Vertex_Normals retTriangles,
int  maxNeighbourTriangles 
)
inline

Definition at line 812 of file MyEntity.cs.

virtual MatrixD VRage.Game.Entity.MyEntity.GetViewMatrix ( )
inlinevirtual
void VRage.Game.Entity.MyEntity.HackyComponentInitByMiroPleaseDontUseEver ( MyDefinitionId  id)
inline

DONT USE THIS METHOD, EVER!

Parameters
id

Definition at line 1039 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.Init ( MyObjectBuilder_EntityBase  objectBuilder)
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.Init ( StringBuilder  displayName,
string  model,
MyEntity  parentObject,
float?  scale,
string  modelCollision = null 
)
inlinevirtual

Reimplemented in Sandbox.Game.Entities.MySkinnedEntity.

Definition at line 1149 of file MyEntity.cs.

delegate MyObjectBuilder_EntityBase VRage.Game.Entity.MyEntity.MyEntityFactoryCreateObjectBuilderDelegate ( MyEntity  entity)
delegate bool VRage.Game.Entity.MyEntity.MyWeldingGroupsGroupExistsDelegate ( MyEntity  entity)
virtual void VRage.Game.Entity.MyEntity.OnAddedToScene ( object  source)
inlinevirtual

Called when [activated] which for entity means that was added to scene.

Parameters
sourceThe source of activation.

Implements VRage.ModAPI.IMyEntity.

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter, Sandbox.Game.Entities.MyCubeGrid, Sandbox.Game.Entities.Cube.MyShipConnector, Sandbox.Game.Entities.Blocks.MyProgrammableBlock, Sandbox.Game.Entities.Blocks.MySensorBlock, Sandbox.Game.Entities.MyConveyorSorter, Sandbox.Game.Entities.MyFracturedPiece, Sandbox.Game.Entities.MyCubeBlock, Sandbox.Game.Entities.MyPlanet, SpaceEngineers.Game.Entities.Blocks.MyLandingGear, Sandbox.Game.Entities.Cube.MyLaserAntenna, Sandbox.Game.Entities.MyJumpDrive, SpaceEngineers.Game.Entities.Blocks.MyAirVent, Sandbox.Game.Entities.Cube.MyWarhead, SpaceEngineers.Game.Entities.Blocks.MyTimerBlock, Sandbox.Game.Weapons.MySmallMissileLauncher, Sandbox.Game.Entities.Blocks.MyGasGenerator, Sandbox.Game.Weapons.MyShipToolBase, Sandbox.Game.Entities.Blocks.MyGasTank, Sandbox.Game.Entities.MyCameraBlock, Sandbox.Game.Weapons.MyEngineerToolBase, Sandbox.Game.Entities.Cube.MyBeacon, Sandbox.Game.Entities.MyBatteryBlock, Sandbox.Game.Entities.Cube.MyRadioAntenna, Sandbox.Game.Entities.Blocks.MyProjectorBase, Sandbox.Game.Entities.MyAirtightDoorGeneric, Sandbox.Game.Entities.MyFloatingObject, Sandbox.Game.Entities.Blocks.MyPistonBase, Sandbox.Game.Entities.MyCompoundCubeBlock, SpaceEngineers.Game.Entities.Blocks.MySpaceBall, Sandbox.Game.Entities.MyReactor, SpaceEngineers.Game.Entities.Blocks.MyGravityGeneratorBase, SpaceEngineers.Game.Entities.Blocks.MyShipMergeBlock, SpaceEngineers.Game.Entities.Blocks.MyVirtualMass, and Sandbox.Game.Entities.MyConveyorConnector.

Definition at line 888 of file MyEntity.cs.

virtual MySyncComponentBase VRage.Game.Entity.MyEntity.OnCreateSync ( )
inlineprotectedvirtual

Definition at line 581 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.OnInventoryComponentAdded ( MyInventoryBase  inventory)
inlineprotectedvirtual
virtual void VRage.Game.Entity.MyEntity.OnInventoryComponentRemoved ( MyInventoryBase  inventory)
inlineprotectedvirtual
virtual void VRage.Game.Entity.MyEntity.OnRemovedFromScene ( object  source)
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.PrepareForDraw ( )
inlinevirtual

Method is called defacto from Update, preparation fo Draw

Reimplemented in Sandbox.Game.Entities.MyCubeGrid.

Definition at line 1440 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.RaisePhysicsChanged ( )
inline

Definition at line 1005 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.RefreshModels ( string  model,
string  modelCollision 
)
inlinevirtual

Reimplemented in Sandbox.Game.Entities.MyCubeBlock.

Definition at line 1175 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.RemoveFromGamePruningStructure ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 986 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.SerializeControls ( BitStream  stream)
inlinevirtual
void VRage.Game.Entity.MyEntity.SetEmissiveParts ( string  emissiveName,
Color  emissivePartColor,
float  emissivity 
)
inline

Sets the emissive value of a specific emissive material on entity.

Parameters
emissiveNameThe name of the emissive material (ie. "Emissive0")
emissivityLevel of emissivity (0 is off, 1 is full brightness)
emissivePartColorColor to emit

Implements VRage.ModAPI.IMyEntity.

Definition at line 1457 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.SetEmissivePartsForSubparts ( string  emissiveName,
Color  emissivePartColor,
float  emissivity 
)
inline

Sets the emissive value of a specific emissive material on all entity subparts.

Parameters
emissiveNameThe name of the emissive material (ie. "Emissive0")
emissivityLevel of emissivity (0 is off, 1 is full brightness).
emissivePartColorColor to emit

Implements VRage.ModAPI.IMyEntity.

Definition at line 1462 of file MyEntity.cs.

void VRage.Game.Entity.MyEntity.SetSpeedsAccordingToServerValues ( )
inline

Definition at line 674 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.SetWorldMatrix ( MatrixD  worldMatrix,
bool  forceUpdate = false,
bool  updateChildren = true 
)
inlinevirtual

Definition at line 682 of file MyEntity.cs.

override string VRage.Game.Entity.MyEntity.ToString ( )
inline

Definition at line 1483 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.TryGetSubpart ( string  name,
out MyEntitySubpart  subpart 
)
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 597 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.UpdateAfterSimulation ( )
inlinevirtual

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter, Sandbox.Game.Entities.MyCubeGrid, Sandbox.Game.Weapons.MyLargeTurretBase, Sandbox.Game.Entities.MyCubeBlock, Sandbox.Game.Entities.Blocks.MyProgrammableBlock, Sandbox.Game.Entities.Blocks.MyProjectorBase, Sandbox.Game.Entities.Cube.MyLaserAntenna, Sandbox.Game.Entities.MyGhostCharacter, Sandbox.Game.Entities.Blocks.MyLightingBlock, Sandbox.Game.Weapons.MyWelder, Sandbox.Game.Entities.MyManipulationTool, Sandbox.Game.Entities.MyAdvancedDoor, Sandbox.Game.Entities.MyHandToolBase, SpaceEngineers.Game.Entities.Blocks.MyShipWelder, Sandbox.Game.Entities.MyJumpDrive, Sandbox.Game.Weapons.MyAutomaticRifleGun, Sandbox.Game.Weapons.MyShipDrill, Sandbox.Game.Weapons.MySmallMissileLauncher, Sandbox.Game.Weapons.MyEngineerToolBase, Sandbox.Game.Weapons.MySmallGatlingGun, Sandbox.Game.Entities.Cube.MyBeacon, Sandbox.Game.Weapons.MyShipToolBase, Sandbox.Game.Entities.Blocks.MyGasTank, Sandbox.Game.Entities.MyDoor, Sandbox.Game.Weapons.MyMissile, Sandbox.Game.Weapons.MyHandDrill, Sandbox.Game.Entities.MyCameraBlock, Sandbox.Game.Weapons.MyShipGrinder, Sandbox.Game.Weapons.MyAmmoBase, Sandbox.Game.Entities.MyAirtightDoorGeneric, Sandbox.Game.Entities.MyFloatingObject, Sandbox.Game.Weapons.MyUserControllableGun, Sandbox.Game.Weapons.MyAngleGrinder, SpaceEngineers.Game.Weapons.Guns.MyLargeMissileTurret, SpaceEngineers.Game.Weapons.Guns.MyLargeGatlingTurret, and SpaceEngineers.Game.Weapons.Guns.MyLargeInteriorTurret.

Definition at line 614 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.UpdateAfterSimulation10 ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.UpdateAfterSimulation100 ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.UpdateBeforeSimulation ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.UpdateBeforeSimulation10 ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.UpdateBeforeSimulation100 ( )
inlinevirtual
void VRage.Game.Entity.MyEntity.UpdateGamePruningStructure ( )
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 991 of file MyEntity.cs.

static void VRage.Game.Entity.MyEntity.UpdateNamedEmissiveParts ( uint  renderObjectId,
string  emissiveName,
Color  emissivePartColor,
float  emissivity 
)
inlinestaticprotected

Definition at line 1473 of file MyEntity.cs.

virtual void VRage.Game.Entity.MyEntity.UpdateOnceBeforeFrame ( )
inlinevirtual
virtual void VRage.Game.Entity.MyEntity.UpdatingStopped ( )
inlinevirtual

Definition at line 621 of file MyEntity.cs.

Member Data Documentation

Action<MyEntity> VRage.Game.Entity.MyEntity.AddToGamePruningStructureExtCallBack = null
static

Definition at line 1563 of file MyEntity.cs.

CreateDefaultSyncEntityDelegate VRage.Game.Entity.MyEntity.CreateDefaultSyncEntityExtCallback
static

Definition at line 1579 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.CreateStandardRenderComponentsExtCallback = null
static

Definition at line 1595 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.DebugAsyncLoading

Definition at line 38 of file MyEntity.cs.

DebugCreatedBy VRage.Game.Entity.MyEntity.DebugCreatedBy

Definition at line 39 of file MyEntity.cs.

MyDefinitionId VRage.Game.Entity.MyEntity.DefinitionId = null

Definition at line 32 of file MyEntity.cs.

int VRage.Game.Entity.MyEntity.GamePruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED

Definition at line 127 of file MyEntity.cs.

Action<MyComponentContainer, MyObjectBuilderType, MyStringHash, MyObjectBuilder_ComponentContainer> VRage.Game.Entity.MyEntity.InitComponentsExtCallback = null
static

Definition at line 1598 of file MyEntity.cs.

List<MyHudEntityParams> VRage.Game.Entity.MyEntity.m_hudParams
protected

Definition at line 44 of file MyEntity.cs.

float VRage.Game.Entity.MyEntity.m_massChangeForCollisions = 1f

Definition at line 42 of file MyEntity.cs.

MyModel VRage.Game.Entity.MyEntity.m_modelCollision
protected

Definition at line 124 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.m_positionResetFromServer

Definition at line 68 of file MyEntity.cs.

Vector3 VRage.Game.Entity.MyEntity.m_serverAngularVelocity

Definition at line 66 of file MyEntity.cs.

Vector3 VRage.Game.Entity.MyEntity.m_serverLinearVelocity

Definition at line 65 of file MyEntity.cs.

Quaternion VRage.Game.Entity.MyEntity.m_serverOrientation = new Quaternion()

Definition at line 62 of file MyEntity.cs.

Vector3D VRage.Game.Entity.MyEntity.m_serverPosition = new Vector3D()

Definition at line 61 of file MyEntity.cs.

MatrixD VRage.Game.Entity.MyEntity.m_serverWorldMatrix = new MatrixD()

Definition at line 63 of file MyEntity.cs.

Func<MyObjectBuilder_EntityBase, bool, MyEntity> VRage.Game.Entity.MyEntity.MyEntitiesCreateFromObjectBuilderExtCallback = null
static

Definition at line 1601 of file MyEntity.cs.

MyEntityFactoryCreateObjectBuilderDelegate VRage.Game.Entity.MyEntity.MyEntityFactoryCreateObjectBuilderExtCallback = null
static

Definition at line 1572 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.MyProceduralWorldGeneratorTrackEntityExtCallback = null
static

Definition at line 1592 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.MyWeldingGroupsAddNodeExtCallback = null
static

Definition at line 1585 of file MyEntity.cs.

Action<MyEntity, List<MyEntity> > VRage.Game.Entity.MyEntity.MyWeldingGroupsGetGroupNodesExtCallback = null
static

Definition at line 1587 of file MyEntity.cs.

MyWeldingGroupsGroupExistsDelegate VRage.Game.Entity.MyEntity.MyWeldingGroupsGroupExistsExtCallback = null
static

Definition at line 1589 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.MyWeldingGroupsRemoveNodeExtCallback = null
static

Definition at line 1586 of file MyEntity.cs.

string VRage.Game.Entity.MyEntity.Name

Definition at line 36 of file MyEntity.cs.

Dictionary<IMyReplicable, Action> VRage.Game.Entity.MyEntity.ReadyForReplicationAction = new Dictionary<IMyReplicable, Action>()

Definition at line 234 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.RemoveFromGamePruningStructureExtCallBack = null
static

Definition at line 1564 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.SentFromServer

Definition at line 69 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.StaticForPruningStructure = false

Definition at line 129 of file MyEntity.cs.

int VRage.Game.Entity.MyEntity.TargetPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED

Definition at line 130 of file MyEntity.cs.

int VRage.Game.Entity.MyEntity.TopMostPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED

Definition at line 128 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.UpdateGamePruningStructureExtCallBack = null
static

Definition at line 1565 of file MyEntity.cs.

Property Documentation

bool VRage.Game.Entity.MyEntity.Closed
getprotected set

Definition at line 190 of file MyEntity.cs.

MyEntityComponentContainer VRage.Game.Entity.MyEntity.Components
get

Definition at line 34 of file MyEntity.cs.

string VRage.Game.Entity.MyEntity.DebugName
get

Definition at line 464 of file MyEntity.cs.

string VRage.Game.Entity.MyEntity.DisplayName
getset

Definition at line 452 of file MyEntity.cs.

virtual String VRage.Game.Entity.MyEntity.DisplayNameText
getset

Display Name for GUI etc. Override in descendant classes. Usually used to display in terminal or inventory controls.

Definition at line 1544 of file MyEntity.cs.

long VRage.Game.Entity.MyEntity.EntityId
getset

Entity id, can be set by subclasses (for example when using pool...)

Definition at line 148 of file MyEntity.cs.

EntityFlags VRage.Game.Entity.MyEntity.Flags
getset

Definition at line 12 of file MyEntity_ModAPI.cs.

MyGameLogicComponent VRage.Game.Entity.MyEntity.GameLogic
getset

Definition at line 139 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.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.

Definition at line 1533 of file MyEntity.cs.

MyHierarchyComponent<MyEntity> VRage.Game.Entity.MyEntity.Hierarchy
getset

Definition at line 339 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.InScene
getset

Definition at line 394 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.InvalidateOnMove
getset

Definition at line 363 of file MyEntity.cs.

int VRage.Game.Entity.MyEntity.InventoryCount
get

Iterate through inventories and return their count.

Definition at line 1516 of file MyEntity.cs.

virtual bool VRage.Game.Entity.MyEntity.IsCCDForProjectiles
get

Definition at line 481 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.IsPreview
getset

Definition at line 222 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.IsReadyForReplication
getset

Definition at line 238 of file MyEntity.cs.

virtual bool VRage.Game.Entity.MyEntity.IsVolumetric
get

Definition at line 411 of file MyEntity.cs.

virtual Vector3D VRage.Game.Entity.MyEntity.LocationForHudMarker
get

Definition at line 416 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.MarkedForClose
getprotected set

Definition at line 191 of file MyEntity.cs.

virtual float VRage.Game.Entity.MyEntity.MaxGlassDistSq
get

Definition at line 194 of file MyEntity.cs.

MyModel VRage.Game.Entity.MyEntity.Model
get

Definition at line 431 of file MyEntity.cs.

MyModel VRage.Game.Entity.MyEntity.ModelCollision
get

Definition at line 436 of file MyEntity.cs.

MyEntityUpdateEnum VRage.Game.Entity.MyEntity.NeedsUpdate
getset

Definition at line 257 of file MyEntity.cs.

MyEntity VRage.Game.Entity.MyEntity.Parent
get

Gets or sets the parent.

The parent.

Definition at line 318 of file MyEntity.cs.

MyPhysicsComponentBase VRage.Game.Entity.MyEntity.Physics
getset

Gets the physic component of the entity.

Definition at line 357 of file MyEntity.cs.

MyPositionComponentBase VRage.Game.Entity.MyEntity.PositionComp
getset

Definition at line 48 of file MyEntity.cs.

MyRenderComponentBase VRage.Game.Entity.MyEntity.Render
getset

Definition at line 73 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.Save
getset

Definition at line 206 of file MyEntity.cs.

MyModStorageComponentBase VRage.Game.Entity.MyEntity.Storage
getset

Definition at line 186 of file MyEntity.cs.

Dictionary<string, MyEntitySubpart> VRage.Game.Entity.MyEntity.Subparts
get

Definition at line 475 of file MyEntity.cs.

bool VRage.Game.Entity.MyEntity.SyncFlag
getset

Definition at line 385 of file MyEntity.cs.

MySyncComponentBase VRage.Game.Entity.MyEntity.SyncObject
getprotected set

Definition at line 182 of file MyEntity.cs.

MatrixD VRage.Game.Entity.MyEntity.WorldMatrix
getset

Definition at line 307 of file MyEntity.cs.

Event Documentation

Action<MyEntity> VRage.Game.Entity.MyEntity.OnClose

Definition at line 976 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.OnClosing

Definition at line 977 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.OnMarkForClose

This event may not be invoked at all, when calling MyEntities.CloseAll, marking is bypassed

Definition at line 975 of file MyEntity.cs.

Action<MyEntity> VRage.Game.Entity.MyEntity.OnPhysicsChanged

Definition at line 979 of file MyEntity.cs.


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