Space Engineers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
Sandbox.Game.Entities.MyCubeBuilder Class Reference
Inheritance diagram for Sandbox.Game.Entities.MyCubeBuilder:
VRage.Game.ModAPI.IMyCubeBuilder Sandbox.Game.Entities.MyBlockBuilderBase Sandbox.Game.Entities.MyBlockBuilderBase VRage.Game.Components.MySessionComponentBase VRage.Game.Components.MySessionComponentBase VRage.Game.Components.Interfaces.IMyUserInputComponent VRage.Game.Components.Interfaces.IMyUserInputComponent

Public Types

enum  SpawnFlags : ushort {
  SpawnFlags.None = 0, SpawnFlags.AddToScene = 1 << 0, SpawnFlags.CreatePhysics = 1 << 1, SpawnFlags.EnableSmallTolargeConnections = 1 << 2,
  SpawnFlags.SpawnAsMaster = 1 << 3, SpawnFlags.Default = AddToScene | CreatePhysics | EnableSmallTolargeConnections
}
 
enum  BuildingModeEnum { BuildingModeEnum.SingleBlock, BuildingModeEnum.Line, BuildingModeEnum.Plane }
 

Public Member Functions

override void Draw ()
 
 MyCubeBuilder ()
 
override void InitFromDefinition (MySessionComponentDefinition definition)
 
override void LoadData ()
 
void DeactivateBlockCreation ()
 Deactivates building mode More...
 
override void Deactivate ()
 
void OnLostFocus ()
 
override void Activate (MyDefinitionId?blockDefinitionId=null)
 
void AddFastBuildModels (MatrixD baseMatrix, ref Matrix localMatrixAdd, List< MatrixD > matrices, List< string > models, MyCubeBlockDefinition definition, Vector3I?startBuild, Vector3I?continueBuild)
 
void AlignToGravity (bool alignToCamera=true)
 
virtual bool HandleGameInput ()
 
void InputLost ()
 
virtual void Add ()
 
MyOrientedBoundingBoxD GetBuildBoundingBox (float inflate=0.0f)
 
virtual bool CanStartConstruction (MyEntity buildingEntity)
 
virtual bool AddConstruction (MyEntity builder)
 
void GetAddPosition (out Vector3D position)
 
virtual bool GetAddAndRemovePositions (float gridSize, bool placingSmallGridOnLargeStatic, out Vector3I addPos, out Vector3?addPosSmallOnLarge, out Vector3I addDir, out Vector3I removePos, out MySlimBlock removeBlock, out ushort?compoundBlockId, HashSet< Tuple< MySlimBlock, ushort?>> removeBlocksInMultiBlock)
 
bool IsCubeSizeAvailable (MyCubeBlockDefinition blockDef)
 Indicates if cube block size is avaliable for current cube builder state. More...
 
override void UpdateBeforeSimulation ()
 
void UpdateNotificationBlockNotAvailable (bool changeText=true)
 
virtual void StartBuilding ()
 
virtual void ContinueBuilding (bool planeBuild)
 
virtual void StopBuilding ()
 
void StartStaticGridPlacement (MyCubeSize cubeSize, bool isStatic)
 
- Public Member Functions inherited from Sandbox.Game.Entities.MyBlockBuilderBase
MyCubeGrid FindClosestGrid ()
 
bool FindClosestPlacementObject (out MyCubeGrid closestGrid, out MyVoxelBase closestVoxelMap)
 Finds closest object (grid or voxel map) for placement of blocks . More...
 
- Public Member Functions inherited from VRage.Game.Components.MySessionComponentBase
virtual bool UpdatedBeforeInit ()
 
 MySessionComponentBase ()
 
void SetUpdateOrder (MyUpdateOrder order)
 
virtual void Init (MyObjectBuilder_SessionComponent sessionComponent)
 
virtual MyObjectBuilder_SessionComponent GetObjectBuilder ()
 
void AfterLoadData ()
 
void UnloadDataConditional ()
 
virtual void SaveData ()
 
virtual void BeforeStart ()
 
virtual void Simulate ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdatingStopped ()
 
virtual void HandleInput ()
 
override string ToString ()
 

Static Public Member Functions

static void DrawSemiTransparentBox (MyCubeGrid grid, MySlimBlock block, Color color, bool onlyWireframe=false, string lineMaterial=null, Vector4?lineColor=null)
 
static void DrawSemiTransparentBox (Vector3I minPosition, Vector3I maxPosition, MyCubeGrid grid, Color color, bool onlyWireframe=false, string lineMaterial=null, Vector4?lineColor=null)
 
static void DrawMountPoints (float cubeSize, MyCubeBlockDefinition def, ref MatrixD drawMatrix)
 
static List< MyCubeBlockDefinition.MountPointAutogenerateMountpoints (MyModel model, float gridSize)
 
static List< MyCubeBlockDefinition.MountPointAutogenerateMountpoints (HkShape[] shapes, float gridSize)
 
static void DrawMountPoints (float cubeSize, MyCubeBlockDefinition def, MatrixD drawMatrix, MyCubeBlockDefinition.MountPoint[] mountPoints)
 
static bool CalculateBlockRotation (int index, int sign, ref MatrixD currentMatrix, out MatrixD rotatedMatrix, float angle, MyBlockDirection blockDirection=MyBlockDirection.Both, MyBlockRotation blockRotation=MyBlockRotation.Both)
 
static void PrepareCharacterCollisionPoints (List< Vector3D > outList)
 
static bool CheckValidBlockRotation (Matrix localMatrix, MyBlockDirection blockDirection, MyBlockRotation blockRotation)
 
static bool CheckValidBlocksRotation (Matrix gridLocalMatrix, MyCubeGrid grid)
 
static MyCubeGrid SpawnStaticGrid (MyCubeBlockDefinition blockDefinition, MyEntity builder, MatrixD worldMatrix, Vector3 color, SpawnFlags spawnFlags=SpawnFlags.Default, long builtBy=0, Action completionCallback=null)
 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. More...
 
static MyCubeGrid SpawnDynamicGrid (MyCubeBlockDefinition blockDefinition, MyEntity builder, MatrixD worldMatrix, Vector3 color, long entityId=0, SpawnFlags spawnFlags=SpawnFlags.Default, long builtBy=0, Action completionCallback=null)
 
static void SelectBlockToToolbar (MySlimBlock block, bool selectToNextSlot=true)
 
static double GetCurrentRayIntersection ()
 
static Vector3 TransformLargeGridHitCoordToSmallGrid (Vector3D coords, MatrixD worldMatrixNormalizedInv, float gridSize)
 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. More...
 
static MyObjectBuilder_CubeGrid ConvertGridBuilderToStatic (MyObjectBuilder_CubeGrid originalGrid, MatrixD worldMatrix)
 
static MyObjectBuilder_CubeBlock ConvertDynamicGridBlockToStatic (ref MatrixD worldMatrix, MyObjectBuilder_CubeBlock origBlock)
 
static void GetAllBlocksPositions (HashSet< Tuple< MySlimBlock, ushort?>> blockInCompoundIDs, HashSet< Vector3I > outPositions)
 
- Static Public Member Functions inherited from Sandbox.Game.Entities.MyBlockBuilderBase
static void ComputeSteps (Vector3I start, Vector3I end, Vector3I rotatedSize, out Vector3I stepDelta, out Vector3I counter, out int stepCount)
 

Public Attributes

Vector3 MaxGridDistanceFrom = null
 
- Public Attributes inherited from VRage.Game.Components.MySessionComponentBase
readonly string DebugName
 
readonly int Priority
 
readonly Type ComponentType
 
IMySession Session
 

Static Public Attributes

static MyCubeBuilder Static
 
static Dictionary< PlayerId, List< Vector3 > > AllPlayersColors = null
 

Protected Member Functions

void ClearRenderData ()
 
void DrawGuiIndicators ()
 
virtual bool CaluclateDynamicModePos (Vector3D defaultPos, bool isDynamicOverride=false)
 Calculates final position of the block in through gizmo. More...
 
void DrawBuildingStepsCount (Vector3I?startBuild, Vector3I?startRemove, Vector3I?continueBuild, ref Matrix localMatrixAdd)
 
virtual void RotateAxis (int index, int sign, float angleDelta, bool newlyPressed)
 
virtual bool IsDynamicOverride ()
 Allows to override normal behaviour of Cube builder. More...
 
virtual void UpdateCubeBlockStageDefinition (MyCubeBlockDefinition stageCubeBlockDefinition)
 
virtual void UpdateCubeBlockDefinition (MyDefinitionId?id)
 
virtual void UpdateGizmo (MyCubeBuilderGizmo.MyGizmoSpaceProperties gizmoSpace, bool add, bool remove, bool draw)
 
bool AddBlocksToBuildQueueOrSpawn (MyCubeBlockDefinition blockDefinition, ref MatrixD worldMatrixAdd, Vector3I min, Vector3I max, Vector3I center, Quaternion localOrientation)
 
virtual void PrepareBlocksToRemove ()
 
void Remove ()
 
void RemoveBlock (MySlimBlock block, ushort?blockIdInCompound, bool checkExisting=false)
 
void CalculateLocalCoordAndMode ()
 
override void UnloadData ()
 
void StartBuilding (ref Vector3I?startBuild, Vector3I?startRemove)
 Starts continuous building. Do not put any gizmo related stuff here. More...
 
virtual void StartRemoving ()
 
void StartRemoving (Vector3I?startBuild, ref Vector3I?startRemove)
 Starts continuous removing. Do not put any gizmo related stuff here. More...
 
void ContinueBuilding (bool planeBuild, Vector3I?startBuild, Vector3I?startRemove, ref Vector3I?continueBuild, Vector3I blockMinPosision, Vector3I blockMaxPosition)
 Continues building/removing. Do not put any gizmo related stuff here. More...
 
void StopBuilding (bool smallViewChange, ref Vector3I?startBuild, ref Vector3I?startRemove, ref Vector3I?continueBuild, Vector3I blockMinPosition, Vector3I blockMaxPosition, Vector3I blockCenterPosition, ref Matrix localMatrixAdd, MyCubeBlockDefinition blockDefinition)
 Stops continuous building/removing. Do not put any gizmo related stuff here. More...
 
virtual bool CancelBuilding ()
 
virtual bool IsBuilding ()
 
bool CheckSmallViewChange ()
 
- Protected Member Functions inherited from Sandbox.Game.Entities.MyBlockBuilderBase
Vector3I IntersectCubes (MyCubeGrid grid, out double distance)
 
Vector3D IntersectExact (MyCubeGrid grid, ref MatrixD inverseGridWorldMatrix, out Vector3D intersection, out MySlimBlock intersectedBlock)
 Calculates exact intersection point (in uniform grid coordinates) of eye ray with the given grid of all cubes. Returns position of intersected object in uniform grid coordinates More...
 
Vector3D GetIntersectedBlockData (ref MatrixD inverseGridWorldMatrix, out Vector3D intersection, out MySlimBlock intersectedBlock, out ushort?compoundBlockId)
 Calculates exact intersection point (in uniform grid coordinates) from stored havok's hit info object obtained during FindClosest grid. Returns position of intersected object in uniform grid coordinates. More...
 
void IntersectInflated (List< Vector3I > outHitPositions, MyCubeGrid grid)
 
BoundingBoxD GetCubeBoundingBox (Vector3I cubePos)
 
bool GetCubeAddAndRemovePositions (Vector3I intersectedCube, bool placingSmallGridOnLargeStatic, out Vector3I addPos, out Vector3I addDir, out Vector3I removePos)
 
bool GetBlockAddPosition (float gridSize, bool placingSmallGridOnLargeStatic, out MySlimBlock intersectedBlock, out Vector3D intersectedBlockPos, out Vector3D intersectExactPos, out Vector3I addPositionBlock, out Vector3I addDirectionBlock, out ushort?compoundBlockId)
 

Static Protected Member Functions

static void DrawRemovingCubes (Vector3I?startRemove, Vector3I?continueBuild, MySlimBlock removeBlock)
 
static void UpdateBlockInfoHud ()
 
static MyObjectBuilder_CubeGrid CreateMultiBlockGridBuilder (MyMultiBlockDefinition multiCubeBlockDefinition, Matrix rotationMatrix, Vector3D position=default(Vector3D))
 
static void AfterGridBuild (MyEntity builder, MyCubeGrid grid, bool instantBuild)
 
- Static Protected Member Functions inherited from Sandbox.Game.Entities.MyBlockBuilderBase
static void AddFastBuildModelWithSubparts (ref MatrixD matrix, List< MatrixD > matrices, List< string > models, MyCubeBlockDefinition blockDefinition, float gridScale)
 

Protected Attributes

bool canBuild = true
 
MyBlockBuilderRotationHints m_rotationHints = new MyBlockBuilderRotationHints()
 
MyBlockBuilderRenderData m_renderData = new MyBlockBuilderRenderData()
 
MyCubeBuilderGizmo m_gizmo
 
MyCubeBuilderState m_cubeBuildlerState
 
MyCoordinateSystem.CoordSystemData m_lastLocalCoordSysData
 
HashSet< MyCubeGrid.MyBlockLocationm_blocksBuildQueue = new HashSet<MyCubeGrid.MyBlockLocation>()
 
List< Vector3Im_tmpBlockPositionList = new List<Vector3I>()
 
List< Tuple< Vector3I, ushort > > m_tmpCompoundBlockPositionIdList = new List<Tuple<Vector3I, ushort>>()
 
HashSet< Vector3Im_tmpBlockPositionsSet = new HashSet<Vector3I>()
 
- Protected Attributes inherited from Sandbox.Game.Entities.MyBlockBuilderBase
MyCubeGrid m_currentGrid
 
MatrixD m_invGridWorldMatrix = MatrixD.Identity
 
MyVoxelBase m_currentVoxelBase
 
MyPhysics.HitInfo m_hitInfo
 

Static Protected Attributes

static float BLOCK_ROTATION_SPEED = 0.002f
 
- Static Protected Attributes inherited from Sandbox.Game.Entities.MyBlockBuilderBase
static readonly MyStringId[] m_rotationControls
 
static MyCubeBuilderDefinition m_cubeBuilderDefinition
 
static readonly int[] m_rotationDirections = new int[6] { -1, 1, 1, -1, 1, -1 }
 

Properties

override Type[] Dependencies [get]
 
static MyBuildComponentBase BuildComponent [get, set]
 
bool CompoundEnabled [get, protected set]
 
bool BlockCreationIsActivated [get]
 
override bool IsActivated [get]
 
bool UseSymmetry [get, set]
 
bool UseTransparency [get, set]
 
bool FreezeGizmo [get, set]
 
bool ShowRemoveGizmo [get, set]
 
MyCubeBuilderState CubeBuilderState [get]
 
override MyCubeBlockDefinition CurrentBlockDefinition [get, set]
 
MyCubeBlockDefinition ToolbarBlockDefinition [get]
 Current block definition for toolbar. More...
 
static BuildingModeEnum BuildingMode [get, set]
 
virtual bool IsCubeSizeModesAvailable [get]
 
bool IsBuildMode [get, set]
 
bool DynamicMode [get, set]
 
bool GridValid [get]
 
bool GridAndBlockValid [get]
 
bool VoxelMapAndBlockValid [get]
 
bool PlacingSmallGridOnLargeStatic [get]
 
bool BuildInputValid [get]
 
- Properties inherited from VRage.Game.ModAPI.IMyCubeBuilder
bool BlockCreationIsActivated [get]
 
bool FreezeGizmo [get, set]
 Freezes the built object preview in current position More...
 
bool ShowRemoveGizmo [get, set]
 Shows the delete area preview More...
 
bool UseSymmetry [get, set]
 Enables synmetry block placing More...
 
bool UseTransparency [get, set]
 
bool IsActivated [get]
 Is any mode active More...
 
- Properties inherited from Sandbox.Game.Entities.MyBlockBuilderBase
static float IntersectionDistance [get, set]
 
abstract MyCubeBlockDefinition CurrentBlockDefinition [get, set]
 
MyPhysics.HitInfo HitInfo [get]
 
static bool SpectatorIsBuilding [get]
 
static bool CameraControllerSpectator [get]
 
static Vector3D IntersectionStart [get]
 
static Vector3D IntersectionDirection [get]
 
Vector3D FreePlacementTarget [get]
 
static IMyPlacementProvider PlacementProvider [get, set]
 
static MyCubeBuilderDefinition CubeBuilderDefinition [get]
 
abstract bool IsActivated [get]
 
- Properties inherited from VRage.Game.Components.MySessionComponentBase
MyUpdateOrder UpdateOrder [get]
 
MyObjectBuilderType ObjectBuilderType [get]
 
bool Loaded [get]
 
bool Initialized [get]
 
MyDefinitionId Definition [get, set]
 
virtual Type[] Dependencies [get]
 
virtual bool IsRequiredByGame [get]
 Indicates whether a session component should be used in current configuration. Example: MyDestructionData component returns true only when game uses Havok Destruction More...
 

Detailed Description

Definition at line 35 of file MyCubeBuilder-Draw.cs.

Member Enumeration Documentation

Enumerator
SingleBlock 
Line 
Plane 

Definition at line 111 of file MyCubeBuilder.cs.

Enumerator
None 
AddToScene 
CreatePhysics 
EnableSmallTolargeConnections 
SpawnAsMaster 
Default 

Definition at line 85 of file MyCubeBuilder.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.MyCubeBuilder.MyCubeBuilder ( )
inline

Definition at line 452 of file MyCubeBuilder.cs.

Member Function Documentation

override void Sandbox.Game.Entities.MyCubeBuilder.Activate ( MyDefinitionId blockDefinitionId = null)
inlinevirtual

Implements Sandbox.Game.Entities.MyBlockBuilderBase.

Definition at line 882 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.Add ( )
inlinevirtual

Definition at line 2668 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.AddBlocksToBuildQueueOrSpawn ( MyCubeBlockDefinition  blockDefinition,
ref MatrixD  worldMatrixAdd,
Vector3I  min,
Vector3I  max,
Vector3I  center,
Quaternion  localOrientation 
)
inlineprotected

Definition at line 2725 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.AddConstruction ( MyEntity  builder)
inlinevirtual

Definition at line 2855 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.AddFastBuildModels ( MatrixD  baseMatrix,
ref Matrix  localMatrixAdd,
List< MatrixD matrices,
List< string >  models,
MyCubeBlockDefinition  definition,
Vector3I startBuild,
Vector3I continueBuild 
)
inline

Definition at line 943 of file MyCubeBuilder.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.AfterGridBuild ( MyEntity  builder,
MyCubeGrid  grid,
bool  instantBuild 
)
inlinestaticprotected

Definition at line 4055 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.AlignToGravity ( bool  alignToCamera = true)
inline

Definition at line 997 of file MyCubeBuilder.cs.

static List<MyCubeBlockDefinition.MountPoint> Sandbox.Game.Entities.MyCubeBuilder.AutogenerateMountpoints ( MyModel  model,
float  gridSize 
)
inlinestatic

Definition at line 706 of file MyCubeBuilder-Draw.cs.

static List<MyCubeBlockDefinition.MountPoint> Sandbox.Game.Entities.MyCubeBuilder.AutogenerateMountpoints ( HkShape[]  shapes,
float  gridSize 
)
inlinestatic

Definition at line 719 of file MyCubeBuilder-Draw.cs.

static bool Sandbox.Game.Entities.MyCubeBuilder.CalculateBlockRotation ( int  index,
int  sign,
ref MatrixD  currentMatrix,
out MatrixD  rotatedMatrix,
float  angle,
MyBlockDirection  blockDirection = MyBlockDirection.Both,
MyBlockRotation  blockRotation = MyBlockRotation.Both 
)
inlinestatic

Definition at line 559 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.CalculateLocalCoordAndMode ( )
inlineprotected

Definition at line 3255 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.CaluclateDynamicModePos ( Vector3D  defaultPos,
bool  isDynamicOverride = false 
)
inlineprotectedvirtual

Calculates final position of the block in through gizmo.

Parameters
defaultPosProposed position.
Returns
If True than success.

Definition at line 311 of file MyCubeBuilder-Draw.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.CancelBuilding ( )
inlineprotectedvirtual

Definition at line 3772 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.CanStartConstruction ( MyEntity  buildingEntity)
inlinevirtual

Definition at line 2848 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.CheckSmallViewChange ( )
inlineprotected

Definition at line 3790 of file MyCubeBuilder.cs.

static bool Sandbox.Game.Entities.MyCubeBuilder.CheckValidBlockRotation ( Matrix  localMatrix,
MyBlockDirection  blockDirection,
MyBlockRotation  blockRotation 
)
inlinestatic

Definition at line 2596 of file MyCubeBuilder.cs.

static bool Sandbox.Game.Entities.MyCubeBuilder.CheckValidBlocksRotation ( Matrix  gridLocalMatrix,
MyCubeGrid  grid 
)
inlinestatic

Definition at line 2624 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.ClearRenderData ( )
inlineprotected

Definition at line 71 of file MyCubeBuilder-Draw.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.ContinueBuilding ( bool  planeBuild)
inlinevirtual

Definition at line 3478 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.ContinueBuilding ( bool  planeBuild,
Vector3I startBuild,
Vector3I startRemove,
ref Vector3I continueBuild,
Vector3I  blockMinPosision,
Vector3I  blockMaxPosition 
)
inlineprotected

Continues building/removing. Do not put any gizmo related stuff here.

Definition at line 3487 of file MyCubeBuilder.cs.

static MyObjectBuilder_CubeBlock Sandbox.Game.Entities.MyCubeBuilder.ConvertDynamicGridBlockToStatic ( ref MatrixD  worldMatrix,
MyObjectBuilder_CubeBlock  origBlock 
)
inlinestatic

Definition at line 4345 of file MyCubeBuilder.cs.

static MyObjectBuilder_CubeGrid Sandbox.Game.Entities.MyCubeBuilder.ConvertGridBuilderToStatic ( MyObjectBuilder_CubeGrid  originalGrid,
MatrixD  worldMatrix 
)
inlinestatic

Definition at line 4300 of file MyCubeBuilder.cs.

static MyObjectBuilder_CubeGrid Sandbox.Game.Entities.MyCubeBuilder.CreateMultiBlockGridBuilder ( MyMultiBlockDefinition  multiCubeBlockDefinition,
Matrix  rotationMatrix,
Vector3D  position = default(Vector3D) 
)
inlinestaticprotected

Definition at line 3929 of file MyCubeBuilder.cs.

override void Sandbox.Game.Entities.MyCubeBuilder.Deactivate ( )
inlinevirtual

Implements Sandbox.Game.Entities.MyBlockBuilderBase.

Definition at line 856 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.DeactivateBlockCreation ( )
inline

Deactivates building mode

Implements VRage.Game.ModAPI.IMyCubeBuilder.

Definition at line 681 of file MyCubeBuilder.cs.

override void Sandbox.Game.Entities.MyCubeBuilder.Draw ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 78 of file MyCubeBuilder-Draw.cs.

void Sandbox.Game.Entities.MyCubeBuilder.DrawBuildingStepsCount ( Vector3I startBuild,
Vector3I startRemove,
Vector3I continueBuild,
ref Matrix  localMatrixAdd 
)
inlineprotected

Definition at line 328 of file MyCubeBuilder-Draw.cs.

void Sandbox.Game.Entities.MyCubeBuilder.DrawGuiIndicators ( )
inlineprotected

Definition at line 269 of file MyCubeBuilder-Draw.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.DrawMountPoints ( float  cubeSize,
MyCubeBlockDefinition  def,
ref MatrixD  drawMatrix 
)
inlinestatic

Definition at line 675 of file MyCubeBuilder-Draw.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.DrawMountPoints ( float  cubeSize,
MyCubeBlockDefinition  def,
MatrixD  drawMatrix,
MyCubeBlockDefinition.MountPoint[]  mountPoints 
)
inlinestatic

Definition at line 833 of file MyCubeBuilder-Draw.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.DrawRemovingCubes ( Vector3I startRemove,
Vector3I continueBuild,
MySlimBlock  removeBlock 
)
inlinestaticprotected

Definition at line 936 of file MyCubeBuilder-Draw.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.DrawSemiTransparentBox ( MyCubeGrid  grid,
MySlimBlock  block,
Color  color,
bool  onlyWireframe = false,
string  lineMaterial = null,
Vector4 lineColor = null 
)
inlinestatic

Definition at line 44 of file MyCubeBuilder-Draw.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.DrawSemiTransparentBox ( Vector3I  minPosition,
Vector3I  maxPosition,
MyCubeGrid  grid,
Color  color,
bool  onlyWireframe = false,
string  lineMaterial = null,
Vector4 lineColor = null 
)
inlinestatic

Definition at line 49 of file MyCubeBuilder-Draw.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.GetAddAndRemovePositions ( float  gridSize,
bool  placingSmallGridOnLargeStatic,
out Vector3I  addPos,
out Vector3 addPosSmallOnLarge,
out Vector3I  addDir,
out Vector3I  removePos,
out MySlimBlock  removeBlock,
out ushort?  compoundBlockId,
HashSet< Tuple< MySlimBlock, ushort?>>  removeBlocksInMultiBlock 
)
inlinevirtual

Definition at line 2921 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.GetAddPosition ( out Vector3D  position)
inline

Definition at line 2916 of file MyCubeBuilder.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.GetAllBlocksPositions ( HashSet< Tuple< MySlimBlock, ushort?>>  blockInCompoundIDs,
HashSet< Vector3I outPositions 
)
inlinestatic

Definition at line 4384 of file MyCubeBuilder.cs.

MyOrientedBoundingBoxD Sandbox.Game.Entities.MyCubeBuilder.GetBuildBoundingBox ( float  inflate = 0.0f)
inline

Definition at line 2827 of file MyCubeBuilder.cs.

static double Sandbox.Game.Entities.MyCubeBuilder.GetCurrentRayIntersection ( )
inlinestatic

Definition at line 4268 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.HandleGameInput ( )
inlinevirtual

Definition at line 1034 of file MyCubeBuilder.cs.

override void Sandbox.Game.Entities.MyCubeBuilder.InitFromDefinition ( MySessionComponentDefinition  definition)
inlinevirtual

Reimplemented from Sandbox.Game.Entities.MyBlockBuilderBase.

Definition at line 462 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.InputLost ( )
inline

Definition at line 1800 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.IsBuilding ( )
inlineprotectedvirtual

Definition at line 3785 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.IsCubeSizeAvailable ( MyCubeBlockDefinition  blockDef)
inline

Indicates if cube block size is avaliable for current cube builder state.

Parameters
blockDefBlock definition to check for.
Returns
True if it is avaliable.

Definition at line 3148 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.IsDynamicOverride ( )
inlineprotectedvirtual

Allows to override normal behaviour of Cube builder.

Returns

Definition at line 741 of file MyCubeBuilder.cs.

override void Sandbox.Game.Entities.MyCubeBuilder.LoadData ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 467 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.OnLostFocus ( )
inline

Definition at line 877 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.PrepareBlocksToRemove ( )
inlineprotectedvirtual

Definition at line 3022 of file MyCubeBuilder.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.PrepareCharacterCollisionPoints ( List< Vector3D outList)
inlinestatic

Definition at line 1837 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.Remove ( )
inlineprotected

Definition at line 3055 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.RemoveBlock ( MySlimBlock  block,
ushort?  blockIdInCompound,
bool  checkExisting = false 
)
inlineprotected

Definition at line 3072 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.RotateAxis ( int  index,
int  sign,
float  angleDelta,
bool  newlyPressed 
)
inlineprotectedvirtual

Definition at line 526 of file MyCubeBuilder.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.SelectBlockToToolbar ( MySlimBlock  block,
bool  selectToNextSlot = true 
)
inlinestatic

Definition at line 4195 of file MyCubeBuilder.cs.

static MyCubeGrid Sandbox.Game.Entities.MyCubeBuilder.SpawnDynamicGrid ( MyCubeBlockDefinition  blockDefinition,
MyEntity  builder,
MatrixD  worldMatrix,
Vector3  color,
long  entityId = 0,
SpawnFlags  spawnFlags = SpawnFlags.Default,
long  builtBy = 0,
Action  completionCallback = null 
)
inlinestatic

Definition at line 4150 of file MyCubeBuilder.cs.

static MyCubeGrid Sandbox.Game.Entities.MyCubeBuilder.SpawnStaticGrid ( MyCubeBlockDefinition  blockDefinition,
MyEntity  builder,
MatrixD  worldMatrix,
Vector3  color,
SpawnFlags  spawnFlags = SpawnFlags.Default,
long  builtBy = 0,
Action  completionCallback = null 
)
inlinestatic

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.

Definition at line 4107 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.StartBuilding ( )
inlinevirtual

Definition at line 3427 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.StartBuilding ( ref Vector3I startBuild,
Vector3I startRemove 
)
inlineprotected

Starts continuous building. Do not put any gizmo related stuff here.

Definition at line 3435 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.StartRemoving ( )
inlineprotectedvirtual

Definition at line 3456 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.StartRemoving ( Vector3I startBuild,
ref Vector3I startRemove 
)
inlineprotected

Starts continuous removing. Do not put any gizmo related stuff here.

Definition at line 3464 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.StartStaticGridPlacement ( MyCubeSize  cubeSize,
bool  isStatic 
)
inline

Definition at line 3912 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.StopBuilding ( )
inlinevirtual

Definition at line 3599 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.StopBuilding ( bool  smallViewChange,
ref Vector3I startBuild,
ref Vector3I startRemove,
ref Vector3I continueBuild,
Vector3I  blockMinPosition,
Vector3I  blockMaxPosition,
Vector3I  blockCenterPosition,
ref Matrix  localMatrixAdd,
MyCubeBlockDefinition  blockDefinition 
)
inlineprotected

Stops continuous building/removing. Do not put any gizmo related stuff here.

Definition at line 3651 of file MyCubeBuilder.cs.

static Vector3 Sandbox.Game.Entities.MyCubeBuilder.TransformLargeGridHitCoordToSmallGrid ( Vector3D  coords,
MatrixD  worldMatrixNormalizedInv,
float  gridSize 
)
inlinestatic

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.

Definition at line 4285 of file MyCubeBuilder.cs.

override void Sandbox.Game.Entities.MyCubeBuilder.UnloadData ( )
inlineprotectedvirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 3317 of file MyCubeBuilder.cs.

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

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 3283 of file MyCubeBuilder.cs.

static void Sandbox.Game.Entities.MyCubeBuilder.UpdateBlockInfoHud ( )
inlinestaticprotected

Definition at line 3886 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.UpdateCubeBlockDefinition ( MyDefinitionId id)
inlineprotectedvirtual

Definition at line 914 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.UpdateCubeBlockStageDefinition ( MyCubeBlockDefinition  stageCubeBlockDefinition)
inlineprotectedvirtual

Definition at line 893 of file MyCubeBuilder.cs.

virtual void Sandbox.Game.Entities.MyCubeBuilder.UpdateGizmo ( MyCubeBuilderGizmo.MyGizmoSpaceProperties  gizmoSpace,
bool  add,
bool  remove,
bool  draw 
)
inlineprotectedvirtual

Definition at line 1870 of file MyCubeBuilder.cs.

void Sandbox.Game.Entities.MyCubeBuilder.UpdateNotificationBlockNotAvailable ( bool  changeText = true)
inline

Definition at line 3372 of file MyCubeBuilder.cs.

Member Data Documentation

Dictionary<PlayerId, List<Vector3> > Sandbox.Game.Entities.MyCubeBuilder.AllPlayersColors = null
static

Definition at line 150 of file MyCubeBuilder.cs.

float Sandbox.Game.Entities.MyCubeBuilder.BLOCK_ROTATION_SPEED = 0.002f
staticprotected

Definition at line 126 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.canBuild = true
protected

Definition at line 162 of file MyCubeBuilder.cs.

HashSet<MyCubeGrid.MyBlockLocation> Sandbox.Game.Entities.MyCubeBuilder.m_blocksBuildQueue = new HashSet<MyCubeGrid.MyBlockLocation>()
protected

Definition at line 2663 of file MyCubeBuilder.cs.

MyCubeBuilderState Sandbox.Game.Entities.MyCubeBuilder.m_cubeBuildlerState
protected

Definition at line 258 of file MyCubeBuilder.cs.

MyCubeBuilderGizmo Sandbox.Game.Entities.MyCubeBuilder.m_gizmo
protected

Definition at line 251 of file MyCubeBuilder.cs.

MyCoordinateSystem.CoordSystemData Sandbox.Game.Entities.MyCubeBuilder.m_lastLocalCoordSysData
protected

Definition at line 260 of file MyCubeBuilder.cs.

MyBlockBuilderRenderData Sandbox.Game.Entities.MyCubeBuilder.m_renderData = new MyBlockBuilderRenderData()
protected

Definition at line 184 of file MyCubeBuilder.cs.

MyBlockBuilderRotationHints Sandbox.Game.Entities.MyCubeBuilder.m_rotationHints = new MyBlockBuilderRotationHints()
protected

Definition at line 183 of file MyCubeBuilder.cs.

List<Vector3I> Sandbox.Game.Entities.MyCubeBuilder.m_tmpBlockPositionList = new List<Vector3I>()
protected

Definition at line 2664 of file MyCubeBuilder.cs.

HashSet<Vector3I> Sandbox.Game.Entities.MyCubeBuilder.m_tmpBlockPositionsSet = new HashSet<Vector3I>()
protected

Definition at line 2666 of file MyCubeBuilder.cs.

List<Tuple<Vector3I, ushort> > Sandbox.Game.Entities.MyCubeBuilder.m_tmpCompoundBlockPositionIdList = new List<Tuple<Vector3I, ushort>>()
protected

Definition at line 2665 of file MyCubeBuilder.cs.

Vector3 Sandbox.Game.Entities.MyCubeBuilder.MaxGridDistanceFrom = null

Definition at line 241 of file MyCubeBuilder.cs.

MyCubeBuilder Sandbox.Game.Entities.MyCubeBuilder.Static
static

Definition at line 124 of file MyCubeBuilder.cs.

Property Documentation

bool Sandbox.Game.Entities.MyCubeBuilder.BlockCreationIsActivated
get

Definition at line 192 of file MyCubeBuilder.cs.

MyBuildComponentBase Sandbox.Game.Entities.MyCubeBuilder.BuildComponent
staticgetset

Definition at line 132 of file MyCubeBuilder.cs.

BuildingModeEnum Sandbox.Game.Entities.MyCubeBuilder.BuildingMode
staticgetset

Definition at line 385 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.BuildInputValid
getprotected

Definition at line 511 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.CompoundEnabled
getprotected set

Definition at line 187 of file MyCubeBuilder.cs.

MyCubeBuilderState Sandbox.Game.Entities.MyCubeBuilder.CubeBuilderState
get

Definition at line 263 of file MyCubeBuilder.cs.

override MyCubeBlockDefinition Sandbox.Game.Entities.MyCubeBuilder.CurrentBlockDefinition
getsetprotected

Definition at line 343 of file MyCubeBuilder.cs.

override Type [] Sandbox.Game.Entities.MyCubeBuilder.Dependencies
get

Definition at line 63 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.DynamicMode
getset

Definition at line 430 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.FreezeGizmo
getset

Definition at line 238 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.GridAndBlockValid
getprotected

Definition at line 485 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.GridValid
getprotected

Definition at line 480 of file MyCubeBuilder.cs.

override bool Sandbox.Game.Entities.MyCubeBuilder.IsActivated
get

Definition at line 198 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.IsBuildMode
getset

Definition at line 416 of file MyCubeBuilder.cs.

virtual bool Sandbox.Game.Entities.MyCubeBuilder.IsCubeSizeModesAvailable
get

Definition at line 411 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.PlacingSmallGridOnLargeStatic
get

Definition at line 502 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.ShowRemoveGizmo
getset

Definition at line 240 of file MyCubeBuilder.cs.

MyCubeBlockDefinition Sandbox.Game.Entities.MyCubeBuilder.ToolbarBlockDefinition
get

Current block definition for toolbar.

Definition at line 356 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.UseSymmetry
getset

Definition at line 204 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.UseTransparency
getset

Definition at line 219 of file MyCubeBuilder.cs.

bool Sandbox.Game.Entities.MyCubeBuilder.VoxelMapAndBlockValid
getprotected

Definition at line 494 of file MyCubeBuilder.cs.


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