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

Enhanced clipboard which supports dynamic placing, allow rotation of static grid. More...

Inheritance diagram for Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced:
Sandbox.Game.Entities.Cube.MyGridClipboard Sandbox.Game.Entities.Cube.MyMultiBlockClipboard

Public Member Functions

 MyGridClipboardAdvanced (MyPlacementSettings settings, bool calculateVelocity=true)
 
override void Update ()
 
override void Activate (Action callback=null)
 
override bool PasteGrid (MyInventoryBase buildInventory=null, bool deactivate=true)
 
void SetDragDistance (float dragDistance)
 
override void MoveEntityCloser ()
 
- Public Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
 MyGridClipboard (MyPlacementSettings settings, bool calculateVelocity=true)
 
MyCubeBlockDefinition GetFirstBlockDefinition (MyObjectBuilder_CubeGrid grid=null)
 
virtual void ActivateNoAlign (Action callback=null)
 
virtual void Deactivate (bool afterPaste=false)
 
void Hide ()
 
void Show ()
 
void ClearClipboard ()
 
void CopyGroup (MyCubeGrid gridInGroup, GridLinkTypeEnum groupType)
 
void CutGrid (MyCubeGrid grid)
 
void CopyGrid (MyCubeGrid grid)
 
void CutGroup (MyCubeGrid grid, GridLinkTypeEnum groupType)
 
void SetGridFromBuilder (MyObjectBuilder_CubeGrid grid, Vector3 dragPointDelta, float dragVectorLength)
 
void SetGridFromBuilders (MyObjectBuilder_CubeGrid[] grids, Vector3 dragPointDelta, float dragVectorLength)
 
virtual bool EntityCanPaste (MyEntity pastingEntity)
 
virtual void UpdateColor (Vector3 newHSV)
 Used to update the color of a new ship/station block when the player switches it More...
 
virtual Matrix GetFirstGridOrientationMatrix ()
 
void AlignClipboardToGravity ()
 
void AlignClipboardToGravity (Vector3 gravity)
 
void DrawHud ()
 
void CalculateRotationHints (MyBlockBuilderRotationHints hints, bool isRotating)
 
bool HasCopiedGrids ()
 
void SaveClipboardAsPrefab (string name=null, string path=null)
 
void HideGridWhenColliding (List< Vector3D > collisionTestPoints)
 
void RotateAroundAxis (int axisIndex, int sign, bool newlyPressed, float angleDelta)
 
virtual void MoveEntityFurther ()
 

Protected Member Functions

override void UpdatePastePosition ()
 
Vector3D GetFreeSpacePlacementPosition (bool copyPaste, out bool buildAllowed)
 
Vector3D GetFreeSpacePlacementPositionGridAabbs (bool copyPaste, out bool buildAllowed)
 Casts preview grids aabbs and get shortest distance. Returns shortest intersection or null. More...
 
bool TestGridPlacementOnGrid (MyCubeGrid previewGrid, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
virtual void SetupDragDistance ()
 
- Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
delegate void UpdateAfterPasteCallback (List< MyObjectBuilder_CubeGrid > pastedBuilders)
 
void ShowPreview (bool show)
 
bool PasteGridInternal (MyInventoryBase buildInventory, bool deactivate, List< MyObjectBuilder_CubeGrid > pastedBuilders=null, List< MyCubeGrid > touchingGrids=null, UpdateAfterPasteCallback updateAfterPasteCallback=null, bool multiBlock=false)
 
bool CheckPastedBlocks ()
 Checks the pasted object builder for non-existent blocks (e.g. copying from world with a cube block mod to a world without it) More...
 
bool CheckPastedScripts ()
 Checks the pasted object builder for scripts inside programmable blocks More...
 
void BeforeCreateGrid (MyObjectBuilder_CubeGrid grid)
 
virtual void ChangeClipboardPreview (bool visible)
 
bool UpdateHitEntity (bool canPasteLargeOnSmall=true)
 
virtual void TestBuildingMaterials ()
 
virtual MyEntity GetClipboardBuilder ()
 
virtual void UpdateGridTransformations ()
 
void AlignRotationToCoordSys ()
 
bool TrySnapToSurface (SnapMode snapMode)
 
void FixSnapTransformationBase6 ()
 

Static Protected Member Functions

static bool CheckConnectivityOnGrid (MySlimBlock block, ref MatrixI transform, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
static bool TestBlockPlacementOnGrid (MySlimBlock block, ref MatrixI transform, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
static bool TestBlockPlacement (MySlimBlock block, ref MyGridPlacementSettings settings)
 
static bool TestBlockPlacement (MySlimBlock block, ref MyGridPlacementSettings settings, out MyCubeGrid touchingGrid)
 
static bool TestBlockPlacementNoAABBInflate (MySlimBlock block, ref MyGridPlacementSettings settings, out MyCubeGrid touchingGrid)
 
static bool TestVoxelPlacement (MySlimBlock block, ref MyGridPlacementSettings settings, bool dynamicMode)
 
static bool TestBlockPlacementArea (MySlimBlock block, ref MyGridPlacementSettings settings, bool dynamicMode, bool testVoxel=true)
 
- Static Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
static MatrixD GetPasteMatrix ()
 

Protected Attributes

bool m_dynamicBuildAllowed
 
- Protected Attributes inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
List< Vector3m_copiedGridOffsets = new List<Vector3>()
 
Vector3D m_pastePosition
 
Vector3D m_pastePositionPrevious
 
bool m_calculateVelocity = true
 
Vector3 m_objectVelocity = Vector3.Zero
 
float m_pasteOrientationAngle = 0.0f
 
Vector3 m_pasteDirUp = new Vector3(1.0f, 0.0f, 0.0f)
 
Vector3 m_pasteDirForward = new Vector3(0.0f, 1.0f, 0.0f)
 
float m_dragDistance
 
const float m_maxDragDistance = 2E4f
 
Vector3 m_dragPointToPositionLocal
 
bool m_canBePlaced
 
bool m_characterHasEnoughMaterials = false
 
MyPlacementSettings m_settings
 
float m_closestHitDistSq = float.MaxValue
 
Vector3D m_hitPos = new Vector3(0.0f, 0.0f, 0.0f)
 
Vector3 m_hitNormal = new Vector3(1.0f, 0.0f, 0.0f)
 
IMyEntity m_hitEntity = null
 
bool m_visible = true
 
bool m_useDynamicPreviews = false
 
Dictionary< string, int > m_blocksPerType = new Dictionary<string,int>()
 
List< MyCubeGridm_touchingGrids = new List<MyCubeGrid>()
 Grids that are around pasted grid. (In proximity, possible for merge) More...
 

Properties

override bool AnyCopiedGridIsStatic [get]
 
- Properties inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
virtual bool CanBePlaced [get]
 
bool CharacterHasEnoughMaterials [get]
 
virtual bool HasPreviewBBox [get, set]
 
bool IsActive [get, protected set]
 
bool AllowSwitchCameraMode [get]
 
bool IsSnapped [get, protected set]
 
List< MyObjectBuilder_CubeGridCopiedGrids [get]
 
SnapMode SnapMode [get]
 
bool EnablePreciseRotationWhenSnapped [get]
 
bool OneAxisRotationMode [get]
 
List< MyCubeGridPreviewGrids [get]
 
virtual bool AnyCopiedGridIsStatic [get]
 
bool EnableStationRotation [get, set]
 
bool CreationMode [get, set]
 
MyCubeSize CubeSize [get, set]
 
bool IsStatic [get, set]
 
virtual float Transparency [get]
 
string CopiedGridsName [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
static void CalculateItemRequirements (List< MyObjectBuilder_CubeGrid > blocksToBuild, MyComponentList buildComponents)
 
static void CalculateItemRequirements (MyObjectBuilder_CubeGrid[] blocksToBuild, MyComponentList buildComponents)
 
- Public Attributes inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
bool ShowModdedBlocksWarning = true
 
- Events inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
Action< MyGridClipboard, bool > Deactivated
 

Detailed Description

Enhanced clipboard which supports dynamic placing, allow rotation of static grid.

Definition at line 30 of file MyGridClipboardAdvanced.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.MyGridClipboardAdvanced ( MyPlacementSettings  settings,
bool  calculateVelocity = true 
)
inline

Definition at line 47 of file MyGridClipboardAdvanced.cs.

Member Function Documentation

override void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.Activate ( Action  callback = null)
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboard.

Definition at line 97 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.CheckConnectivityOnGrid ( MySlimBlock  block,
ref MatrixI  transform,
ref MyGridPlacementSettings  settings,
MyCubeGrid  hitGrid 
)
inlinestaticprotected

Definition at line 908 of file MyGridClipboardAdvanced.cs.

Vector3D Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.GetFreeSpacePlacementPosition ( bool  copyPaste,
out bool  buildAllowed 
)
inlineprotected

Definition at line 389 of file MyGridClipboardAdvanced.cs.

Vector3D Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.GetFreeSpacePlacementPositionGridAabbs ( bool  copyPaste,
out bool  buildAllowed 
)
inlineprotected

Casts preview grids aabbs and get shortest distance. Returns shortest intersection or null.

Definition at line 485 of file MyGridClipboardAdvanced.cs.

override void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.MoveEntityCloser ( )
inlinevirtual
override bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.PasteGrid ( MyInventoryBase  buildInventory = null,
bool  deactivate = true 
)
inlinevirtual
void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.SetDragDistance ( float  dragDistance)
inline

Definition at line 378 of file MyGridClipboardAdvanced.cs.

virtual void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.SetupDragDistance ( )
inlineprotectedvirtual
static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestBlockPlacement ( MySlimBlock  block,
ref MyGridPlacementSettings  settings 
)
inlinestaticprotected

Definition at line 937 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestBlockPlacement ( MySlimBlock  block,
ref MyGridPlacementSettings  settings,
out MyCubeGrid  touchingGrid 
)
inlinestaticprotected

Definition at line 942 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestBlockPlacementArea ( MySlimBlock  block,
ref MyGridPlacementSettings  settings,
bool  dynamicMode,
bool  testVoxel = true 
)
inlinestaticprotected

Definition at line 960 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestBlockPlacementNoAABBInflate ( MySlimBlock  block,
ref MyGridPlacementSettings  settings,
out MyCubeGrid  touchingGrid 
)
inlinestaticprotected

Definition at line 947 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestBlockPlacementOnGrid ( MySlimBlock  block,
ref MatrixI  transform,
ref MyGridPlacementSettings  settings,
MyCubeGrid  hitGrid 
)
inlinestaticprotected

Definition at line 922 of file MyGridClipboardAdvanced.cs.

bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestGridPlacementOnGrid ( MyCubeGrid  previewGrid,
ref MyGridPlacementSettings  settings,
MyCubeGrid  hitGrid 
)
inlineprotected

Definition at line 833 of file MyGridClipboardAdvanced.cs.

static bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.TestVoxelPlacement ( MySlimBlock  block,
ref MyGridPlacementSettings  settings,
bool  dynamicMode 
)
inlinestaticprotected

Definition at line 952 of file MyGridClipboardAdvanced.cs.

override void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.Update ( )
inlinevirtual
override void Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.UpdatePastePosition ( )
inlineprotectedvirtual

Member Data Documentation

bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.m_dynamicBuildAllowed
protected

Definition at line 34 of file MyGridClipboardAdvanced.cs.

Property Documentation

override bool Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.AnyCopiedGridIsStatic
getprotected

Definition at line 37 of file MyGridClipboardAdvanced.cs.


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