Space Engineers
Public Member Functions | List of all members
Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator Interface Reference

Interface for implementation of additional geometry in cube grids (automatic placement of additional geometry). More...

Inheritance diagram for Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator:
Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase

Public Member Functions

bool Initialize (MyCubeGrid grid, MyCubeSize gridSizeEnum)
 initializes the generator with grid and its size. Note that the grid is not fully initializd yet. More...
 
void Close ()
 Closes the generator, use for unregistering from other objects. More...
 
void EnableGenerator (bool enable)
 Enables/disable generator. More...
 
void BlockAddedToMergedGrid (MySlimBlock block)
 Block was added but causes merging grids (so it was not catched in events OnBlockAdded/OnBLockRemoved because generator is disabled during merging). More...
 
void GenerateBlocks (MySlimBlock generatingBlock)
 Generate blocks for the given generating block (build progress exceeeds some value where generated objects should appear). More...
 
void UpdateAfterSimulation ()
 Update generator after simulation. Add/remove generated blocks. Called from grid. More...
 
void UpdateBeforeSimulation ()
 Update generator before simulation. Add/remove generated blocks. Called from grid. More...
 
void UpdateAfterGridSpawn (MySlimBlock block)
 Updates generated objects with the block after grid has been spawn (grid is not in scene when creating blocks in spawned grid so this method must be called after it is initialized). More...
 
MySlimBlock GetGeneratingBlock (MySlimBlock generatedBlock)
 Returns generating block which generated the given one. More...
 

Detailed Description

Interface for implementation of additional geometry in cube grids (automatic placement of additional geometry).

Definition at line 15 of file IMyBlockAdditionalModelGenerator.cs.

Member Function Documentation

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.BlockAddedToMergedGrid ( MySlimBlock  block)

Block was added but causes merging grids (so it was not catched in events OnBlockAdded/OnBLockRemoved because generator is disabled during merging).

Parameters
block

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.Close ( )

Closes the generator, use for unregistering from other objects.

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.EnableGenerator ( bool  enable)

Enables/disable generator.

Parameters
enable

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.GenerateBlocks ( MySlimBlock  generatingBlock)

Generate blocks for the given generating block (build progress exceeeds some value where generated objects should appear).

Parameters
block

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

MySlimBlock Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.GetGeneratingBlock ( MySlimBlock  generatedBlock)

Returns generating block which generated the given one.

Parameters
generatedBlockGenerated block
Returns
Generating block or null.

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

bool Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.Initialize ( MyCubeGrid  grid,
MyCubeSize  gridSizeEnum 
)

initializes the generator with grid and its size. Note that the grid is not fully initializd yet.

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.UpdateAfterGridSpawn ( MySlimBlock  block)

Updates generated objects with the block after grid has been spawn (grid is not in scene when creating blocks in spawned grid so this method must be called after it is initialized).

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.UpdateAfterSimulation ( )

Update generator after simulation. Add/remove generated blocks. Called from grid.

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.

void Sandbox.Game.Entities.Cube.IMyBlockAdditionalModelGenerator.UpdateBeforeSimulation ( )

Update generator before simulation. Add/remove generated blocks. Called from grid.

Implemented in Sandbox.Game.Entities.Cube.MyAdditionalModelGeneratorBase.


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