Class MyCubeBuilder
Inheritance
System.Object
MyCubeBuilder
Assembly: Sandbox.Game.dll
Syntax
[MySessionComponentDescriptor]
[StaticEventOwner]
public class MyCubeBuilder : MyBlockBuilderBase, IMyUserInputComponent, IMyFocusHolder, IMyCubeBuilder
Constructors
MyCubeBuilder()
Declaration
Fields
AllPlayersColors
Declaration
public static Dictionary<MyPlayer.PlayerId, List<Vector3>> AllPlayersColors
Field Value
| Type |
Description |
| System.Collections.Generic.Dictionary<Sandbox.Game.World.MyPlayer.PlayerId, System.Collections.Generic.List<Vector3>> |
|
BLOCK_ROTATION_SPEED
Declaration
protected static double BLOCK_ROTATION_SPEED
Field Value
| Type |
Description |
| System.Double |
|
canBuild
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
m_blocksBuildQueue
Declaration
protected HashSet<MyCubeGrid.MyBlockLocation> m_blocksBuildQueue
Field Value
m_cubeBuilderState
Declaration
protected MyCubeBuilderState m_cubeBuilderState
Field Value
| Type |
Description |
| Sandbox.Game.Entities.Cube.CubeBuilder.MyCubeBuilderState |
|
m_gameInventory
Declaration
protected MySessionComponentGameInventory m_gameInventory
Field Value
| Type |
Description |
| Sandbox.Game.SessionComponents.MySessionComponentGameInventory |
|
m_gizmo
Declaration
protected MyCubeBuilderGizmo m_gizmo
Field Value
| Type |
Description |
| Sandbox.Game.Entities.Cube.MyCubeBuilderGizmo |
|
m_lastLocalCoordSysData
Declaration
protected MyCoordinateSystem.CoordSystemData m_lastLocalCoordSysData
Field Value
| Type |
Description |
| Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.CoordSystemData |
|
m_renderData
Declaration
protected MyBlockBuilderRenderData m_renderData
Field Value
| Type |
Description |
| Sandbox.Game.Entities.Cube.MyBlockBuilderRenderData |
|
m_rotationHints
Declaration
protected MyBlockBuilderRotationHints m_rotationHints
Field Value
| Type |
Description |
| Sandbox.Game.Entities.Cube.MyBlockBuilderRotationHints |
|
m_tmpBlockPositionList
Declaration
protected List<Vector3I> m_tmpBlockPositionList
Field Value
| Type |
Description |
| System.Collections.Generic.List<Vector3I> |
|
m_tmpBlockPositionsSet
Declaration
protected HashSet<Vector3I> m_tmpBlockPositionsSet
Field Value
| Type |
Description |
| System.Collections.Generic.HashSet<Vector3I> |
|
Declaration
public MyCubeBuilderToolType m_toolType
Field Value
MaxGridDistanceFrom
Declaration
public Nullable<Vector3D> MaxGridDistanceFrom
Field Value
| Type |
Description |
| System.Nullable<Vector3D> |
|
Static
Declaration
public static MyCubeBuilder Static
Field Value
Properties
AlignToDefault
Declaration
public bool AlignToDefault { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
BlockCreationIsActivated
Declaration
public bool BlockCreationIsActivated { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
BuildComponent
Declaration
public static MyBuildComponentBase BuildComponent { get; set; }
Property Value
| Type |
Description |
| Sandbox.Game.World.MyBuildComponentBase |
|
BuildingMode
Declaration
public static MyCubeBuilder.BuildingModeEnum BuildingMode { get; set; }
Property Value
Declaration
protected bool BuildInputValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
CubeBuilderState
Declaration
public MyCubeBuilderState CubeBuilderState { get; }
Property Value
| Type |
Description |
| Sandbox.Game.Entities.Cube.CubeBuilder.MyCubeBuilderState |
|
CubePlacementMode
Declaration
public MyCubeBuilder.CubePlacementModeEnum CubePlacementMode { get; set; }
Property Value
CurrentBlockDefinition
Declaration
public override MyCubeBlockDefinition CurrentBlockDefinition { get; protected set; }
Property Value
Overrides
CurrentGrid
Declaration
protected override MyCubeGrid CurrentGrid { get; set; }
Property Value
Overrides
CurrentVoxelBase
Declaration
protected override MyVoxelBase CurrentVoxelBase { get; set; }
Property Value
Overrides
Dependencies
Declaration
public override Type[] Dependencies { get; }
Property Value
| Type |
Description |
| System.Type[] |
|
Overrides
DynamicMode
Declaration
public bool DynamicMode { get; protected set; }
Property Value
| Type |
Description |
| System.Boolean |
|
FreezeGizmo
Declaration
public bool FreezeGizmo { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
GridAndBlockValid
Declaration
protected bool GridAndBlockValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
GridValid
Declaration
protected bool GridValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsActivated
Declaration
public override bool IsActivated { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
IsBuildMode
Declaration
public bool IsBuildMode { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsCubeSizeModesAvailable
Declaration
public virtual bool IsCubeSizeModesAvailable { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
PlacingSmallGridOnLargeStatic
Declaration
public bool PlacingSmallGridOnLargeStatic { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
RotationAxis
Declaration
public int RotationAxis { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
ShowRemoveGizmo
Declaration
public bool ShowRemoveGizmo { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Current block definition for toolbar.
Declaration
public MyCubeBlockDefinition ToolbarBlockDefinition { get; }
Property Value
Declaration
public MyCubeBuilderToolType ToolType { get; set; }
Property Value
UseSymmetry
Declaration
public bool UseSymmetry { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
UseTransparency
Declaration
public bool UseTransparency { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
VoxelMapAndBlockValid
Declaration
protected bool VoxelMapAndBlockValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
Activate(Nullable<MyDefinitionId>, Boolean)
Declaration
public override void Activate(Nullable<MyDefinitionId> blockDefinitionId = null, bool groupwideDLCCheck = false)
Parameters
| Type |
Name |
Description |
| System.Nullable<MyDefinitionId> |
blockDefinitionId |
|
| System.Boolean |
groupwideDLCCheck |
|
Overrides
Declaration
public void ActivateColorTool()
ActivateFromRadialMenu(Nullable<MyDefinitionId>)
Declaration
public void ActivateFromRadialMenu(Nullable<MyDefinitionId> blockDefinitionId = null)
Parameters
| Type |
Name |
Description |
| System.Nullable<MyDefinitionId> |
blockDefinitionId |
|
Add()
Declaration
public virtual void Add()
AddBlocksToBuildQueueOrSpawn(MyCubeBlockDefinition, ref MatrixD, Vector3I, Vector3I, Vector3I, Quaternion)
Declaration
public bool AddBlocksToBuildQueueOrSpawn(MyCubeBlockDefinition blockDefinition, ref MatrixD worldMatrixAdd, Vector3I min, Vector3I max, Vector3I center, Quaternion localOrientation)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
AddConstruction(MyEntity)
Declaration
public virtual bool AddConstruction(MyEntity builder)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
AddFastBuildModels(MatrixD, ref Matrix, List<MatrixD>, List<String>, MyCubeBlockDefinition, Nullable<Vector3I>, Nullable<Vector3I>)
Declaration
public void AddFastBuildModels(MatrixD baseMatrix, ref Matrix localMatrixAdd, List<MatrixD> matrices, List<string> models, MyCubeBlockDefinition definition, Nullable<Vector3I> startBuild, Nullable<Vector3I> continueBuild)
Parameters
AfterGridBuild(MyEntity, MyCubeGrid, Boolean, UInt64)
Declaration
protected static void AfterGridBuild(MyEntity builder, MyCubeGrid grid, bool instantBuild, ulong senderId)
Parameters
| Type |
Name |
Description |
| MyEntity |
builder |
|
| MyCubeGrid |
grid |
|
| System.Boolean |
instantBuild |
|
| System.UInt64 |
senderId |
|
AlignToGravity(Boolean)
Declaration
public void AlignToGravity(bool alignToCamera = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
alignToCamera |
|
AutogenerateMountpoints(HkShape[], Single)
Declaration
public static MyCubeBlockDefinition.MountPoint[] AutogenerateMountpoints(HkShape[] shapes, float gridSize)
Parameters
| Type |
Name |
Description |
| Havok.HkShape[] |
shapes |
|
| System.Single |
gridSize |
|
Returns
AutogenerateMountpoints(MyModel, Single)
Declaration
public static MyCubeBlockDefinition.MountPoint[] AutogenerateMountpoints(MyModel model, float gridSize)
Parameters
| Type |
Name |
Description |
| VRage.Game.Models.MyModel |
model |
|
| System.Single |
gridSize |
|
Returns
CalculateBlockRotation(Int32, Int32, ref MatrixD, out MatrixD, Double, MyBlockDirection, MyBlockRotation)
Declaration
public static bool CalculateBlockRotation(int index, int sign, ref MatrixD currentMatrix, out MatrixD rotatedMatrix, double angle, MyBlockDirection blockDirection, MyBlockRotation blockRotation)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CalculateFreePlacementMode(Vector3D)
Declaration
protected void CalculateFreePlacementMode(Vector3D position)
Parameters
CalculateGravityAlignedMode(Vector3D)
Declaration
protected void CalculateGravityAlignedMode(Vector3D position)
Parameters
CalculateLocalCoordinateSystemMode(Vector3D)
Declaration
protected void CalculateLocalCoordinateSystemMode(Vector3D position)
Parameters
CaluclateDynamicModePos(Vector3D, Boolean)
Calculates final position of the block in through gizmo.
Declaration
protected virtual bool CaluclateDynamicModePos(Vector3D defaultPos, bool isDynamicOverride = false)
Parameters
| Type |
Name |
Description |
| Vector3D |
defaultPos |
Proposed position.
|
| System.Boolean |
isDynamicOverride |
|
Returns
| Type |
Description |
| System.Boolean |
If True than success.
|
CancelBuilding()
Declaration
protected virtual bool CancelBuilding()
Returns
| Type |
Description |
| System.Boolean |
|
CanStartConstruction(MyEntity)
Declaration
public virtual bool CanStartConstruction(MyEntity buildingEntity)
Parameters
| Type |
Name |
Description |
| MyEntity |
buildingEntity |
|
Returns
| Type |
Description |
| System.Boolean |
|
CheckGizmoRotation()
Declaration
public void CheckGizmoRotation()
CheckSmallViewChange()
Declaration
protected bool CheckSmallViewChange()
Returns
| Type |
Description |
| System.Boolean |
|
CheckValidBlockRotation(Matrix, MyBlockDirection, MyBlockRotation)
Declaration
public static bool CheckValidBlockRotation(Matrix localMatrix, MyBlockDirection blockDirection, MyBlockRotation blockRotation)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CheckValidBlocksRotation(Matrix, MyCubeGrid)
Declaration
public static bool CheckValidBlocksRotation(Matrix gridLocalMatrix, MyCubeGrid grid)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
ChooseHitObject()
Declaration
protected override void ChooseHitObject()
Overrides
ClearRenderData()
Declaration
protected void ClearRenderData()
ColorPickerCancel()
Declaration
public void ColorPickerCancel()
ColorPickerOk()
Declaration
public void ColorPickerOk()
ContinueBuilding(Boolean)
Declaration
public virtual void ContinueBuilding(bool planeBuild)
Parameters
| Type |
Name |
Description |
| System.Boolean |
planeBuild |
|
ContinueBuilding(Boolean, Nullable<Vector3I>, Nullable<Vector3I>, ref Nullable<Vector3I>, Vector3I, Vector3I)
Continues building/removing. Do not put any gizmo related stuff here.
Declaration
protected void ContinueBuilding(bool planeBuild, Nullable<Vector3I> startBuild, Nullable<Vector3I> startRemove, ref Nullable<Vector3I> continueBuild, Vector3I blockMinPosision, Vector3I blockMaxPosition)
Parameters
| Type |
Name |
Description |
| System.Boolean |
planeBuild |
|
| System.Nullable<Vector3I> |
startBuild |
|
| System.Nullable<Vector3I> |
startRemove |
|
| System.Nullable<Vector3I> |
continueBuild |
|
| Vector3I |
blockMinPosision |
|
| Vector3I |
blockMaxPosition |
|
ConvertDynamicGridBlockToStatic(ref MatrixD, MyObjectBuilder_CubeBlock)
Declaration
public static MyObjectBuilder_CubeBlock ConvertDynamicGridBlockToStatic(ref MatrixD worldMatrix, MyObjectBuilder_CubeBlock origBlock)
Parameters
Returns
ConvertGridBuilderToStatic(MyObjectBuilder_CubeGrid, MatrixD)
Declaration
public static MyObjectBuilder_CubeGrid ConvertGridBuilderToStatic(MyObjectBuilder_CubeGrid originalGrid, MatrixD worldMatrix)
Parameters
Returns
CycleCubePlacementMode()
Declaration
public void CycleCubePlacementMode()
Deactivate()
Declaration
public override void Deactivate()
Overrides
DeactivateBlockCreation()
Declaration
public void DeactivateBlockCreation()
Draw()
Declaration
public override void Draw()
Overrides
DrawBuildingStepsCount(Nullable<Vector3I>, Nullable<Vector3I>, Nullable<Vector3I>, ref Matrix)
Declaration
protected void DrawBuildingStepsCount(Nullable<Vector3I> startBuild, Nullable<Vector3I> startRemove, Nullable<Vector3I> continueBuild, ref Matrix localMatrixAdd)
Parameters
| Type |
Name |
Description |
| System.Nullable<Vector3I> |
startBuild |
|
| System.Nullable<Vector3I> |
startRemove |
|
| System.Nullable<Vector3I> |
continueBuild |
|
| Matrix |
localMatrixAdd |
|
DrawMountPoints(Single, MyCubeBlockDefinition, MatrixD, MyCubeBlockDefinition.MountPoint[])
Declaration
public static void DrawMountPoints(float cubeSize, MyCubeBlockDefinition def, MatrixD drawMatrix, MyCubeBlockDefinition.MountPoint[] mountPoints)
Parameters
DrawMountPoints(Single, MyCubeBlockDefinition, ref MatrixD)
Declaration
public static void DrawMountPoints(float cubeSize, MyCubeBlockDefinition def, ref MatrixD drawMatrix)
Parameters
DrawRemovingCubes(Nullable<Vector3I>, Nullable<Vector3I>, MySlimBlock)
Declaration
protected static void DrawRemovingCubes(Nullable<Vector3I> startRemove, Nullable<Vector3I> continueBuild, MySlimBlock removeBlock)
Parameters
| Type |
Name |
Description |
| System.Nullable<Vector3I> |
startRemove |
|
| System.Nullable<Vector3I> |
continueBuild |
|
| Sandbox.Game.Entities.Cube.MySlimBlock |
removeBlock |
|
DrawSemiTransparentBox(MyCubeGrid, MySlimBlock, Color, Boolean, Nullable<MyStringId>, Nullable<Vector4>)
Declaration
public static void DrawSemiTransparentBox(MyCubeGrid grid, MySlimBlock block, Color color, bool onlyWireframe = false, Nullable<MyStringId> lineMaterial = null, Nullable<Vector4> lineColor = null)
Parameters
| Type |
Name |
Description |
| MyCubeGrid |
grid |
|
| Sandbox.Game.Entities.Cube.MySlimBlock |
block |
|
| Color |
color |
|
| System.Boolean |
onlyWireframe |
|
| System.Nullable<MyStringId> |
lineMaterial |
|
| System.Nullable<Vector4> |
lineColor |
|
DrawSemiTransparentBox(Vector3I, Vector3I, MyCubeGrid, Color, Boolean, Nullable<MyStringId>, Nullable<Vector4>)
Declaration
public static void DrawSemiTransparentBox(Vector3I minPosition, Vector3I maxPosition, MyCubeGrid grid, Color color, bool onlyWireframe = false, Nullable<MyStringId> lineMaterial = null, Nullable<Vector4> lineColor = null)
Parameters
GetAddAndRemovePositions(Single, Boolean, out Vector3I, out Nullable<Vector3>, out Vector3I, out Vector3I, out MySlimBlock, out Nullable<UInt16>, HashSet<Tuple<MySlimBlock, Nullable<UInt16>>>)
Declaration
public virtual bool GetAddAndRemovePositions(float gridSize, bool placingSmallGridOnLargeStatic, out Vector3I addPos, out Nullable<Vector3> addPosSmallOnLarge, out Vector3I addDir, out Vector3I removePos, out MySlimBlock removeBlock, out Nullable<ushort> compoundBlockId, HashSet<Tuple<MySlimBlock, Nullable<ushort>>> removeBlocksInMultiBlock)
Parameters
| Type |
Name |
Description |
| System.Single |
gridSize |
|
| System.Boolean |
placingSmallGridOnLargeStatic |
|
| Vector3I |
addPos |
|
| System.Nullable<Vector3> |
addPosSmallOnLarge |
|
| Vector3I |
addDir |
|
| Vector3I |
removePos |
|
| Sandbox.Game.Entities.Cube.MySlimBlock |
removeBlock |
|
| System.Nullable<System.UInt16> |
compoundBlockId |
|
| System.Collections.Generic.HashSet<System.Tuple<Sandbox.Game.Entities.Cube.MySlimBlock, System.Nullable<System.UInt16>>> |
removeBlocksInMultiBlock |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetAddPosition(out Vector3D)
Declaration
public void GetAddPosition(out Vector3D position)
Parameters
GetAllBlocksPositions(HashSet<Tuple<MySlimBlock, Nullable<UInt16>>>, HashSet<Vector3I>)
Declaration
public static void GetAllBlocksPositions(HashSet<Tuple<MySlimBlock, Nullable<ushort>>> blockInCompoundIDs, HashSet<Vector3I> outPositions)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.HashSet<System.Tuple<Sandbox.Game.Entities.Cube.MySlimBlock, System.Nullable<System.UInt16>>> |
blockInCompoundIDs |
|
| System.Collections.Generic.HashSet<Vector3I> |
outPositions |
|
GetBuildBoundingBox(Single)
Declaration
public MyOrientedBoundingBoxD GetBuildBoundingBox(float inflate = 0F)
Parameters
| Type |
Name |
Description |
| System.Single |
inflate |
|
Returns
GetCurrentRayIntersection()
Declaration
public static Nullable<double> GetCurrentRayIntersection()
Returns
| Type |
Description |
| System.Nullable<System.Double> |
|
GetNextBlockVariantDefinition()
Declaration
public MyCubeBlockDefinition GetNextBlockVariantDefinition()
Returns
Declaration
public virtual bool HandleGameInput()
Returns
| Type |
Description |
| System.Boolean |
|
InitFromDefinition(MySessionComponentDefinition)
Declaration
public override void InitFromDefinition(MySessionComponentDefinition definition)
Parameters
| Type |
Name |
Description |
| VRage.Game.Components.Session.MySessionComponentDefinition |
definition |
|
Overrides
Declaration
IsBuilding()
Declaration
protected virtual bool IsBuilding()
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public bool IsBuildToolActive()
Returns
| Type |
Description |
| System.Boolean |
|
IsDynamicOverride()
Allows to override normal behaviour of Cube builder.
Declaration
protected virtual bool IsDynamicOverride()
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public bool IsOnlyColorToolActive()
Returns
| Type |
Description |
| System.Boolean |
|
IsSymmetrySetupMode()
Declaration
public bool IsSymmetrySetupMode()
Returns
| Type |
Description |
| System.Boolean |
|
LoadData()
Declaration
public override void LoadData()
Overrides
NotifyPlacementUnable()
Declaration
public void NotifyPlacementUnable()
OnClosedMessageBox(MyGuiScreenMessageBox.ResultEnum)
Declaration
public void OnClosedMessageBox(MyGuiScreenMessageBox.ResultEnum result)
Parameters
| Type |
Name |
Description |
| Sandbox.Graphics.GUI.MyGuiScreenMessageBox.ResultEnum |
result |
|
OnLostFocus()
Declaration
public void OnLostFocus()
PrepareBlocksToRemove()
Declaration
protected virtual void PrepareBlocksToRemove()
PrepareCharacterCollisionPoints(List<Vector3D>)
Declaration
public static void PrepareCharacterCollisionPoints(List<Vector3D> outList)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.List<Vector3D> |
outList |
|
Remove()
Declaration
RemoveBlock(MySlimBlock, Nullable<UInt16>, Boolean)
Declaration
protected void RemoveBlock(MySlimBlock block, Nullable<ushort> blockIdInCompound, bool checkExisting = false)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MySlimBlock |
block |
|
| System.Nullable<System.UInt16> |
blockIdInCompound |
|
| System.Boolean |
checkExisting |
|
RemoveBlockInternal(MySlimBlock, Nullable<UInt16>, Boolean)
Declaration
protected void RemoveBlockInternal(MySlimBlock block, Nullable<ushort> blockIdInCompound, bool checkExisting = false)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MySlimBlock |
block |
|
| System.Nullable<System.UInt16> |
blockIdInCompound |
|
| System.Boolean |
checkExisting |
|
RemovePlayerColors(MyPlayer.PlayerId)
Declaration
public static void RemovePlayerColors(MyPlayer.PlayerId playerId)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.World.MyPlayer.PlayerId |
playerId |
|
RemovePlayerColors_Internal(MyPlayer.PlayerId)
Declaration
public static void RemovePlayerColors_Internal(MyPlayer.PlayerId playerId)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.World.MyPlayer.PlayerId |
playerId |
|
RotateAxis(Int32, Int32, Double, Boolean)
Declaration
protected virtual void RotateAxis(int index, int sign, double angleDelta, bool newlyPressed)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.Int32 |
sign |
|
| System.Double |
angleDelta |
|
| System.Boolean |
newlyPressed |
|
Declaration
public static void SelectBlockToToolbar(MySlimBlock block, bool selectToNextSlot = true)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MySlimBlock |
block |
|
| System.Boolean |
selectToNextSlot |
|
Declaration
public void SetToolType(MyCubeBuilderToolType type)
Parameters
SpawnDynamicGrid(MyCubeBlockDefinition, MyEntity, MatrixD, Vector3, MyStringHash, Int64, MyCubeBuilder.SpawnFlags, Int64, Action<MyEntity>)
Declaration
public static MyCubeGrid SpawnDynamicGrid(MyCubeBlockDefinition blockDefinition, MyEntity builder, MatrixD worldMatrix, Vector3 color, MyStringHash skinId, long entityId = 0L, MyCubeBuilder.SpawnFlags spawnFlags, long builtBy = 0L, Action<MyEntity> completionCallback = null)
Parameters
Returns
SpawnStaticGrid(MyCubeBlockDefinition, MyEntity, MatrixD, Vector3, MyStringHash, MyCubeBuilder.SpawnFlags, Int64, Action<MyEntity>)
Spawn static grid - must have identity rotation matrix! If dontAdd is true, grid won't be added to enitites. Also it won't have entityId set.
Declaration
public static MyCubeGrid SpawnStaticGrid(MyCubeBlockDefinition blockDefinition, MyEntity builder, MatrixD worldMatrix, Vector3 color, MyStringHash skinId, MyCubeBuilder.SpawnFlags spawnFlags, long builtBy = 0L, Action<MyEntity> completionCallback = null)
Parameters
Returns
SpawnStaticGrid_nonParalel(MyCubeBlockDefinition, MyEntity, MatrixD, Vector3, MyStringHash, MyCubeBuilder.SpawnFlags, Int64)
Declaration
public static MySlimBlock SpawnStaticGrid_nonParalel(MyCubeBlockDefinition blockDefinition, MyEntity builder, MatrixD worldMatrix, Vector3 color, MyStringHash skinId, MyCubeBuilder.SpawnFlags spawnFlags, long builtBy = 0L)
Parameters
Returns
| Type |
Description |
| Sandbox.Game.Entities.Cube.MySlimBlock |
|
StartBuilding()
Declaration
public virtual void StartBuilding()
StartBuilding(ref Nullable<Vector3I>, Nullable<Vector3I>)
Starts continuous building. Do not put any gizmo related stuff here.
Declaration
protected void StartBuilding(ref Nullable<Vector3I> startBuild, Nullable<Vector3I> startRemove)
Parameters
| Type |
Name |
Description |
| System.Nullable<Vector3I> |
startBuild |
|
| System.Nullable<Vector3I> |
startRemove |
|
StartRemoving()
Declaration
protected virtual void StartRemoving()
StartRemoving(Nullable<Vector3I>, ref Nullable<Vector3I>)
Starts continuous removing. Do not put any gizmo related stuff here.
Declaration
protected void StartRemoving(Nullable<Vector3I> startBuild, ref Nullable<Vector3I> startRemove)
Parameters
| Type |
Name |
Description |
| System.Nullable<Vector3I> |
startBuild |
|
| System.Nullable<Vector3I> |
startRemove |
|
StartStaticGridPlacement(MyCubeSize, Boolean)
Declaration
public void StartStaticGridPlacement(MyCubeSize cubeSize, bool isStatic)
Parameters
| Type |
Name |
Description |
| MyCubeSize |
cubeSize |
|
| System.Boolean |
isStatic |
|
StopBuilding()
Declaration
public virtual void StopBuilding()
StopBuilding(Boolean, ref Nullable<Vector3I>, ref Nullable<Vector3I>, ref Nullable<Vector3I>, Vector3I, Vector3I, Vector3I, ref Matrix, MyCubeBlockDefinition)
Stops continuous building/removing. Do not put any gizmo related stuff here.
Declaration
protected void StopBuilding(bool smallViewChange, ref Nullable<Vector3I> startBuild, ref Nullable<Vector3I> startRemove, ref Nullable<Vector3I> continueBuild, Vector3I blockMinPosition, Vector3I blockMaxPosition, Vector3I blockCenterPosition, ref Matrix localMatrixAdd, MyCubeBlockDefinition blockDefinition)
Parameters
ToggleSymmetry()
Declaration
public bool ToggleSymmetry()
Returns
| Type |
Description |
| System.Boolean |
|
ToggleSymmetrySetup()
Declaration
public void ToggleSymmetrySetup()
Converts large grid hit coordinates for small cubes. Allows placement of small grids to large grids.
Returns coordinates of small grid (in large grid coordinates) which touches large grid in the hit position.
Declaration
public static Vector3 TransformLargeGridHitCoordToSmallGrid(Vector3D coords, MatrixD worldMatrixNormalizedInv, float gridSize)
Parameters
| Type |
Name |
Description |
| Vector3D |
coords |
|
| MatrixD |
worldMatrixNormalizedInv |
|
| System.Single |
gridSize |
|
Returns
UnloadData()
Declaration
protected override void UnloadData()
Overrides
UpdateAfterSimulation()
Declaration
public override void UpdateAfterSimulation()
Overrides
UpdateBeforeSimulation()
Declaration
public override void UpdateBeforeSimulation()
Overrides
UpdateBlockInfoHud()
Declaration
protected static void UpdateBlockInfoHud()
UpdateCubeBlockDefinition(Nullable<MyDefinitionId>)
Declaration
protected virtual void UpdateCubeBlockDefinition(Nullable<MyDefinitionId> id)
Parameters
UpdateCubeBlockStageDefinition(MyCubeBlockDefinition)
Declaration
protected virtual void UpdateCubeBlockStageDefinition(MyCubeBlockDefinition stageCubeBlockDefinition)
Parameters
UpdateGizmo(MyCubeBuilderGizmo.MyGizmoSpaceProperties, Boolean, Boolean, Boolean)
Declaration
protected virtual void UpdateGizmo(MyCubeBuilderGizmo.MyGizmoSpaceProperties gizmoSpace, bool add, bool remove, bool draw)
Parameters
| Type |
Name |
Description |
| Sandbox.Game.Entities.Cube.MyCubeBuilderGizmo.MyGizmoSpaceProperties |
gizmoSpace |
|
| System.Boolean |
add |
|
| System.Boolean |
remove |
|
| System.Boolean |
draw |
|
UpdateNotificationBlockNotAvailable(Boolean)
Declaration
public void UpdateNotificationBlockNotAvailable(bool updateNotAvailableNotification)
Parameters
| Type |
Name |
Description |
| System.Boolean |
updateNotAvailableNotification |
|
Events
OnActivated
Declaration
public event Action OnActivated
Event Type
| Type |
Description |
| System.Action |
|
OnBlockAdded
Declaration
public event Action<MyCubeBlockDefinition> OnBlockAdded
Event Type
OnBlockSizeChanged
Declaration
public event Action OnBlockSizeChanged
Event Type
| Type |
Description |
| System.Action |
|
OnBlockVariantChanged
Declaration
public event Action OnBlockVariantChanged
Event Type
| Type |
Description |
| System.Action |
|
OnDeactivated
Declaration
public event Action OnDeactivated
Event Type
| Type |
Description |
| System.Action |
|
OnSymmetrySetupModeChanged
Declaration
public event Action OnSymmetrySetupModeChanged
Event Type
| Type |
Description |
| System.Action |
|
Declaration
public event Action OnToolTypeChanged
Event Type
| Type |
Description |
| System.Action |
|
Explicit Interface Implementations
IMyCubeBuilder.Activate(Nullable<MyDefinitionId>)
Declaration
void IMyCubeBuilder.Activate(Nullable<MyDefinitionId> blockDefinitionId)
Parameters
| Type |
Name |
Description |
| System.Nullable<MyDefinitionId> |
blockDefinitionId |
|
IMyCubeBuilder.AddConstruction(IMyEntity)
Declaration
bool IMyCubeBuilder.AddConstruction(IMyEntity buildingEntity)
Parameters
| Type |
Name |
Description |
| IMyEntity |
buildingEntity |
|
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.BlockCreationIsActivated
Declaration
bool IMyCubeBuilder.BlockCreationIsActivated { get; }
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.Deactivate()
Declaration
void IMyCubeBuilder.Deactivate()
IMyCubeBuilder.DeactivateBlockCreation()
Declaration
void IMyCubeBuilder.DeactivateBlockCreation()
IMyCubeBuilder.FindClosestGrid()
Declaration
IMyCubeGrid IMyCubeBuilder.FindClosestGrid()
Returns
IMyCubeBuilder.FreezeGizmo
Declaration
bool IMyCubeBuilder.FreezeGizmo { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.IsActivated
Declaration
bool IMyCubeBuilder.IsActivated { get; }
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.ShowRemoveGizmo
Declaration
bool IMyCubeBuilder.ShowRemoveGizmo { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.StartNewGridPlacement(MyCubeSize, Boolean)
Declaration
void IMyCubeBuilder.StartNewGridPlacement(MyCubeSize cubeSize, bool isStatic)
Parameters
| Type |
Name |
Description |
| MyCubeSize |
cubeSize |
|
| System.Boolean |
isStatic |
|
IMyCubeBuilder.UseSymmetry
Declaration
bool IMyCubeBuilder.UseSymmetry { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
IMyCubeBuilder.UseTransparency
Declaration
bool IMyCubeBuilder.UseTransparency { get; set; }
Returns
| Type |
Description |
| System.Boolean |
|
Implements