Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | Events | List of all members
Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem Class Reference
Inheritance diagram for Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem:
VRage.Game.Components.MySessionComponentBase VRage.Game.Components.Interfaces.IMyUserInputComponent

Classes

struct  CoordSystemData
 

Public Member Functions

 MyCoordinateSystem ()
 
override void Init (MyObjectBuilder_SessionComponent sessionComponent)
 
override void InitFromDefinition (MySessionComponentDefinition definition)
 
override void LoadData ()
 
override MyObjectBuilder_SessionComponent GetObjectBuilder ()
 
void CreateCoordSys (MyCubeGrid cubeGrid, bool staticGridAlignToCenter, bool sync=false)
 Creates coord system and sends it to clients. Should be called only on server. More...
 
void RegisterCubeGrid (MyCubeGrid cubeGrid)
 Registers cube grid under closest coord system. More...
 
CoordSystemData SnapWorldPosToClosestGrid (ref Vector3D worldPos, double gridSize, bool staticGridAlignToCenter)
 Converts world position to be snapped to closest grid. More...
 
bool IsAnyLocalCoordSysExist (ref Vector3D worldPos)
 Indicates if position is inside of local coordinates area. More...
 
bool IsLocalCoordSysExist (ref MatrixD tranform, double gridSize)
 Naive way of checking if transform is snaped to coord sys. In second iteration update for better way. More...
 
void ResetSelection ()
 Sets last and current selected coordinate system to none. More...
 
override void Draw ()
 
Color GetCoordSysColor (long coordSysId)
 Gets local coordinate system indication color. More...
 
- Public Member Functions inherited from VRage.Game.Components.MySessionComponentBase
virtual bool UpdatedBeforeInit ()
 
 MySessionComponentBase ()
 
void SetUpdateOrder (MyUpdateOrder order)
 
void AfterLoadData ()
 
void UnloadDataConditional ()
 
virtual void SaveData ()
 
virtual void BeforeStart ()
 
virtual void UpdateBeforeSimulation ()
 
virtual void Simulate ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdatingStopped ()
 
virtual void HandleInput ()
 
override string ToString ()
 

Static Public Member Functions

static void GetPosRoundedToGrid (ref Vector3D vecToRound, double gridSize, bool isStaticGridAlignToCenter)
 

Static Public Attributes

static MyCoordinateSystem Static
 

Protected Member Functions

override void UnloadData ()
 

Properties

long SelectedCoordSys [get]
 
long LastSelectedCoordSys [get]
 
bool LocalCoordExist [get]
 Indicates if there is any selected coord system. More...
 
bool Visible [get, set]
 Indicates if LCS graphic representation is visible. More...
 
- 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...
 

Events

static Action OnCoordinateChange
 

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 27 of file MyCoordinateSystem.cs.

Constructor & Destructor Documentation

Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.MyCoordinateSystem ( )
inline

Definition at line 111 of file MyCoordinateSystem.cs.

Member Function Documentation

void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.CreateCoordSys ( MyCubeGrid  cubeGrid,
bool  staticGridAlignToCenter,
bool  sync = false 
)
inline

Creates coord system and sends it to clients. Should be called only on server.

Parameters
cubeGridCube grid that is an origin.
staticGridAlignToCenterIndcates if grid should be aligned to center or no.

Definition at line 253 of file MyCoordinateSystem.cs.

override void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.Draw ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 588 of file MyCoordinateSystem.cs.

Color Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.GetCoordSysColor ( long  coordSysId)
inline

Gets local coordinate system indication color.

Parameters
coordSysIdLocal coordinate system ID.
Returns
Indication color.

Definition at line 639 of file MyCoordinateSystem.cs.

override MyObjectBuilder_SessionComponent Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.GetObjectBuilder ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 174 of file MyCoordinateSystem.cs.

static void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.GetPosRoundedToGrid ( ref Vector3D  vecToRound,
double  gridSize,
bool  isStaticGridAlignToCenter 
)
inlinestatic

Definition at line 292 of file MyCoordinateSystem.cs.

override void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.Init ( MyObjectBuilder_SessionComponent  sessionComponent)
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 121 of file MyCoordinateSystem.cs.

override void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.InitFromDefinition ( MySessionComponentDefinition  definition)
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 144 of file MyCoordinateSystem.cs.

bool Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.IsAnyLocalCoordSysExist ( ref Vector3D  worldPos)
inline

Indicates if position is inside of local coordinates area.

Parameters
worldPosWorld position.
Returns
If true, position is inside of closest local coordinate system.

Definition at line 510 of file MyCoordinateSystem.cs.

bool Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.IsLocalCoordSysExist ( ref MatrixD  tranform,
double  gridSize 
)
inline

Naive way of checking if transform is snaped to coord sys. In second iteration update for better way.

Parameters
tranformTransform to check
Returns
Indicates if transform is aligned correctly to any grid system.

Definition at line 528 of file MyCoordinateSystem.cs.

override void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.LoadData ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 159 of file MyCoordinateSystem.cs.

void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.RegisterCubeGrid ( MyCubeGrid  cubeGrid)
inline

Registers cube grid under closest coord system.

Parameters
cubeGridCube grid to register.

Definition at line 338 of file MyCoordinateSystem.cs.

void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.ResetSelection ( )
inline

Sets last and current selected coordinate system to none.

Definition at line 569 of file MyCoordinateSystem.cs.

CoordSystemData Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.SnapWorldPosToClosestGrid ( ref Vector3D  worldPos,
double  gridSize,
bool  staticGridAlignToCenter 
)
inline

Converts world position to be snapped to closest grid.

Parameters
worldPosWorld position.
gridSizeGrid size.
staticGridAlignToCenterIs grid align to static.
Returns

Definition at line 435 of file MyCoordinateSystem.cs.

override void Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.UnloadData ( )
inlineprotectedvirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 164 of file MyCoordinateSystem.cs.

Member Data Documentation

MyCoordinateSystem Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.Static
static

Definition at line 61 of file MyCoordinateSystem.cs.

Property Documentation

long Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.LastSelectedCoordSys
get

Definition at line 93 of file MyCoordinateSystem.cs.

bool Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.LocalCoordExist
get

Indicates if there is any selected coord system.

Definition at line 98 of file MyCoordinateSystem.cs.

long Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.SelectedCoordSys
get

summary> Returns id of last selected coord system. /summary>

Definition at line 88 of file MyCoordinateSystem.cs.

bool Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.Visible
getset

Indicates if LCS graphic representation is visible.

Definition at line 105 of file MyCoordinateSystem.cs.

Event Documentation

Action Sandbox.Game.GameSystems.CoordinateSystem.MyCoordinateSystem.OnCoordinateChange
static

Definition at line 32 of file MyCoordinateSystem.cs.


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