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

Grid - small ship, large ship, station Cubes (armor, walls...) are merge and rendered by this entity Blocks (turret, thrusts...) are rendered as child entities More...

Inheritance diagram for Sandbox.Game.Entities.MyCubeGrid:
VRage.Game.ModAPI.IMyCubeGrid VRage.Game.Entity.MyEntity Sandbox.Game.Entities.Cube.IMyGridConnectivityTest VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Ingame.IMyCubeGrid VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Ingame.IMyEntity VRage.Game.ModAPI.Ingame.IMyEntity VRage.Game.ModAPI.Ingame.IMyEntity

Classes

struct  BlockPositionId
 
class  BlockTypeCounter
 Used when calculating index of added block. Might not be count of blocks since removal of a block does not decrement this. Key is numerical ID of cube block definition. More...
 
struct  LocationIdentity
 
struct  MyBlockBuildArea
 
struct  MyBlockLocation
 
struct  MySingleOwnershipRequest
 

Public Member Functions

void RaiseGridChanged ()
 
bool HasMainCockpit ()
 
bool IsMainCockpit (MyTerminalBlock cockpit)
 
void SetMainCockpit (MyTerminalBlock cockpit)
 
bool HasMainRemoteControl ()
 
bool IsMainRemoteControl (MyTerminalBlock remoteControl)
 
void SetMainRemoteControl (MyTerminalBlock remoteControl)
 
int GetFatBlockCount< T > ()
 Return how much fat blocks defined by T is pressent in grid. More...
 
 MyCubeGrid ()
 
override void Init (MyObjectBuilder_EntityBase objectBuilder)
 
MyCubeGrid SplitByPlane (PlaneD plane)
 
void CreateSplit_Implementation (List< Vector3I > blocks, long newEntityId)
 
void CreateSplits_Implementation (List< Vector3I > blocks, List< MyDisconnectHelper.Group > groups)
 
override MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 Gets object builder from object. More...
 
override void UpdateOnceBeforeFrame ()
 
void CreateStructuralIntegrity ()
 
void CloseStructuralIntegrity ()
 
override void UpdateBeforeSimulation ()
 
bool IsGizmoDrawingEnabled ()
 
override void PrepareForDraw ()
 Method is called defacto from Update, preparation fo Draw More...
 
override void UpdateBeforeSimulation10 ()
 Called each 10th frame if registered for update10 More...
 
override void UpdateBeforeSimulation100 ()
 Called each 100th frame if registered for update100 More...
 
int GetCurrentMass (MyCharacter pilot=null)
 
int GetCurrentMass (out int baseMass, MyCharacter pilot=null)
 
override void UpdateAfterSimulation100 ()
 
override void UpdateAfterSimulation ()
 
void ResetStructuralIntegrity ()
 
override void OnAddedToScene (object source)
 Called when [activated] which for entity means that was added to scene. More...
 
override void OnRemovedFromScene (object source)
 
override bool GetIntersectionWithLine (ref LineD line, out MyIntersectionResultLineTriangleEx?tri, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
bool GetIntersectionWithLine (ref LineD line, ref MyCubeGridHitInfo info, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
override bool GetIntersectionWithSphere (ref BoundingSphereD sphere)
 
override string ToString ()
 
bool IsTrash ()
 Algorithm used by game to define useless grids to be deleted More...
 
Vector3I WorldToGridInteger (Vector3D coords)
 
Vector3D WorldToGridScaledLocal (Vector3D coords)
 
Vector3D GridIntegerToWorld (Vector3I gridCoords)
 Converts grid coordinates to world space More...
 
Vector3D GridIntegerToWorld (Vector3D gridCoords)
 
Vector3I LocalToGridInteger (Vector3 localCoords)
 
bool CanAddCubes (Vector3I min, Vector3I max)
 
bool CanAddCubes (Vector3I min, Vector3I max, MyBlockOrientation?orientation, MyCubeBlockDefinition definition)
 
bool CanAddCube (Vector3I pos, MyBlockOrientation?orientation, MyCubeBlockDefinition definition, bool ignoreSame=false)
 
void ClearSymmetries ()
 Clears symmetry planes More...
 
bool IsTouchingAnyNeighbor (Vector3I min, Vector3I max)
 Finds out if given area has any neighboring block More...
 
bool CanPlaceBlock (Vector3I min, Vector3I max, MyBlockOrientation orientation, MyCubeBlockDefinition definition, int?ignoreMultiblockId=null, bool ignoreFracturedPieces=false)
 
bool CanPlaceBlock (Vector3I min, Vector3I max, MyBlockOrientation orientation, MyCubeBlockDefinition definition, ref MyGridPlacementSettings gridSettings, int?ignoreMultiblockId=null, bool ignoreFracturedPieces=false)
 
void SetCubeDirty (Vector3I pos)
 
void SetBlockDirty (MySlimBlock cubeBlock)
 
void DebugDrawRange (Vector3I min, Vector3I max)
 
void DebugDrawPositions (List< Vector3I > positions)
 
void EnqueueDestructionDeformationBlock (Vector3I position)
 
void EnqueueDestroyedBlock (Vector3I position)
 
void EnqueueRemovedBlock (Vector3I position, bool generatorsEnabled)
 
void SendRemovedBlocks ()
 
void EnqueueRemovedBlockWithId (Vector3I position, ushort?compoundId, bool generatorsEnabled)
 Server method, adds removed block with compound id into queue More...
 
void EnqueueDestroyedBlockWithId (Vector3I position, ushort?compoundId, bool generatorEnabled)
 
void SendRemovedBlocksWithIds ()
 
void RemoveBlocksBuiltByID (long identityID)
 Remove all blocks from the grid built by specific player More...
 
void TransferBlocksBuiltByID (long oldOwner, long newOwner)
 Transfer all blocks built by a specific player to another player More...
 
void SendTransferRequestMessage (long oldOwner, long newOwner, ulong newOwnerSteamId)
 Send a message to a player who is supposed to receive blocks built by a player More...
 
bool IsTransferBlocksBuiltByIDPossible (long oldOwner, long newOwner)
 Find out whether a player blocks are supposed to be trasfered to has enough free blocks to accept them More...
 
MySlimBlock BuildGeneratedBlock (MyBlockLocation location, Vector3 colorMaskHsv)
 
void BuildBlockRequest (uint colorMaskHsv, MyBlockLocation location, [DynamicObjectBuilder] MyObjectBuilder_CubeBlock blockObjectBuilder, long builderEntityId, bool instantBuild, long ownerId)
 
void BuildBlockSucess (uint colorMaskHsv, MyBlockLocation location, [DynamicObjectBuilder] MyObjectBuilder_CubeBlock blockObjectBuilder, long builderEntityId, bool instantBuild, long ownerId)
 
void BuildBlocks (ref MyBlockBuildArea area, long builderEntityId, long ownerId)
 Network friendly alternative for building block More...
 
void BuildBlocks (Vector3 colorMaskHsv, HashSet< MyBlockLocation > locations, long builderEntityId, long ownerId)
 Builds many same blocks, used when building lines or planes. More...
 
void BuildBlocksClient (uint colorMaskHsv, HashSet< MyBlockLocation > locations, long builderEntityId, bool instantBuilt, long ownerId)
 
void RazeBlocks (ref Vector3I pos, ref Vector3UByte size)
 Remove blocks in given area More...
 
void RazeBlock (Vector3I position)
 Remove block at given position More...
 
void RazeBlocks (List< Vector3I > locations)
 Razes blocks (unbuild) More...
 
void RazeBlocksRequest (List< Vector3I > locations)
 
void RazeBlocksClient (List< Vector3I > locations)
 
void RazeGeneratedBlocks (List< Vector3I > locations)
 
void RazeGeneratedBlocksInCompoundBlock (List< Tuple< Vector3I, ushort >> locationsAndIds)
 
void RazeGeneratedBlocks (List< MySlimBlock > generatedBlocks)
 
void ColorBlocks (Vector3I min, Vector3I max, Vector3 newHSV, bool playSound)
 Color block in area. Verry slow. More...
 
void ColorGrid (Vector3 newHSV, bool playSound)
 
void ResetBlockSkeleton (MySlimBlock block, bool updateSync=false)
 
void MultiplyBlockSkeleton (MySlimBlock block, float factor, bool updateSync=false)
 
void AddDirtyBone (Vector3I gridPosition, Vector3I boneOffset)
 
MySlimBlock GetCubeBlock (Vector3I pos)
 Get cube block at given position More...
 
MySlimBlock GetCubeBlock (Vector3I pos, ushort?compoundId)
 
GetFirstBlockOfType< T > ()
 
void FixTargetCube (out Vector3I cube, Vector3 fractionalGridPosition)
 Iterate over all the neighbors of the cube and return when one of them exists. More...
 
HashSet< MySlimBlockGetBlocks ()
 
ListReader< MyCubeBlockGetFatBlocks ()
 
MyFatBlockReader< T > GetFatBlocks< T > ()
 
bool CanHavePhysics ()
 Returns true when grid have at least one block which has physics (e.g. interior lights have no physics) More...
 
void ConvertToDynamic ()
 Converts station to ship More...
 
void ConvertToStatic ()
 
void DoDamage (float damage, MyHitInfo hitInfo, Vector3?localPos=null, long attackerId=0)
 
void ApplyDestructionDeformation (MySlimBlock block, float damage=1f, MyHitInfo?hitInfo=null, long attackerId=0)
 
void RemoveDestroyedBlock (MySlimBlock block, long attackerId=0)
 Removes destroyed block, applies damage and deformation to close blocks Won't update physics! More...
 
void RemoveBlock (MySlimBlock block, bool updatePhysics=false)
 
void RemoveBlockWithId (MySlimBlock block, bool updatePhysics=false)
 
void RemoveBlockWithId (Vector3I position, ushort?compoundId, bool updatePhysics=false)
 
void UpdateBlockNeighbours (MySlimBlock block)
 
Vector3 GetClosestCorner (Vector3I gridPos, Vector3 position)
 Returns cube corner which is closest to position More...
 
void DetectDisconnectsAfterFrame ()
 
bool CubeExists (Vector3I pos)
 Returns true if there is any block occupying given position More...
 
void UpdateDirty ()
 
bool IsDirty ()
 
void UpdateInstanceData ()
 
bool TryGetCube (Vector3I position, out MyCube cube)
 
bool ChangeColor (MySlimBlock block, Vector3 newHSV)
 
void GetExistingBones (Vector3I boneMin, Vector3I boneMax, Dictionary< Vector3I, MySlimBlock > resultSet, MyDamageInformation?damageInfo=null)
 
MyCubeGrid DetectMerge (MySlimBlock block, MyCubeGrid ignore=null, List< MyEntity > nearEntities=null)
 Tries to merge this grid with any other grid Merges grids only when both are static Returns the merged grid (which does not necessarily have to be this grid) More...
 
MatrixI CalculateMergeTransform (MyCubeGrid gridToMerge, Vector3I gridOffset)
 
bool CanMergeCubes (MyCubeGrid gridToMerge, Vector3I gridOffset)
 
MyCubeGrid MergeGrid_MergeBlock (MyCubeGrid gridToMerge, Vector3I gridOffset)
 
void ChangeGridOwnership (long playerId, MyOwnershipShareModeEnum shareMode)
 Changes owner of all blocks on grid Call only on server! More...
 
bool GetLineIntersectionExactGrid (ref LineD line, ref Vector3I position, ref double distanceSquared)
 Same as GetLineIntersectionExactAll just without intersected block More...
 
bool GetLineIntersectionExactGrid (ref LineD line, ref Vector3I position, ref double distanceSquared, MyPhysics.HitInfo?hitInfo=null)
 
Vector3D GetLineIntersectionExactAll (ref LineD line, out double distance, out MySlimBlock intersectedBlock)
 Returns closest line (in world space) intersection with all cubes. More...
 
void GetBlocksInsideSphere (ref BoundingSphereD sphere, HashSet< MySlimBlock > blocks)
 
void GetBlocksIntersectingOBB (BoundingBoxD box, MatrixD boxTransform, List< MySlimBlock > blocks)
 
void GetBlocksInsideSpheres (ref BoundingSphereD sphere1, ref BoundingSphereD sphere2, ref BoundingSphereD sphere3, HashSet< MySlimBlock > blocks1, HashSet< MySlimBlock > blocks2, HashSet< MySlimBlock > blocks3, bool respectDeformationRatio, float detectionBlockHalfSize, ref MatrixD invWorldGrid)
 Optimized version where spheres are sorted from smallest to largest More...
 
Vector3I RayCastBlocks (Vector3D worldStart, Vector3D worldEnd)
 Obtains position of first hit block. More...
 
void RayCastCells (Vector3D worldStart, Vector3D worldEnd, List< Vector3I > outHitPositions, Vector3I?gridSizeInflate=null, bool havokWorld=false, bool clearOutHitPositions=true)
 Obtains positions of grid cells regardless of whether these cells are taken up by blocks or not. More...
 
void ChangeOwner (MyCubeBlock block, long oldOwner, long newOwner)
 
void RecalculateOwners ()
 
void UpdateOwnership (long ownerId, bool isFunctional)
 
MyFracturedBlock CreateFracturedBlock (MyObjectBuilder_FracturedBlock fracturedBlockBuilder, Vector3I position)
 
bool EnableGenerators (bool enable, bool fromServer=false)
 
MySlimBlock GetGeneratingBlock (MySlimBlock generatedBlock)
 
void GetGeneratedBlocks (MySlimBlock generatingBlock, List< MySlimBlock > outGeneratedBlocks)
 Returns array of generated blocks from given generating block. More...
 
void OnIntegrityChanged (MySlimBlock block)
 
void PasteBlocksToGrid (List< MyObjectBuilder_CubeGrid > gridsToMerge, long inventoryEntityId, bool multiBlock, bool instantBuild)
 
void UpdateOxygenAmount (float[] oxygenAmount)
 
MyCubeGrid GetBiggestGridInGroup ()
 Returns biggest grid in physical group by AABB volume More...
 
void ConvertFracturedBlocksToComponents ()
 
void PrepareMultiBlockInfos ()
 
MyCubeGridMultiBlockInfo GetMultiBlockInfo (int multiBlockId)
 
void GetBlocksInMultiBlock (int multiBlockId, HashSet< Tuple< MySlimBlock, ushort?>> outMultiBlocks)
 Writes multiblocks (compound block and block ID) to outMultiBlocks collection with the same multiblockId. More...
 
bool CanAddMultiBlocks (MyCubeGridMultiBlockInfo multiBlockInfo, ref MatrixI transform, List< int > multiBlockIndices)
 
bool BuildMultiBlocks (MyCubeGridMultiBlockInfo multiBlockInfo, ref MatrixI transform, List< int > multiBlockIndices, long builderEntityId)
 Builds multiblock parts according to specified indices. More...
 
bool CanAddMissingBlocksInMultiBlock (int multiBlockId)
 
void AddMissingBlocksInMultiBlock (int multiBlockId, long toolOwnerId)
 
bool CanAddOtherBlockInMultiBlock (Vector3I min, Vector3I max, MyBlockOrientation orientation, MyCubeBlockDefinition definition, int?ignoreMultiblockId)
 Checks if the given block can be added to place where multiblock area (note that even if some parts of multiblock are destroyed then they still occupy - virtually - its place). More...
 
bool WillRemoveBlockSplitGrid (MySlimBlock testBlock)
 
MySlimBlock GetTargetedBlock (Vector3D position)
 
Parameters
positionIn world coordinates
More...
 
void SendGridCloseRequest ()
 Use only for cut request More...
 
void RequestConvertToDynamic ()
 
void RecalculateGravity ()
 
void ActivatePhysics ()
 
void SendReflectorState (MyMultipleEnabledEnum value)
 
void SendIntegrityChanged (MySlimBlock mySlimBlock, MyIntegrityChangeEnum integrityChangeType, long toolOwner)
 
void SendStockpileChanged (MySlimBlock mySlimBlock, List< MyStockpileItem > list)
 
void SendFractureComponentRepaired (MySlimBlock mySlimBlock, long toolOwner)
 
void RequestFillStockpile (Vector3I blockPosition, MyInventory fromInventory)
 
void RequestSetToConstruction (Vector3I blockPosition, MyInventory fromInventory)
 
void ChangePowerProducerState (MyMultipleEnabledEnum enabledState, long playerId)
 
void SendPowerDistributorState (MyMultipleEnabledEnum enabledState, long playerId)
 
void RequestConversionToShip ()
 
void RequestConversionToStation ()
 
void OnConvertedToShipRequest ()
 
void OnConvertedToStationRequest ()
 
void ChangeOwnerRequest (MyCubeGrid grid, MyCubeBlock block, long playerId, MyOwnershipShareModeEnum shareMode)
 
void SetHandbrakeRequest (bool v)
 
void ChangeGridOwner (long playerId, MyOwnershipShareModeEnum shareMode)
 
void AnnounceRemoveSplit (List< MySlimBlock > blocks)
 
void ChangeDisplayNameRequest (String displayName)
 
void ModifyGroup (MyBlockGroup group)
 
void RazeBlockInCompoundBlock (List< Tuple< Vector3I, ushort >> locationsAndIds)
 
override void SerializeControls (BitStream stream)
 
override void DeserializeControls (BitStream stream, bool outOfOrder)
 
override void ApplyLastControls ()
 
void TargetingAddId (long id)
 
void TargetingRemoveId (long id)
 
void TargetingSetWhitelist (bool whitelist)
 
bool TargetingCanAttackGrid (long id)
 
- Public Member Functions inherited from VRage.Game.ModAPI.IMyCubeGrid
void ColorBlocks (VRageMath.Vector3I min, VRageMath.Vector3I max, VRageMath.Vector3 newHSV)
 Sets given color mask to range of blocks More...
 
void FixTargetCube (out VRageMath.Vector3I cube, VRageMath.Vector3 fractionalGridPosition)
 Clamps fractional grid position to nearest cell (prefers neighboring occupied cell before empty) More...
 
VRageMath.Vector3 GetClosestCorner (VRageMath.Vector3I gridPos, VRageMath.Vector3 position)
 Gets position of closest cell corner More...
 
VRageMath.Vector3D GetLineIntersectionExactAll (ref VRageMath.LineD line, out double distance, out IMySlimBlock intersectedBlock)
 Returns point of intersection with line More...
 
bool CanMergeCubes (IMyCubeGrid gridToMerge, VRageMath.Vector3I gridOffset)
 Determines if merge between grids is possible with given offset More...
 
VRageMath.MatrixI CalculateMergeTransform (IMyCubeGrid gridToMerge, VRageMath.Vector3I gridOffset)
 Transformation matrix that has to be applied to grid blocks to correctly merge it used because ie. ships can be turned 90 degrees along X axis when being merged More...
 
IMyCubeGrid MergeGrid_MergeBlock (IMyCubeGrid gridToMerge, VRageMath.Vector3I gridOffset)
 Merge used by merge blocks More...
 
VRageMath.Vector3I RayCastBlocks (VRageMath.Vector3D worldStart, VRageMath.Vector3D worldEnd)
 Returns cell with block intersecting given line More...
 
void RayCastCells (VRageMath.Vector3D worldStart, VRageMath.Vector3D worldEnd, List< VRageMath.Vector3I > outHitPositions, VRageMath.Vector3I?gridSizeInflate=null, bool havokWorld=false)
 Returns list of cells with blocks intersected by line More...
 
VRageMath.Vector3I WorldToGridInteger (VRageMath.Vector3 coords)
 Converts world coordinates to grid space cell coordinates More...
 
VRageMath.Vector3I WorldToGridInteger (VRageMath.Vector3D coords)
 Converts world coordinates to grid space cell coordinates More...
 
- Public Member Functions inherited from VRage.ModAPI.IMyEntity
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, System.Collections.Generic.List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 
- 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 UpdatingStopped ()
 
virtual void UpdateAfterSimulation10 ()
 
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)
 
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 ()
 
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 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)
 

Static Public Member Functions

static void RemoveSplit (MyCubeGrid originalGrid, List< MySlimBlock > blocks, int offset, int count, bool sync=true)
 
static MyCubeGrid CreateSplit (MyCubeGrid originalGrid, List< MySlimBlock > blocks, bool sync=true, long newEntityId=0)
 
static void CreateSplits (MyCubeGrid originalGrid, List< MySlimBlock > splitBlocks, List< MyDisconnectHelper.Group > groups, bool sync=true)
 SplitBlocks list can contain null when received from network More...
 
static Vector3D GridIntegerToWorld (float gridSize, Vector3I gridCoords, MatrixD worldMatrix)
 
static bool CanHavePhysics (List< MySlimBlock > blocks, int offset, int count)
 Returns true when grid have at least one block which has physics (lights has no physics) More...
 
static bool GetLineIntersection (ref LineD line, out MyCubeGrid grid, out Vector3I position, out double distanceSquared)
 
static bool GetLineIntersectionExact (ref LineD line, out MyCubeGrid grid, out Vector3I position, out double distanceSquared)
 
static void RayCastStaticCells (Vector3D worldStart, Vector3D worldEnd, List< Vector3I > outHitPositions, float gridSize, Vector3I?gridSizeInflate=null, bool havokWorld=false)
 Obtains positions of static grid cells regardless of whether these cells are taken up by blocks or not. Usefull when placing block on voxel. More...
 
static bool CanPasteGrid ()
 
static bool IsGridInCompleteState (MyCubeGrid grid)
 
static void TryCreateGrid_Implementation (MyCubeSize cubeSize, bool isStatic, MyPositionAndOrientation position, long inventoryEntityId, bool instantBuild)
 
static void TryPasteGrid_Implementation (List< MyObjectBuilder_CubeGrid > entities, bool detectDisconnects, long inventoryEntityId, Vector3 objectVelocity, bool multiBlock, bool instantBuild)
 
static void ShowPasteFailedOperation ()
 
static void SendHudNotificationAfterPaste ()
 
static void ChangeOwnersRequest (MyOwnershipShareModeEnum shareMode, List< MySingleOwnershipRequest > requests, long requestingPlayer)
 
static void Preload ()
 
static void GetCubePartsWithoutTopologyCheck (MyCubeBlockDefinition block, Vector3I inputPosition, Matrix rotation, float gridSize, List< string > outModels, List< MatrixD > outLocalMatrices, List< Vector3 > outLocalNormals, List< Vector2 > outPatternOffsets)
 
static void GetCubeParts (MyCubeBlockDefinition block, Vector3I inputPosition, Matrix rotation, float gridSize, List< string > outModels, List< MatrixD > outLocalMatrices, List< Vector3 > outLocalNormals, List< Vector2 > outPatternOffsets)
 
static void CheckAreaConnectivity (MyCubeGrid grid, ref MyBlockBuildArea area, List< Vector3UByte > validOffsets, HashSet< Vector3UByte > resultFailList)
 
static bool CheckMergeConnectivity (MyCubeGrid hitGrid, MyCubeGrid gridToMerge, Vector3I gridOffset)
 
static bool CheckConnectivity (IMyGridConnectivityTest grid, MyCubeBlockDefinition def, MyCubeBlockDefinition.MountPoint[] mountPoints, ref Quaternion rotation, ref Vector3I position)
 Performs check whether cube block given by its definition, rotation and position is connected to some other block in a given grid. More...
 
static bool CheckConnectivitySmallBlockToLargeGrid (MyCubeGrid grid, MyCubeBlockDefinition def, ref Quaternion rotation, ref Vector3I addNormal)
 Performs check whether small cube block given by its definition, rotation can be connected to large grid. Function checks whether a mount point on placed block exists in opposite direction than addNomal. More...
 
static bool CheckNeighborMountPoints (Vector3 currentMin, Vector3 currentMax, MyCubeBlockDefinition.MountPoint thisMountPoint, ref Vector3I thisMountPointTransformedNormal, MyCubeBlockDefinition thisDefinition, Vector3I neighborPosition, MyCubeBlockDefinition neighborDefinition, MyCubeBlockDefinition.MountPoint[] neighborMountPoints, MyBlockOrientation neighborOrientation, List< MyCubeBlockDefinition.MountPoint > otherMountPoints)
 
static bool CheckNeighborMountPointsForCompound (Vector3 currentMin, Vector3 currentMax, MyCubeBlockDefinition.MountPoint thisMountPoint, ref Vector3I thisMountPointTransformedNormal, MyCubeBlockDefinition thisDefinition, Vector3I neighborPosition, MyCubeBlockDefinition neighborDefinition, MyCubeBlockDefinition.MountPoint[] neighborMountPoints, MyBlockOrientation neighborOrientation, List< MyCubeBlockDefinition.MountPoint > otherMountPoints)
 
static bool CheckMountPointsForSide (MyCubeBlockDefinition defA, MyCubeBlockDefinition.MountPoint[] mountPointsA, ref MyBlockOrientation orientationA, ref Vector3I positionA, ref Vector3I normalA, MyCubeBlockDefinition defB, MyCubeBlockDefinition.MountPoint[] mountPointsB, ref MyBlockOrientation orientationB, ref Vector3I positionB)
 Checkes whether blocks A and B have matching mount point on one of their sides. Each block is given by its definition, rotation and position in grid. Position has to be relative to same center. Also, normal relative to block A specifies wall which is used for checking. More...
 
static bool CheckMountPointsForSide (List< MyCubeBlockDefinition.MountPoint > transormedA, ref MyBlockOrientation orientationA, ref Vector3I positionA, MyDefinitionId idA, ref Vector3I normalA, List< MyCubeBlockDefinition.MountPoint > transormedB, ref MyBlockOrientation orientationB, ref Vector3I positionB, MyDefinitionId idB)
 Checkes whether blocks A and B have matching mount point on one of their sides. Each block is given by its definition, rotation and position in grid. Position has to be relative to same center. Also, normal relative to block A specifies wall which is used for checking. More...
 
static void StartConverting (bool placeOnly)
 
static void ConvertPrefabsToObjs ()
 
static void PackFiles (string path, string objectName)
 
static void ExportObject (MyCubeGrid baseGrid, bool convertModelsFromSBC, bool exportObjAndSBC=false)
 
static void PlacePrefabsToWorld ()
 
static void PlacePrefabToWorld (MyObjectBuilder_CubeGrid[] currentPrefab, Vector3D position, List< MyCubeGrid > createdGrids=null)
 
static MyCubeGrid GetTargetGrid ()
 
static MyEntity GetTargetEntity ()
 Obtain entity that player is aiming/looking at. More...
 
static bool TryRayCastGrid (ref LineD worldRay, out MyCubeGrid hitGrid, out Vector3D worldHitPos)
 
static bool TestBlockPlacementArea (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, MyBlockOrientation blockOrientation, MyCubeBlockDefinition blockDefinition, ref Vector3D translation, ref Quaternion rotation, ref Vector3 halfExtents, ref BoundingBoxD localAabb, MyEntity ignoredEntity=null)
 
static bool TestBlockPlacementArea (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, MyBlockOrientation blockOrientation, MyCubeBlockDefinition blockDefinition, ref Vector3D translation, ref Quaternion rotation, ref Vector3 halfExtents, ref BoundingBoxD localAabb, out MyCubeGrid touchingGrid, MyEntity ignoredEntity=null, bool ignoreFracturedPieces=false)
 
static bool TestPlacementAreaCube (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, Vector3I min, Vector3I max, MyBlockOrientation blockOrientation, MyCubeBlockDefinition blockDefinition, MyEntity ignoredEntity=null, bool ignoreFracturedPieces=false)
 
static bool TestPlacementAreaCube (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, Vector3I min, Vector3I max, MyBlockOrientation blockOrientation, MyCubeBlockDefinition blockDefinition, out MyCubeGrid touchingGrid, MyEntity ignoredEntity=null, bool ignoreFracturedPieces=false)
 Test cube block placement area in grid. More...
 
static bool TestPlacementAreaCubeNoAABBInflate (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, Vector3I min, Vector3I max, MyBlockOrientation blockOrientation, MyCubeBlockDefinition blockDefinition, out MyCubeGrid touchingGrid, MyEntity ignoredEntity=null)
 
static bool TestPlacementArea (MyCubeGrid targetGrid, ref MyGridPlacementSettings settings, BoundingBoxD localAabb, bool dynamicBuildMode, MyEntity ignoredEntity=null)
 
static bool TestPlacementArea (MyCubeGrid targetGrid, bool targetGridIsStatic, ref MyGridPlacementSettings settings, BoundingBoxD localAabb, bool dynamicBuildMode, MyEntity ignoredEntity=null, bool testVoxel=true)
 
static bool IsAabbInsideVoxel (MatrixD worldMatrix, BoundingBoxD localAabb, MyGridPlacementSettings settings)
 Checks if aabb is in voxel. If settings provided it will return false if penetration settings allow for it. More...
 
static bool TestBlockPlacementArea (MyCubeBlockDefinition blockDefinition, MyBlockOrientation?blockOrientation, MatrixD worldMatrix, ref MyGridPlacementSettings settings, BoundingBoxD localAabb, bool dynamicBuildMode, MyEntity ignoredEntity=null, bool testVoxel=true)
 
static bool TestVoxelPlacement (MyCubeBlockDefinition blockDefinition, MyGridPlacementSettings settingsCopy, bool dynamicBuildMode, MatrixD worldMatrix, BoundingBoxD localAabb)
 
static bool TestPlacementVoxelMapOverlap (MyVoxelBase voxelMap, ref MyGridPlacementSettings settings, ref BoundingBoxD localAabb, ref MatrixD worldMatrix, bool touchingStaticGrid=false)
 
static void TransformMountPoints (List< MyCubeBlockDefinition.MountPoint > outMountPoints, MyCubeBlockDefinition def, MyCubeBlockDefinition.MountPoint[] mountPoints, ref MyBlockOrientation orientation)
 Fills passed lists with mount point data, which is transformed using orientation of the block. More...
 
static Vector3I StaticGlobalGrid_WorldToUGInt (Vector3D worldPos, float gridSize, bool staticGridAlignToCenter)
 Converts world coordinate to static global grid uniform coordinate (virtual large grid in whole world which every large grid is snapped to). Grid size is already used inside calculation. More...
 
static Vector3D StaticGlobalGrid_WorldToUG (Vector3D worldPos, float gridSize, bool staticGridAlignToCenter)
 Converts world coordinate to static global grid uniform coordinate (virtual large grid in whole world which every large grid is snapped to). Grid size is already used inside calculation. More...
 
static Vector3D StaticGlobalGrid_UGToWorld (Vector3D ugPos, float gridSize, bool staticGridAlignToCenter)
 Converts static global uniform grid coordinate to world coordinate. Grid size is already used inside calculation. More...
 
static bool IsInVoxels (MySlimBlock block, bool checkForPhysics=true)
 
static void CreateGridGroupLink (GridLinkTypeEnum type, long linkId, MyCubeGrid parent, MyCubeGrid child)
 
static bool BreakGridGroupLink (GridLinkTypeEnum type, long linkId, MyCubeGrid parent, MyCubeGrid child)
 
static void ResetInfoGizmos ()
 

Public Attributes

readonly SyncType SyncType
 
bool HasShipSoundEvents = false
 
int NumberOfReactors = 0
 
float GridGeneralDamageModifier = 1f
 
readonly BlockTypeCounter BlockCounter = new BlockTypeCounter()
 
Dictionary< MyObjectBuilderType, int > BlocksCounters = new Dictionary<MyObjectBuilderType, int>()
 
Vector3I XSymmetryPlane = null
 
Vector3I YSymmetryPlane = null
 
Vector3I ZSymmetryPlane = null
 
bool XSymmetryOdd = false
 
bool YSymmetryOdd = false
 
bool ZSymmetryOdd = false
 
int m_playedTime
 Grid play time with player. Used by respawn ship. More...
 
bool ControlledFromTurret = false
 
Sandbox.Game.Entities.Blocks.MyProjectorBase Projector
 
bool CreatePhysics
 
MyTerminalBlock MainCockpit = null
 
MyTerminalBlock MainRemoteControl = null
 
- 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

override void BeforeDelete ()
 
- Protected Member Functions inherited from VRage.Game.Entity.MyEntity
virtual bool CanBeAddedToRender ()
 
virtual MySyncComponentBase OnCreateSync ()
 
virtual void ClampToWorld ()
 
virtual void Closing ()
 
virtual void OnInventoryComponentAdded (MyInventoryBase inventory)
 
virtual void OnInventoryComponentRemoved (MyInventoryBase inventory)
 

Static Protected Member Functions

static float GetLineWidthForGizmo (IMyGizmoDrawableObject block, BoundingBox box)
 
- Static Protected Member Functions inherited from VRage.Game.Entity.MyEntity
static void UpdateNamedEmissiveParts (uint renderObjectId, string emissiveName, Color emissivePartColor, float emissivity)
 

Properties

Action< SyncBaseSyncPropertyChanged
 
HashSetReader< Vector3IDirtyBlocks [get]
 
MyCubeGridRenderData RenderData [get]
 
HashSet< MyCubeBlockBlocksForDraw [get]
 
bool IsSplit [get, set]
 
List< IMyBlockAdditionalModelGeneratorAdditionalModelGenerators [get]
 
MyCubeGridSystems GridSystems [get]
 
bool IsStatic [get]
 
float GridSize [get]
 
float GridScale [get]
 
float GridSizeHalf [get]
 
Vector3 GridSizeHalfVector [get]
 
float GridSizeR [get]
 Reciprocal of gridsize More...
 
Vector3I Min [get]
 
Vector3I Max [get]
 
bool IsRespawnGrid [get, set]
 Gets or sets indication if a grid coresponds to a respawn ship/cart. More...
 
bool DestructibleBlocks [get, set]
 
bool Editable [get, set]
 
bool BlocksDestructionEnabled [get]
 
List< long > SmallOwners [get]
 players that have at least one block in cube grid More...
 
List< long > BigOwners [get]
 players that have the maximum number of functional blocks in cube grid More...
 
MyCubeSize GridSizeEnum [get, set]
 
new MyGridPhysics Physics [get, set]
 
static int GridCounter [get]
 
int BlocksCount [get]
 
HashSet< MySlimBlockCubeBlocks [get]
 
long LocalCoordSystem [get, set]
 Local coord system under which this cube exists. (its id) More...
 
bool UsesTargetingList [get]
 
static bool ShowSenzorGizmos [get, set]
 
static bool ShowGravityGizmos [get, set]
 
static bool ShowCenterOfMass [get, set]
 
static bool ShowGridPivot [get, set]
 
static bool ShowAntennaGizmos [get, set]
 
static bool ShowStructuralIntegrity [get, set]
 
- Properties inherited from VRage.Game.ModAPI.IMyCubeGrid
List< long > BigOwners [get]
 List of players with majority of blocks on grid More...
 
List< long > SmallOwners [get]
 List of players with any blocks on grid More...
 
float GridSize [get]
 Grid size in meters More...
 
MyCubeSize GridSizeEnum [get, set]
 Grid size enumeration More...
 
bool IsStatic [get]
 Station = static More...
 
VRageMath.Vector3I Max [get]
 Maximum coordinates of blocks in grid More...
 
VRageMath.Vector3I Min [get]
 Minimum coordinates of blocks in grid More...
 
- 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]
 
- Properties inherited from VRage.Game.ModAPI.Ingame.IMyCubeGrid
float GridSize [get]
 Grid size in meters More...
 
MyCubeSize GridSizeEnum [get]
 Grid size enum More...
 
bool IsStatic [get]
 Station = static More...
 
VRageMath.Vector3I Max [get]
 Maximum coordinates of blocks in grid More...
 
VRageMath.Vector3I Min [get]
 Minimum coordinates of blocks in grid More...
 
- 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]
 

Events

Action< MySlimBlockOnBlockAdded
 
Action< MySlimBlockOnBlockRemoved
 
Action< MySlimBlockOnBlockIntegrityChanged
 
Action< MySlimBlockOnBlockClosed
 
Action< MyCubeGridOnAuthorshipChanged
 
Action< MyCubeGridOnBlockOwnershipChanged
 
Action< bool > OnIsStaticChanged
 
Action< MyCubeGrid, MyCubeGridOnGridSplit
 
Action< int > OnHavokSystemIDChanged
 
Action< MyCubeGridOnGridChanged
 
- Events inherited from VRage.Game.ModAPI.IMyCubeGrid
Action< IMySlimBlockOnBlockAdded
 
Action< IMySlimBlockOnBlockRemoved
 
Action< IMyCubeGridOnBlockOwnershipChanged
 
Action< IMyCubeGridOnGridChanged
 
- Events inherited from VRage.ModAPI.IMyEntity
Action< IMyEntityOnClose
 
Action< IMyEntityOnClosing
 
Action< IMyEntityOnMarkForClose
 
Action< IMyEntityOnPhysicsChanged
 
- 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
 

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
 
- Protected Attributes inherited from VRage.Game.Entity.MyEntity
List< MyHudEntityParamsm_hudParams
 
MyModel m_modelCollision
 

Detailed Description

Grid - small ship, large ship, station Cubes (armor, walls...) are merge and rendered by this entity Blocks (turret, thrusts...) are rendered as child entities

Definition at line 90 of file MyCubeGrid.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.MyCubeGrid.MyCubeGrid ( )
inline

Definition at line 547 of file MyCubeGrid.cs.

Member Function Documentation

void Sandbox.Game.Entities.MyCubeGrid.ActivatePhysics ( )
inline

Definition at line 8692 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.AddDirtyBone ( Vector3I  gridPosition,
Vector3I  boneOffset 
)
inline

Definition at line 4112 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.AddMissingBlocksInMultiBlock ( int  multiBlockId,
long  toolOwnerId 
)
inline

Definition at line 8217 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.AnnounceRemoveSplit ( List< MySlimBlock blocks)
inline

Definition at line 8992 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ApplyDestructionDeformation ( MySlimBlock  block,
float  damage = 1f,
MyHitInfo hitInfo = null,
long  attackerId = 0 
)
inline

Definition at line 4422 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.ApplyLastControls ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 9230 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.BeforeDelete ( )
inlineprotectedvirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1982 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.BreakGridGroupLink ( GridLinkTypeEnum  type,
long  linkId,
MyCubeGrid  parent,
MyCubeGrid  child 
)
inlinestatic

Definition at line 2769 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.BuildBlockRequest ( uint  colorMaskHsv,
MyBlockLocation  location,
[DynamicObjectBuilder] MyObjectBuilder_CubeBlock  blockObjectBuilder,
long  builderEntityId,
bool  instantBuild,
long  ownerId 
)
inline

Definition at line 3034 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.BuildBlocks ( ref MyBlockBuildArea  area,
long  builderEntityId,
long  ownerId 
)
inline

Network friendly alternative for building block

Definition at line 3097 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.BuildBlocks ( Vector3  colorMaskHsv,
HashSet< MyBlockLocation locations,
long  builderEntityId,
long  ownerId 
)
inline

Builds many same blocks, used when building lines or planes.

Definition at line 3112 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.BuildBlocksClient ( uint  colorMaskHsv,
HashSet< MyBlockLocation locations,
long  builderEntityId,
bool  instantBuilt,
long  ownerId 
)
inline

Definition at line 3174 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.BuildBlockSucess ( uint  colorMaskHsv,
MyBlockLocation  location,
[DynamicObjectBuilder] MyObjectBuilder_CubeBlock  blockObjectBuilder,
long  builderEntityId,
bool  instantBuild,
long  ownerId 
)
inline

Definition at line 3076 of file MyCubeGrid.cs.

MySlimBlock Sandbox.Game.Entities.MyCubeGrid.BuildGeneratedBlock ( MyBlockLocation  location,
Vector3  colorMaskHsv 
)
inline

Definition at line 3024 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.BuildMultiBlocks ( MyCubeGridMultiBlockInfo  multiBlockInfo,
ref MatrixI  transform,
List< int >  multiBlockIndices,
long  builderEntityId 
)
inline

Builds multiblock parts according to specified indices.

Definition at line 8116 of file MyCubeGrid.cs.

MatrixI Sandbox.Game.Entities.MyCubeGrid.CalculateMergeTransform ( MyCubeGrid  gridToMerge,
Vector3I  gridOffset 
)
inline

Definition at line 5638 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddCube ( Vector3I  pos,
MyBlockOrientation orientation,
MyCubeBlockDefinition  definition,
bool  ignoreSame = false 
)
inline

Definition at line 2293 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddCubes ( Vector3I  min,
Vector3I  max 
)
inline

Definition at line 2266 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddCubes ( Vector3I  min,
Vector3I  max,
MyBlockOrientation orientation,
MyCubeBlockDefinition  definition 
)
inline

Definition at line 2277 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddMissingBlocksInMultiBlock ( int  multiBlockId)
inline

Definition at line 8200 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddMultiBlocks ( MyCubeGridMultiBlockInfo  multiBlockInfo,
ref MatrixI  transform,
List< int >  multiBlockIndices 
)
inline

Definition at line 8086 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanAddOtherBlockInMultiBlock ( Vector3I  min,
Vector3I  max,
MyBlockOrientation  orientation,
MyCubeBlockDefinition  definition,
int?  ignoreMultiblockId 
)
inline

Checks if the given block can be added to place where multiblock area (note that even if some parts of multiblock are destroyed then they still occupy - virtually - its place).

Definition at line 8240 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanHavePhysics ( )
inline

Returns true when grid have at least one block which has physics (e.g. interior lights have no physics)

Definition at line 4261 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CanHavePhysics ( List< MySlimBlock blocks,
int  offset,
int  count 
)
inlinestatic

Returns true when grid have at least one block which has physics (lights has no physics)

Definition at line 4287 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanMergeCubes ( MyCubeGrid  gridToMerge,
Vector3I  gridOffset 
)
inline

Definition at line 5649 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CanPasteGrid ( )
inlinestatic

Definition at line 7905 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanPlaceBlock ( Vector3I  min,
Vector3I  max,
MyBlockOrientation  orientation,
MyCubeBlockDefinition  definition,
int?  ignoreMultiblockId = null,
bool  ignoreFracturedPieces = false 
)
inline

Definition at line 2366 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CanPlaceBlock ( Vector3I  min,
Vector3I  max,
MyBlockOrientation  orientation,
MyCubeBlockDefinition  definition,
ref MyGridPlacementSettings  gridSettings,
int?  ignoreMultiblockId = null,
bool  ignoreFracturedPieces = false 
)
inline

Definition at line 2372 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ChangeColor ( MySlimBlock  block,
Vector3  newHSV 
)
inline

Definition at line 5187 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangeDisplayNameRequest ( String  displayName)
inline

Definition at line 9022 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangeGridOwner ( long  playerId,
MyOwnershipShareModeEnum  shareMode 
)
inline

Definition at line 8974 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangeGridOwnership ( long  playerId,
MyOwnershipShareModeEnum  shareMode 
)
inline

Changes owner of all blocks on grid Call only on server!

Parameters
playerIdnew owner id
shareModenew share mode

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 5806 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangeOwner ( MyCubeBlock  block,
long  oldOwner,
long  newOwner 
)
inline

Definition at line 7539 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangeOwnerRequest ( MyCubeGrid  grid,
MyCubeBlock  block,
long  playerId,
MyOwnershipShareModeEnum  shareMode 
)
inline

Definition at line 8920 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.ChangeOwnersRequest ( MyOwnershipShareModeEnum  shareMode,
List< MySingleOwnershipRequest requests,
long  requestingPlayer 
)
inlinestatic

Definition at line 9110 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ChangePowerProducerState ( MyMultipleEnabledEnum  enabledState,
long  playerId 
)
inline

Definition at line 8861 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.CheckAreaConnectivity ( MyCubeGrid  grid,
ref MyBlockBuildArea  area,
List< Vector3UByte validOffsets,
HashSet< Vector3UByte resultFailList 
)
inlinestatic

Definition at line 594 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckConnectivity ( IMyGridConnectivityTest  grid,
MyCubeBlockDefinition  def,
MyCubeBlockDefinition.MountPoint[]  mountPoints,
ref Quaternion  rotation,
ref Vector3I  position 
)
inlinestatic

Performs check whether cube block given by its definition, rotation and position is connected to some other block in a given grid.

Parameters
gridGrid in which the check is performed.
rotationRotation of the cube block within grid.
positionPosition of the cube block within grid.
Returns
True when there is a connectable neighbor connected by a mount point, otherwise false.

Definition at line 691 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckConnectivitySmallBlockToLargeGrid ( MyCubeGrid  grid,
MyCubeBlockDefinition  def,
ref Quaternion  rotation,
ref Vector3I  addNormal 
)
inlinestatic

Performs check whether small cube block given by its definition, rotation can be connected to large grid. Function checks whether a mount point on placed block exists in opposite direction than addNomal.

Parameters
gridGrid in which the check is performed.
defDefinition of small cube block for checking.
rotationRotation of the small cube block.
addNormalGrid hit normal.
Returns
True when small block can be connected, otherwise false.

Definition at line 856 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckMergeConnectivity ( MyCubeGrid  hitGrid,
MyCubeGrid  gridToMerge,
Vector3I  gridOffset 
)
inlinestatic

Definition at line 657 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckMountPointsForSide ( MyCubeBlockDefinition  defA,
MyCubeBlockDefinition.MountPoint[]  mountPointsA,
ref MyBlockOrientation  orientationA,
ref Vector3I  positionA,
ref Vector3I  normalA,
MyCubeBlockDefinition  defB,
MyCubeBlockDefinition.MountPoint[]  mountPointsB,
ref MyBlockOrientation  orientationB,
ref Vector3I  positionB 
)
inlinestatic

Checkes whether blocks A and B have matching mount point on one of their sides. Each block is given by its definition, rotation and position in grid. Position has to be relative to same center. Also, normal relative to block A specifies wall which is used for checking.

Definition at line 958 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckMountPointsForSide ( List< MyCubeBlockDefinition.MountPoint transormedA,
ref MyBlockOrientation  orientationA,
ref Vector3I  positionA,
MyDefinitionId  idA,
ref Vector3I  normalA,
List< MyCubeBlockDefinition.MountPoint transormedB,
ref MyBlockOrientation  orientationB,
ref Vector3I  positionB,
MyDefinitionId  idB 
)
inlinestatic

Checkes whether blocks A and B have matching mount point on one of their sides. Each block is given by its definition, rotation and position in grid. Position has to be relative to same center. Also, normal relative to block A specifies wall which is used for checking.

Definition at line 971 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckNeighborMountPoints ( Vector3  currentMin,
Vector3  currentMax,
MyCubeBlockDefinition.MountPoint  thisMountPoint,
ref Vector3I  thisMountPointTransformedNormal,
MyCubeBlockDefinition  thisDefinition,
Vector3I  neighborPosition,
MyCubeBlockDefinition  neighborDefinition,
MyCubeBlockDefinition.MountPoint[]  neighborMountPoints,
MyBlockOrientation  neighborOrientation,
List< MyCubeBlockDefinition.MountPoint otherMountPoints 
)
inlinestatic

Definition at line 889 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.CheckNeighborMountPointsForCompound ( Vector3  currentMin,
Vector3  currentMax,
MyCubeBlockDefinition.MountPoint  thisMountPoint,
ref Vector3I  thisMountPointTransformedNormal,
MyCubeBlockDefinition  thisDefinition,
Vector3I  neighborPosition,
MyCubeBlockDefinition  neighborDefinition,
MyCubeBlockDefinition.MountPoint[]  neighborMountPoints,
MyBlockOrientation  neighborOrientation,
List< MyCubeBlockDefinition.MountPoint otherMountPoints 
)
inlinestatic

Definition at line 920 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.ClearSymmetries ( )
inline

Clears symmetry planes

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 2316 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.CloseStructuralIntegrity ( )
inline

Definition at line 1417 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ColorBlocks ( Vector3I  min,
Vector3I  max,
Vector3  newHSV,
bool  playSound 
)
inline

Color block in area. Verry slow.

Parameters
min
max
newHSV
playSound

Definition at line 3861 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ColorGrid ( Vector3  newHSV,
bool  playSound 
)
inline

Definition at line 3868 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ConvertFracturedBlocksToComponents ( )
inline

Definition at line 7929 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.ConvertPrefabsToObjs ( )
inlinestatic

Definition at line 1123 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.ConvertToDynamic ( )
inline

Converts station to ship

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 4350 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ConvertToStatic ( )
inline

Definition at line 4370 of file MyCubeGrid.cs.

MyFracturedBlock Sandbox.Game.Entities.MyCubeGrid.CreateFracturedBlock ( MyObjectBuilder_FracturedBlock  fracturedBlockBuilder,
Vector3I  position 
)
inline

Definition at line 7582 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.CreateGridGroupLink ( GridLinkTypeEnum  type,
long  linkId,
MyCubeGrid  parent,
MyCubeGrid  child 
)
inlinestatic

Definition at line 2764 of file MyCubeGrid.Static.cs.

static MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.CreateSplit ( MyCubeGrid  originalGrid,
List< MySlimBlock blocks,
bool  sync = true,
long  newEntityId = 0 
)
inlinestatic

Definition at line 916 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.CreateSplit_Implementation ( List< Vector3I blocks,
long  newEntityId 
)
inline

Definition at line 980 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.CreateSplits ( MyCubeGrid  originalGrid,
List< MySlimBlock splitBlocks,
List< MyDisconnectHelper.Group groups,
bool  sync = true 
)
inlinestatic

SplitBlocks list can contain null when received from network

Definition at line 1003 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.CreateSplits_Implementation ( List< Vector3I blocks,
List< MyDisconnectHelper.Group groups 
)
inline

Definition at line 1110 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.CreateStructuralIntegrity ( )
inline

Definition at line 1409 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CubeExists ( Vector3I  pos)
inline

Returns true if there is any block occupying given position

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 5078 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.DebugDrawPositions ( List< Vector3I positions)
inline

Definition at line 2455 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.DebugDrawRange ( Vector3I  min,
Vector3I  max 
)
inline

Definition at line 2439 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.DeserializeControls ( BitStream  stream,
bool  outOfOrder 
)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 9214 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.DetectDisconnectsAfterFrame ( )
inline

Definition at line 5040 of file MyCubeGrid.cs.

MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.DetectMerge ( MySlimBlock  block,
MyCubeGrid  ignore = null,
List< MyEntity nearEntities = null 
)
inline

Tries to merge this grid with any other grid Merges grids only when both are static Returns the merged grid (which does not necessarily have to be this grid)

Definition at line 5548 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.DoDamage ( float  damage,
MyHitInfo  hitInfo,
Vector3 localPos = null,
long  attackerId = 0 
)
inline

Definition at line 4381 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.EnableGenerators ( bool  enable,
bool  fromServer = false 
)
inline

Definition at line 7657 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.EnqueueDestroyedBlock ( Vector3I  position)
inline

Definition at line 2800 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.EnqueueDestroyedBlockWithId ( Vector3I  position,
ushort?  compoundId,
bool  generatorEnabled 
)
inline

Definition at line 2870 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.EnqueueDestructionDeformationBlock ( Vector3I  position)
inline

Definition at line 2792 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.EnqueueRemovedBlock ( Vector3I  position,
bool  generatorsEnabled 
)
inline

Definition at line 2808 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.EnqueueRemovedBlockWithId ( Vector3I  position,
ushort?  compoundId,
bool  generatorsEnabled 
)
inline

Server method, adds removed block with compound id into queue

Definition at line 2856 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.ExportObject ( MyCubeGrid  baseGrid,
bool  convertModelsFromSBC,
bool  exportObjAndSBC = false 
)
inlinestatic

Definition at line 1196 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.FixTargetCube ( out Vector3I  cube,
Vector3  fractionalGridPosition 
)
inline

Iterate over all the neighbors of the cube and return when one of them exists.

Definition at line 4172 of file MyCubeGrid.cs.

MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.GetBiggestGridInGroup ( )
inline

Returns biggest grid in physical group by AABB volume

Definition at line 7913 of file MyCubeGrid.cs.

HashSet<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.GetBlocks ( )
inline

Definition at line 4242 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetBlocksInMultiBlock ( int  multiBlockId,
HashSet< Tuple< MySlimBlock, ushort?>>  outMultiBlocks 
)
inline

Writes multiblocks (compound block and block ID) to outMultiBlocks collection with the same multiblockId.

Definition at line 8058 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetBlocksInsideSphere ( ref BoundingSphereD  sphere,
HashSet< MySlimBlock blocks 
)
inline

Definition at line 6621 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetBlocksInsideSpheres ( ref BoundingSphereD  sphere1,
ref BoundingSphereD  sphere2,
ref BoundingSphereD  sphere3,
HashSet< MySlimBlock blocks1,
HashSet< MySlimBlock blocks2,
HashSet< MySlimBlock blocks3,
bool  respectDeformationRatio,
float  detectionBlockHalfSize,
ref MatrixD  invWorldGrid 
)
inline

Optimized version where spheres are sorted from smallest to largest

Parameters
sphere1
sphere2
sphere3
blocks1
blocks2
blocks3
respectDeformationRatio
detectionBlockHalfSize
invWorldGrid

Definition at line 7100 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetBlocksIntersectingOBB ( BoundingBoxD  box,
MatrixD  boxTransform,
List< MySlimBlock blocks 
)
inline

Definition at line 6993 of file MyCubeGrid.cs.

Vector3 Sandbox.Game.Entities.MyCubeGrid.GetClosestCorner ( Vector3I  gridPos,
Vector3  position 
)
inline

Returns cube corner which is closest to position

Definition at line 5035 of file MyCubeGrid.cs.

MySlimBlock Sandbox.Game.Entities.MyCubeGrid.GetCubeBlock ( Vector3I  pos)
inline

Get cube block at given position

Parameters
posBlock position
Returns
Block or null if none is present at given position

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 4125 of file MyCubeGrid.cs.

MySlimBlock Sandbox.Game.Entities.MyCubeGrid.GetCubeBlock ( Vector3I  pos,
ushort?  compoundId 
)
inline

Definition at line 4137 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.GetCubeParts ( MyCubeBlockDefinition  block,
Vector3I  inputPosition,
Matrix  rotation,
float  gridSize,
List< string >  outModels,
List< MatrixD outLocalMatrices,
List< Vector3 outLocalNormals,
List< Vector2 outPatternOffsets 
)
inlinestatic

Definition at line 393 of file MyCubeGrid.Static.cs.

static void Sandbox.Game.Entities.MyCubeGrid.GetCubePartsWithoutTopologyCheck ( MyCubeBlockDefinition  block,
Vector3I  inputPosition,
Matrix  rotation,
float  gridSize,
List< string >  outModels,
List< MatrixD outLocalMatrices,
List< Vector3 outLocalNormals,
List< Vector2 outPatternOffsets 
)
inlinestatic

Definition at line 196 of file MyCubeGrid.Static.cs.

int Sandbox.Game.Entities.MyCubeGrid.GetCurrentMass ( MyCharacter  pilot = null)
inline

Definition at line 1606 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.GetCurrentMass ( out int  baseMass,
MyCharacter  pilot = null 
)
inline

Definition at line 1612 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetExistingBones ( Vector3I  boneMin,
Vector3I  boneMax,
Dictionary< Vector3I, MySlimBlock resultSet,
MyDamageInformation damageInfo = null 
)
inline

Definition at line 5487 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.GetFatBlockCount< T > ( )
inline

Return how much fat blocks defined by T is pressent in grid.

Template Parameters
TType of Fatblock
Returns
Type Constraints
T :MyCubeBlock 

Definition at line 537 of file MyCubeGrid.cs.

ListReader<MyCubeBlock> Sandbox.Game.Entities.MyCubeGrid.GetFatBlocks ( )
inline

Definition at line 4247 of file MyCubeGrid.cs.

Type Constraints
T :MyCubeBlock 

Definition at line 4252 of file MyCubeGrid.cs.

T Sandbox.Game.Entities.MyCubeGrid.GetFirstBlockOfType< T > ( )
inline
Type Constraints
T :MyCubeBlock 

Definition at line 4157 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.GetGeneratedBlocks ( MySlimBlock  generatingBlock,
List< MySlimBlock outGeneratedBlocks 
)
inline

Returns array of generated blocks from given generating block.

Definition at line 7737 of file MyCubeGrid.cs.

MySlimBlock Sandbox.Game.Entities.MyCubeGrid.GetGeneratingBlock ( MySlimBlock  generatedBlock)
inline

Definition at line 7686 of file MyCubeGrid.cs.

override bool Sandbox.Game.Entities.MyCubeGrid.GetIntersectionWithLine ( ref LineD  line,
out MyIntersectionResultLineTriangleEx tri,
IntersectionFlags  flags = IntersectionFlags.ALL_TRIANGLES 
)
inline

Implements VRage.ModAPI.IMyEntity.

Definition at line 2024 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.GetIntersectionWithLine ( ref LineD  line,
ref MyCubeGridHitInfo  info,
IntersectionFlags  flags = IntersectionFlags.ALL_TRIANGLES 
)
inline

Definition at line 2031 of file MyCubeGrid.cs.

override bool Sandbox.Game.Entities.MyCubeGrid.GetIntersectionWithSphere ( ref BoundingSphereD  sphere)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 2121 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.GetLineIntersection ( ref LineD  line,
out MyCubeGrid  grid,
out Vector3I  position,
out double  distanceSquared 
)
inlinestatic

Definition at line 6529 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.GetLineIntersectionExact ( ref LineD  line,
out MyCubeGrid  grid,
out Vector3I  position,
out double  distanceSquared 
)
inlinestatic

Definition at line 6560 of file MyCubeGrid.cs.

Vector3D Sandbox.Game.Entities.MyCubeGrid.GetLineIntersectionExactAll ( ref LineD  line,
out double  distance,
out MySlimBlock  intersectedBlock 
)
inline

Returns closest line (in world space) intersection with all cubes.

Definition at line 6592 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.GetLineIntersectionExactGrid ( ref LineD  line,
ref Vector3I  position,
ref double  distanceSquared 
)
inline

Same as GetLineIntersectionExactAll just without intersected block

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 6314 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.GetLineIntersectionExactGrid ( ref LineD  line,
ref Vector3I  position,
ref double  distanceSquared,
MyPhysics.HitInfo hitInfo = null 
)
inline

Definition at line 6318 of file MyCubeGrid.cs.

static float Sandbox.Game.Entities.MyCubeGrid.GetLineWidthForGizmo ( IMyGizmoDrawableObject  block,
BoundingBox  box 
)
inlinestaticprotected

Definition at line 1465 of file MyCubeGrid.cs.

MyCubeGridMultiBlockInfo Sandbox.Game.Entities.MyCubeGrid.GetMultiBlockInfo ( int  multiBlockId)
inline

Definition at line 8043 of file MyCubeGrid.cs.

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

Gets object builder from object.

Returns

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1295 of file MyCubeGrid.cs.

MySlimBlock Sandbox.Game.Entities.MyCubeGrid.GetTargetedBlock ( Vector3D  position)
inline

Parameters
positionIn world coordinates

Definition at line 8275 of file MyCubeGrid.cs.

static MyEntity Sandbox.Game.Entities.MyCubeGrid.GetTargetEntity ( )
inlinestatic

Obtain entity that player is aiming/looking at.

Definition at line 1572 of file MyCubeGrid.Static.cs.

static MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.GetTargetGrid ( )
inlinestatic

Obtain grid that player is aiming/looking at.

Definition at line 1559 of file MyCubeGrid.Static.cs.

static Vector3D Sandbox.Game.Entities.MyCubeGrid.GridIntegerToWorld ( float  gridSize,
Vector3I  gridCoords,
MatrixD  worldMatrix 
)
inlinestatic

Definition at line 2241 of file MyCubeGrid.cs.

Vector3D Sandbox.Game.Entities.MyCubeGrid.GridIntegerToWorld ( Vector3I  gridCoords)
inline

Converts grid coordinates to world space

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 2248 of file MyCubeGrid.cs.

Vector3D Sandbox.Game.Entities.MyCubeGrid.GridIntegerToWorld ( Vector3D  gridCoords)
inline

Definition at line 2253 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.HasMainCockpit ( )
inline

Definition at line 503 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.HasMainRemoteControl ( )
inline

Definition at line 518 of file MyCubeGrid.cs.

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

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 617 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.IsAabbInsideVoxel ( MatrixD  worldMatrix,
BoundingBoxD  localAabb,
MyGridPlacementSettings  settings 
)
inlinestatic

Checks if aabb is in voxel. If settings provided it will return false if penetration settings allow for it.

Parameters
worldMatrixWorld matrix of the aabb.
localAabbLocal aabb
settingsGame settings
Returns

Definition at line 1899 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsDirty ( )
inline

Definition at line 5133 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsGizmoDrawingEnabled ( )
inline

Definition at line 1480 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.IsGridInCompleteState ( MyCubeGrid  grid)
inlinestatic

Definition at line 8258 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.IsInVoxels ( MySlimBlock  block,
bool  checkForPhysics = true 
)
inlinestatic

Definition at line 2738 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsMainCockpit ( MyTerminalBlock  cockpit)
inline

Definition at line 508 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsMainRemoteControl ( MyTerminalBlock  remoteControl)
inline

Definition at line 523 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsTouchingAnyNeighbor ( Vector3I  min,
Vector3I  max 
)
inline

Finds out if given area has any neighboring block

Parameters
min
max
Returns

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 2323 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsTransferBlocksBuiltByIDPossible ( long  oldOwner,
long  newOwner 
)
inline

Find out whether a player blocks are supposed to be trasfered to has enough free blocks to accept them

Definition at line 2996 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsTrash ( )
inline

Algorithm used by game to define useless grids to be deleted

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 2221 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.LocalToGridInteger ( Vector3  localCoords)
inline

Definition at line 2260 of file MyCubeGrid.cs.

MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.MergeGrid_MergeBlock ( MyCubeGrid  gridToMerge,
Vector3I  gridOffset 
)
inline

Definition at line 5749 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ModifyGroup ( MyBlockGroup  group)
inline

Definition at line 9033 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.MultiplyBlockSkeleton ( MySlimBlock  block,
float  factor,
bool  updateSync = false 
)
inline

Definition at line 4056 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.OnAddedToScene ( object  source)
inlinevirtual

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

Parameters
sourceThe source of activation.

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1961 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.OnConvertedToShipRequest ( )
inline

Definition at line 8899 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.OnConvertedToStationRequest ( )
inline

Definition at line 8910 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.OnIntegrityChanged ( MySlimBlock  block)
inline

Definition at line 7801 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.OnRemovedFromScene ( object  source)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1975 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.PackFiles ( string  path,
string  objectName 
)
inlinestatic

Definition at line 1136 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.PasteBlocksToGrid ( List< MyObjectBuilder_CubeGrid gridsToMerge,
long  inventoryEntityId,
bool  multiBlock,
bool  instantBuild 
)
inline

Definition at line 7806 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.PlacePrefabsToWorld ( )
inlinestatic

Definition at line 1498 of file MyCubeGrid.Static.cs.

static void Sandbox.Game.Entities.MyCubeGrid.PlacePrefabToWorld ( MyObjectBuilder_CubeGrid[]  currentPrefab,
Vector3D  position,
List< MyCubeGrid createdGrids = null 
)
inlinestatic

Definition at line 1512 of file MyCubeGrid.Static.cs.

static void Sandbox.Game.Entities.MyCubeGrid.Preload ( )
inlinestatic

Definition at line 116 of file MyCubeGrid.Static.cs.

override void Sandbox.Game.Entities.MyCubeGrid.PrepareForDraw ( )
inlinevirtual

Method is called defacto from Update, preparation fo Draw

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1485 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.PrepareMultiBlockInfos ( )
inline

Definition at line 7960 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RaiseGridChanged ( )
inline

Definition at line 453 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.RayCastBlocks ( Vector3D  worldStart,
Vector3D  worldEnd 
)
inline

Obtains position of first hit block.

Definition at line 7271 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RayCastCells ( Vector3D  worldStart,
Vector3D  worldEnd,
List< Vector3I outHitPositions,
Vector3I gridSizeInflate = null,
bool  havokWorld = false,
bool  clearOutHitPositions = true 
)
inline

Obtains positions of grid cells regardless of whether these cells are taken up by blocks or not.

Definition at line 7287 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.RayCastStaticCells ( Vector3D  worldStart,
Vector3D  worldEnd,
List< Vector3I outHitPositions,
float  gridSize,
Vector3I gridSizeInflate = null,
bool  havokWorld = false 
)
inlinestatic

Obtains positions of static grid cells regardless of whether these cells are taken up by blocks or not. Usefull when placing block on voxel.

Definition at line 7320 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlock ( Vector3I  position)
inline

Remove block at given position

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 3659 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlockInCompoundBlock ( List< Tuple< Vector3I, ushort >>  locationsAndIds)
inline

Definition at line 9071 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlocks ( ref Vector3I  pos,
ref Vector3UByte  size 
)
inline

Remove blocks in given area

Parameters
posStarting position
sizeArea extents

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 3483 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlocks ( List< Vector3I locations)
inline

Razes blocks (unbuild)

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 3669 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlocksClient ( List< Vector3I locations)
inline

Definition at line 3686 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeBlocksRequest ( List< Vector3I locations)
inline

Definition at line 3675 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeGeneratedBlocks ( List< Vector3I locations)
inline

Definition at line 3718 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeGeneratedBlocks ( List< MySlimBlock generatedBlocks)
inline

Definition at line 3815 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RazeGeneratedBlocksInCompoundBlock ( List< Tuple< Vector3I, ushort >>  locationsAndIds)
inline

Definition at line 3765 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RecalculateGravity ( )
inline

Definition at line 8685 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RecalculateOwners ( )
inline

Definition at line 7548 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RemoveBlock ( MySlimBlock  block,
bool  updatePhysics = false 
)
inline

Definition at line 4951 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RemoveBlocksBuiltByID ( long  identityID)
inline

Remove all blocks from the grid built by specific player

Definition at line 2921 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RemoveBlockWithId ( MySlimBlock  block,
bool  updatePhysics = false 
)
inline

Definition at line 4972 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RemoveBlockWithId ( Vector3I  position,
ushort?  compoundId,
bool  updatePhysics = false 
)
inline

Definition at line 4992 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RemoveDestroyedBlock ( MySlimBlock  block,
long  attackerId = 0 
)
inline

Removes destroyed block, applies damage and deformation to close blocks Won't update physics!

Definition at line 4522 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.RemoveSplit ( MyCubeGrid  originalGrid,
List< MySlimBlock blocks,
int  offset,
int  count,
bool  sync = true 
)
inlinestatic

Definition at line 857 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RequestConversionToShip ( )
inline

Definition at line 8888 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RequestConversionToStation ( )
inline

Definition at line 8893 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RequestConvertToDynamic ( )
inline

Definition at line 8677 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RequestFillStockpile ( Vector3I  blockPosition,
MyInventory  fromInventory 
)
inline

Definition at line 8802 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.RequestSetToConstruction ( Vector3I  blockPosition,
MyInventory  fromInventory 
)
inline

Definition at line 8830 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.ResetBlockSkeleton ( MySlimBlock  block,
bool  updateSync = false 
)
inline

Definition at line 4051 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.ResetInfoGizmos ( )
inlinestatic

Definition at line 2774 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.ResetStructuralIntegrity ( )
inline

Definition at line 1856 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendFractureComponentRepaired ( MySlimBlock  mySlimBlock,
long  toolOwner 
)
inline

Definition at line 8782 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendGridCloseRequest ( )
inline

Use only for cut request

Definition at line 8352 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.SendHudNotificationAfterPaste ( )
inlinestatic

Definition at line 8598 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendIntegrityChanged ( MySlimBlock  mySlimBlock,
MyIntegrityChangeEnum  integrityChangeType,
long  toolOwner 
)
inline

Definition at line 8769 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendPowerDistributorState ( MyMultipleEnabledEnum  enabledState,
long  playerId 
)
inline

Definition at line 8866 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendReflectorState ( MyMultipleEnabledEnum  value)
inline

Definition at line 8758 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendRemovedBlocks ( )
inline

Definition at line 2819 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendRemovedBlocksWithIds ( )
inline

Definition at line 2881 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendStockpileChanged ( MySlimBlock  mySlimBlock,
List< MyStockpileItem list 
)
inline

Definition at line 8774 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SendTransferRequestMessage ( long  oldOwner,
long  newOwner,
ulong  newOwnerSteamId 
)
inline

Send a message to a player who is supposed to receive blocks built by a player

Definition at line 2947 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.SerializeControls ( BitStream  stream)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 9196 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SetBlockDirty ( MySlimBlock  cubeBlock)
inline

Definition at line 2430 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SetCubeDirty ( Vector3I  pos)
inline

Definition at line 2420 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SetHandbrakeRequest ( bool  v)
inline

Definition at line 8969 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SetMainCockpit ( MyTerminalBlock  cockpit)
inline

Definition at line 513 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.SetMainRemoteControl ( MyTerminalBlock  remoteControl)
inline

Definition at line 527 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.ShowPasteFailedOperation ( )
inlinestatic

Definition at line 8592 of file MyCubeGrid.cs.

MyCubeGrid Sandbox.Game.Entities.MyCubeGrid.SplitByPlane ( PlaneD  plane)
inline

Definition at line 893 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.StartConverting ( bool  placeOnly)
inlinestatic

Definition at line 1092 of file MyCubeGrid.Static.cs.

static Vector3D Sandbox.Game.Entities.MyCubeGrid.StaticGlobalGrid_UGToWorld ( Vector3D  ugPos,
float  gridSize,
bool  staticGridAlignToCenter 
)
inlinestatic

Converts static global uniform grid coordinate to world coordinate. Grid size is already used inside calculation.

Definition at line 2675 of file MyCubeGrid.Static.cs.

static Vector3D Sandbox.Game.Entities.MyCubeGrid.StaticGlobalGrid_WorldToUG ( Vector3D  worldPos,
float  gridSize,
bool  staticGridAlignToCenter 
)
inlinestatic

Converts world coordinate to static global grid uniform coordinate (virtual large grid in whole world which every large grid is snapped to). Grid size is already used inside calculation.

Definition at line 2663 of file MyCubeGrid.Static.cs.

static Vector3I Sandbox.Game.Entities.MyCubeGrid.StaticGlobalGrid_WorldToUGInt ( Vector3D  worldPos,
float  gridSize,
bool  staticGridAlignToCenter 
)
inlinestatic

Converts world coordinate to static global grid uniform coordinate (virtual large grid in whole world which every large grid is snapped to). Grid size is already used inside calculation.

Definition at line 2654 of file MyCubeGrid.Static.cs.

void Sandbox.Game.Entities.MyCubeGrid.TargetingAddId ( long  id)
inline

Definition at line 9247 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.TargetingCanAttackGrid ( long  id)
inline

Definition at line 9267 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.TargetingRemoveId ( long  id)
inline

Definition at line 9254 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.TargetingSetWhitelist ( bool  whitelist)
inline

Definition at line 9261 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestBlockPlacementArea ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
MyBlockOrientation  blockOrientation,
MyCubeBlockDefinition  blockDefinition,
ref Vector3D  translation,
ref Quaternion  rotation,
ref Vector3  halfExtents,
ref BoundingBoxD  localAabb,
MyEntity  ignoredEntity = null 
)
inlinestatic

Definition at line 1626 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestBlockPlacementArea ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
MyBlockOrientation  blockOrientation,
MyCubeBlockDefinition  blockDefinition,
ref Vector3D  translation,
ref Quaternion  rotation,
ref Vector3  halfExtents,
ref BoundingBoxD  localAabb,
out MyCubeGrid  touchingGrid,
MyEntity  ignoredEntity = null,
bool  ignoreFracturedPieces = false 
)
inlinestatic

Definition at line 1641 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestBlockPlacementArea ( MyCubeBlockDefinition  blockDefinition,
MyBlockOrientation blockOrientation,
MatrixD  worldMatrix,
ref MyGridPlacementSettings  settings,
BoundingBoxD  localAabb,
bool  dynamicBuildMode,
MyEntity  ignoredEntity = null,
bool  testVoxel = true 
)
inlinestatic

Definition at line 1921 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementArea ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
BoundingBoxD  localAabb,
bool  dynamicBuildMode,
MyEntity  ignoredEntity = null 
)
inlinestatic

Definition at line 1797 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementArea ( MyCubeGrid  targetGrid,
bool  targetGridIsStatic,
ref MyGridPlacementSettings  settings,
BoundingBoxD  localAabb,
bool  dynamicBuildMode,
MyEntity  ignoredEntity = null,
bool  testVoxel = true 
)
inlinestatic

Definition at line 1847 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementAreaCube ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
Vector3I  min,
Vector3I  max,
MyBlockOrientation  blockOrientation,
MyCubeBlockDefinition  blockDefinition,
MyEntity  ignoredEntity = null,
bool  ignoreFracturedPieces = false 
)
inlinestatic

Definition at line 1714 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementAreaCube ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
Vector3I  min,
Vector3I  max,
MyBlockOrientation  blockOrientation,
MyCubeBlockDefinition  blockDefinition,
out MyCubeGrid  touchingGrid,
MyEntity  ignoredEntity = null,
bool  ignoreFracturedPieces = false 
)
inlinestatic

Test cube block placement area in grid.

Definition at line 1731 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementAreaCubeNoAABBInflate ( MyCubeGrid  targetGrid,
ref MyGridPlacementSettings  settings,
Vector3I  min,
Vector3I  max,
MyBlockOrientation  blockOrientation,
MyCubeBlockDefinition  blockDefinition,
out MyCubeGrid  touchingGrid,
MyEntity  ignoredEntity = null 
)
inlinestatic

Definition at line 1770 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestPlacementVoxelMapOverlap ( MyVoxelBase  voxelMap,
ref MyGridPlacementSettings  settings,
ref BoundingBoxD  localAabb,
ref MatrixD  worldMatrix,
bool  touchingStaticGrid = false 
)
inlinestatic

Definition at line 2458 of file MyCubeGrid.Static.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TestVoxelPlacement ( MyCubeBlockDefinition  blockDefinition,
MyGridPlacementSettings  settingsCopy,
bool  dynamicBuildMode,
MatrixD  worldMatrix,
BoundingBoxD  localAabb 
)
inlinestatic

Definition at line 1958 of file MyCubeGrid.Static.cs.

override string Sandbox.Game.Entities.MyCubeGrid.ToString ( )
inline

Definition at line 2212 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.TransferBlocksBuiltByID ( long  oldOwner,
long  newOwner 
)
inline

Transfer all blocks built by a specific player to another player

Definition at line 2933 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.TransformMountPoints ( List< MyCubeBlockDefinition.MountPoint outMountPoints,
MyCubeBlockDefinition  def,
MyCubeBlockDefinition.MountPoint[]  mountPoints,
ref MyBlockOrientation  orientation 
)
inlinestatic

Fills passed lists with mount point data, which is transformed using orientation of the block.

Parameters
outMountPointsOutput buffer.
performCorrectionTrue when you want to have correction performed for when rotation of fractional values would have different result than integers.

Definition at line 2538 of file MyCubeGrid.Static.cs.

static void Sandbox.Game.Entities.MyCubeGrid.TryCreateGrid_Implementation ( MyCubeSize  cubeSize,
bool  isStatic,
MyPositionAndOrientation  position,
long  inventoryEntityId,
bool  instantBuild 
)
inlinestatic

Definition at line 8284 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.TryGetCube ( Vector3I  position,
out MyCube  cube 
)
inline

Definition at line 5147 of file MyCubeGrid.cs.

static void Sandbox.Game.Entities.MyCubeGrid.TryPasteGrid_Implementation ( List< MyObjectBuilder_CubeGrid entities,
bool  detectDisconnects,
long  inventoryEntityId,
Vector3  objectVelocity,
bool  multiBlock,
bool  instantBuild 
)
inlinestatic

Definition at line 8553 of file MyCubeGrid.cs.

static bool Sandbox.Game.Entities.MyCubeGrid.TryRayCastGrid ( ref LineD  worldRay,
out MyCubeGrid  hitGrid,
out Vector3D  worldHitPos 
)
inlinestatic

Definition at line 1599 of file MyCubeGrid.Static.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateAfterSimulation ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1673 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateAfterSimulation100 ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1640 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateBeforeSimulation ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1426 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateBeforeSimulation10 ( )
inlinevirtual

Called each 10th frame if registered for update10

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1576 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateBeforeSimulation100 ( )
inlinevirtual

Called each 100th frame if registered for update100

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1588 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.UpdateBlockNeighbours ( MySlimBlock  block)
inline

Definition at line 5019 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.UpdateDirty ( )
inline

Definition at line 5083 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.UpdateInstanceData ( )
inline

Definition at line 5137 of file MyCubeGrid.cs.

override void Sandbox.Game.Entities.MyCubeGrid.UpdateOnceBeforeFrame ( )
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 1393 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.UpdateOwnership ( long  ownerId,
bool  isFunctional 
)
inline

Implements VRage.Game.ModAPI.IMyCubeGrid.

Definition at line 7556 of file MyCubeGrid.cs.

void Sandbox.Game.Entities.MyCubeGrid.UpdateOxygenAmount ( float[]  oxygenAmount)
inline

Definition at line 7857 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.WillRemoveBlockSplitGrid ( MySlimBlock  testBlock)
inline

Definition at line 8269 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.WorldToGridInteger ( Vector3D  coords)
inline

Definition at line 2227 of file MyCubeGrid.cs.

Vector3D Sandbox.Game.Entities.MyCubeGrid.WorldToGridScaledLocal ( Vector3D  coords)
inline

Definition at line 2234 of file MyCubeGrid.cs.

Member Data Documentation

readonly BlockTypeCounter Sandbox.Game.Entities.MyCubeGrid.BlockCounter = new BlockTypeCounter()

Definition at line 234 of file MyCubeGrid.cs.

Dictionary<MyObjectBuilderType, int> Sandbox.Game.Entities.MyCubeGrid.BlocksCounters = new Dictionary<MyObjectBuilderType, int>()

Definition at line 238 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ControlledFromTurret = false

Definition at line 291 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.CreatePhysics

Definition at line 452 of file MyCubeGrid.cs.

float Sandbox.Game.Entities.MyCubeGrid.GridGeneralDamageModifier = 1f

Definition at line 231 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.HasShipSoundEvents = false

Definition at line 229 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.m_playedTime

Grid play time with player. Used by respawn ship.

Definition at line 289 of file MyCubeGrid.cs.

MyTerminalBlock Sandbox.Game.Entities.MyCubeGrid.MainCockpit = null

Definition at line 492 of file MyCubeGrid.cs.

MyTerminalBlock Sandbox.Game.Entities.MyCubeGrid.MainRemoteControl = null

Definition at line 493 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.NumberOfReactors = 0

Definition at line 230 of file MyCubeGrid.cs.

Sandbox.Game.Entities.Blocks.MyProjectorBase Sandbox.Game.Entities.MyCubeGrid.Projector

Definition at line 337 of file MyCubeGrid.cs.

readonly SyncType Sandbox.Game.Entities.MyCubeGrid.SyncType

Definition at line 121 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.XSymmetryOdd = false

Definition at line 272 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.XSymmetryPlane = null

Definition at line 269 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.YSymmetryOdd = false

Definition at line 273 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.YSymmetryPlane = null

Definition at line 270 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ZSymmetryOdd = false

Definition at line 274 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.ZSymmetryPlane = null

Definition at line 271 of file MyCubeGrid.cs.

Property Documentation

List<IMyBlockAdditionalModelGenerator> Sandbox.Game.Entities.MyCubeGrid.AdditionalModelGenerators
get

Definition at line 228 of file MyCubeGrid.cs.

List<long> Sandbox.Game.Entities.MyCubeGrid.BigOwners
get

players that have the maximum number of functional blocks in cube grid

Definition at line 354 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.BlocksCount
get

Definition at line 449 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.BlocksDestructionEnabled
get

Definition at line 320 of file MyCubeGrid.cs.

HashSet<MyCubeBlock> Sandbox.Game.Entities.MyCubeGrid.BlocksForDraw
get

Definition at line 202 of file MyCubeGrid.cs.

HashSet<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.CubeBlocks
get

Definition at line 450 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.DestructibleBlocks
getset

Definition at line 297 of file MyCubeGrid.cs.

HashSetReader<Vector3I> Sandbox.Game.Entities.MyCubeGrid.DirtyBlocks
get

Definition at line 195 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.Editable
getset

Definition at line 313 of file MyCubeGrid.cs.

int Sandbox.Game.Entities.MyCubeGrid.GridCounter
staticget

Definition at line 444 of file MyCubeGrid.cs.

float Sandbox.Game.Entities.MyCubeGrid.GridScale
get

Definition at line 258 of file MyCubeGrid.cs.

float Sandbox.Game.Entities.MyCubeGrid.GridSize
get

Definition at line 257 of file MyCubeGrid.cs.

MyCubeSize Sandbox.Game.Entities.MyCubeGrid.GridSizeEnum
getset

Definition at line 362 of file MyCubeGrid.cs.

float Sandbox.Game.Entities.MyCubeGrid.GridSizeHalf
get

Definition at line 259 of file MyCubeGrid.cs.

Vector3 Sandbox.Game.Entities.MyCubeGrid.GridSizeHalfVector
get

Definition at line 260 of file MyCubeGrid.cs.

float Sandbox.Game.Entities.MyCubeGrid.GridSizeR
get

Reciprocal of gridsize

Definition at line 265 of file MyCubeGrid.cs.

MyCubeGridSystems Sandbox.Game.Entities.MyCubeGrid.GridSystems
get

Definition at line 236 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsRespawnGrid
getset

Gets or sets indication if a grid coresponds to a respawn ship/cart.

Definition at line 284 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsSplit
getset

Definition at line 218 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.IsStatic
get

Definition at line 245 of file MyCubeGrid.cs.

long Sandbox.Game.Entities.MyCubeGrid.LocalCoordSystem
getset

Local coord system under which this cube exists. (its id)

Definition at line 501 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.Max
get

Definition at line 267 of file MyCubeGrid.cs.

Vector3I Sandbox.Game.Entities.MyCubeGrid.Min
get

Definition at line 266 of file MyCubeGrid.cs.

new MyGridPhysics Sandbox.Game.Entities.MyCubeGrid.Physics
getset

Definition at line 374 of file MyCubeGrid.cs.

MyCubeGridRenderData Sandbox.Game.Entities.MyCubeGrid.RenderData
get

Definition at line 197 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowAntennaGizmos
staticgetset

Definition at line 136 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowCenterOfMass
staticgetset

Definition at line 134 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowGravityGizmos
staticgetset

Definition at line 133 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowGridPivot
staticgetset

Definition at line 135 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowSenzorGizmos
staticgetset

Definition at line 132 of file MyCubeGrid.Static.cs.

bool Sandbox.Game.Entities.MyCubeGrid.ShowStructuralIntegrity
staticgetset

Definition at line 137 of file MyCubeGrid.Static.cs.

List<long> Sandbox.Game.Entities.MyCubeGrid.SmallOwners
get

players that have at least one block in cube grid

Definition at line 343 of file MyCubeGrid.cs.

Action<SyncBase> Sandbox.Game.Entities.MyCubeGrid.SyncPropertyChanged
addremove

Definition at line 116 of file MyCubeGrid.cs.

bool Sandbox.Game.Entities.MyCubeGrid.UsesTargetingList
get

Definition at line 9245 of file MyCubeGrid.cs.

Event Documentation

Action<MyCubeGrid> Sandbox.Game.Entities.MyCubeGrid.OnAuthorshipChanged

Definition at line 382 of file MyCubeGrid.cs.

Action<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.OnBlockAdded

Definition at line 378 of file MyCubeGrid.cs.

Action<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.OnBlockClosed

Definition at line 381 of file MyCubeGrid.cs.

Action<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.OnBlockIntegrityChanged

Definition at line 380 of file MyCubeGrid.cs.

Action<MyCubeGrid> Sandbox.Game.Entities.MyCubeGrid.OnBlockOwnershipChanged

Definition at line 420 of file MyCubeGrid.cs.

Action<MySlimBlock> Sandbox.Game.Entities.MyCubeGrid.OnBlockRemoved

Definition at line 379 of file MyCubeGrid.cs.

Action<MyCubeGrid> Sandbox.Game.Entities.MyCubeGrid.OnGridChanged

Definition at line 451 of file MyCubeGrid.cs.

Action<MyCubeGrid, MyCubeGrid> Sandbox.Game.Entities.MyCubeGrid.OnGridSplit

Definition at line 436 of file MyCubeGrid.cs.

Action<int> Sandbox.Game.Entities.MyCubeGrid.OnHavokSystemIDChanged

Definition at line 441 of file MyCubeGrid.cs.

Action<bool> Sandbox.Game.Entities.MyCubeGrid.OnIsStaticChanged

Definition at line 429 of file MyCubeGrid.cs.


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