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

Public Member Functions

override void InitFromDefinition (MySessionComponentDefinition definition)
 
abstract void Activate (MyDefinitionId?blockDefinitionId=null)
 
abstract void Deactivate ()
 
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 LoadData ()
 
virtual void SaveData ()
 
virtual void BeforeStart ()
 
virtual void UpdateBeforeSimulation ()
 
virtual void Simulate ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdatingStopped ()
 
virtual void Draw ()
 
virtual void HandleInput ()
 
override string ToString ()
 

Static Public Member Functions

static void ComputeSteps (Vector3I start, Vector3I end, Vector3I rotatedSize, out Vector3I stepDelta, out Vector3I counter, out int stepCount)
 

Protected Member Functions

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)
 
- Protected Member Functions inherited from VRage.Game.Components.MySessionComponentBase
virtual void UnloadData ()
 

Static Protected Member Functions

static void AddFastBuildModelWithSubparts (ref MatrixD matrix, List< MatrixD > matrices, List< string > models, MyCubeBlockDefinition blockDefinition, float gridScale)
 

Protected Attributes

MyCubeGrid m_currentGrid
 
MatrixD m_invGridWorldMatrix = MatrixD.Identity
 
MyVoxelBase m_currentVoxelBase
 
MyPhysics.HitInfo m_hitInfo
 

Static Protected Attributes

static readonly MyStringId[] m_rotationControls
 
static MyCubeBuilderDefinition m_cubeBuilderDefinition
 
static readonly int[] m_rotationDirections = new int[6] { -1, 1, 1, -1, 1, -1 }
 

Properties

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

Additional Inherited Members

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

Detailed Description

Definition at line 35 of file MyBlockBuilderBase.cs.

Member Function Documentation

abstract void Sandbox.Game.Entities.MyBlockBuilderBase.Activate ( MyDefinitionId blockDefinitionId = null)
pure virtual
static void Sandbox.Game.Entities.MyBlockBuilderBase.AddFastBuildModelWithSubparts ( ref MatrixD  matrix,
List< MatrixD matrices,
List< string >  models,
MyCubeBlockDefinition  blockDefinition,
float  gridScale 
)
inlinestaticprotected

Definition at line 213 of file MyBlockBuilderBase.cs.

static void Sandbox.Game.Entities.MyBlockBuilderBase.ComputeSteps ( Vector3I  start,
Vector3I  end,
Vector3I  rotatedSize,
out Vector3I  stepDelta,
out Vector3I  counter,
out int  stepCount 
)
inlinestatic

Definition at line 561 of file MyBlockBuilderBase.cs.

abstract void Sandbox.Game.Entities.MyBlockBuilderBase.Deactivate ( )
pure virtual
MyCubeGrid Sandbox.Game.Entities.MyBlockBuilderBase.FindClosestGrid ( )
inline

Definition at line 286 of file MyBlockBuilderBase.cs.

bool Sandbox.Game.Entities.MyBlockBuilderBase.FindClosestPlacementObject ( out MyCubeGrid  closestGrid,
out MyVoxelBase  closestVoxelMap 
)
inline

Finds closest object (grid or voxel map) for placement of blocks .

Definition at line 294 of file MyBlockBuilderBase.cs.

bool Sandbox.Game.Entities.MyBlockBuilderBase.GetBlockAddPosition ( float  gridSize,
bool  placingSmallGridOnLargeStatic,
out MySlimBlock  intersectedBlock,
out Vector3D  intersectedBlockPos,
out Vector3D  intersectExactPos,
out Vector3I  addPositionBlock,
out Vector3I  addDirectionBlock,
out ushort?  compoundBlockId 
)
inlineprotected

Definition at line 476 of file MyBlockBuilderBase.cs.

bool Sandbox.Game.Entities.MyBlockBuilderBase.GetCubeAddAndRemovePositions ( Vector3I  intersectedCube,
bool  placingSmallGridOnLargeStatic,
out Vector3I  addPos,
out Vector3I  addDir,
out Vector3I  removePos 
)
inlineprotected

Definition at line 429 of file MyBlockBuilderBase.cs.

BoundingBoxD Sandbox.Game.Entities.MyBlockBuilderBase.GetCubeBoundingBox ( Vector3I  cubePos)
inlineprotected

Definition at line 422 of file MyBlockBuilderBase.cs.

Vector3D Sandbox.Game.Entities.MyBlockBuilderBase.GetIntersectedBlockData ( ref MatrixD  inverseGridWorldMatrix,
out Vector3D  intersection,
out MySlimBlock  intersectedBlock,
out ushort?  compoundBlockId 
)
inlineprotected

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.

Definition at line 352 of file MyBlockBuilderBase.cs.

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

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Reimplemented in Sandbox.Game.Entities.MyCubeBuilder.

Definition at line 165 of file MyBlockBuilderBase.cs.

Vector3I Sandbox.Game.Entities.MyBlockBuilderBase.IntersectCubes ( MyCubeGrid  grid,
out double  distance 
)
inlineprotected

Definition at line 310 of file MyBlockBuilderBase.cs.

Vector3D Sandbox.Game.Entities.MyBlockBuilderBase.IntersectExact ( MyCubeGrid  grid,
ref MatrixD  inverseGridWorldMatrix,
out Vector3D  intersection,
out MySlimBlock  intersectedBlock 
)
inlineprotected

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

Definition at line 330 of file MyBlockBuilderBase.cs.

void Sandbox.Game.Entities.MyBlockBuilderBase.IntersectInflated ( List< Vector3I outHitPositions,
MyCubeGrid  grid 
)
inlineprotected

Definition at line 406 of file MyBlockBuilderBase.cs.

Member Data Documentation

MyCubeBuilderDefinition Sandbox.Game.Entities.MyBlockBuilderBase.m_cubeBuilderDefinition
staticprotected

Definition at line 47 of file MyBlockBuilderBase.cs.

MyCubeGrid Sandbox.Game.Entities.MyBlockBuilderBase.m_currentGrid
protected

Definition at line 63 of file MyBlockBuilderBase.cs.

MyVoxelBase Sandbox.Game.Entities.MyBlockBuilderBase.m_currentVoxelBase
protected

Definition at line 67 of file MyBlockBuilderBase.cs.

MyPhysics.HitInfo Sandbox.Game.Entities.MyBlockBuilderBase.m_hitInfo
protected

Definition at line 73 of file MyBlockBuilderBase.cs.

MatrixD Sandbox.Game.Entities.MyBlockBuilderBase.m_invGridWorldMatrix = MatrixD.Identity
protected

Definition at line 65 of file MyBlockBuilderBase.cs.

readonly MyStringId [] Sandbox.Game.Entities.MyBlockBuilderBase.m_rotationControls
staticprotected
Initial value:
= new MyStringId[]
{
MyControlsSpace.CUBE_ROTATE_VERTICAL_POSITIVE,
MyControlsSpace.CUBE_ROTATE_VERTICAL_NEGATIVE,
MyControlsSpace.CUBE_ROTATE_HORISONTAL_POSITIVE,
MyControlsSpace.CUBE_ROTATE_HORISONTAL_NEGATIVE,
MyControlsSpace.CUBE_ROTATE_ROLL_POSITIVE,
MyControlsSpace.CUBE_ROTATE_ROLL_NEGATIVE,
}

Definition at line 37 of file MyBlockBuilderBase.cs.

readonly int [] Sandbox.Game.Entities.MyBlockBuilderBase.m_rotationDirections = new int[6] { -1, 1, 1, -1, 1, -1 }
staticprotected

Definition at line 61 of file MyBlockBuilderBase.cs.

Property Documentation

bool Sandbox.Game.Entities.MyBlockBuilderBase.CameraControllerSpectator
staticget

Definition at line 109 of file MyBlockBuilderBase.cs.

MyCubeBuilderDefinition Sandbox.Game.Entities.MyBlockBuilderBase.CubeBuilderDefinition
staticget

Definition at line 156 of file MyBlockBuilderBase.cs.

abstract MyCubeBlockDefinition Sandbox.Game.Entities.MyBlockBuilderBase.CurrentBlockDefinition
getsetprotected

Definition at line 70 of file MyBlockBuilderBase.cs.

Vector3D Sandbox.Game.Entities.MyBlockBuilderBase.FreePlacementTarget
get

Definition at line 134 of file MyBlockBuilderBase.cs.

MyPhysics.HitInfo Sandbox.Game.Entities.MyBlockBuilderBase.HitInfo
get

Definition at line 75 of file MyBlockBuilderBase.cs.

Vector3D Sandbox.Game.Entities.MyBlockBuilderBase.IntersectionDirection
staticget

Definition at line 126 of file MyBlockBuilderBase.cs.

float Sandbox.Game.Entities.MyBlockBuilderBase.IntersectionDistance
staticgetset

Definition at line 51 of file MyBlockBuilderBase.cs.

Vector3D Sandbox.Game.Entities.MyBlockBuilderBase.IntersectionStart
staticget

Definition at line 118 of file MyBlockBuilderBase.cs.

abstract bool Sandbox.Game.Entities.MyBlockBuilderBase.IsActivated
get

Definition at line 180 of file MyBlockBuilderBase.cs.

IMyPlacementProvider Sandbox.Game.Entities.MyBlockBuilderBase.PlacementProvider
staticgetset

Definition at line 144 of file MyBlockBuilderBase.cs.

bool Sandbox.Game.Entities.MyBlockBuilderBase.SpectatorIsBuilding
staticget

Definition at line 101 of file MyBlockBuilderBase.cs.


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