Space Engineers
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Sandbox.Game.EntityComponents.MyFractureComponentBase Class Referenceabstract

Fracture component adds fractures to entities. The component replaces renderer so the entity is responsible to restore it to original when this component is removed and original state is needed (repaired blocks). More...

Inheritance diagram for Sandbox.Game.EntityComponents.MyFractureComponentBase:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Game.EntityComponents.MyFractureComponentCubeBlock

Classes

struct  Info
 

Public Member Functions

override bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
bool RemoveChildShapes (List< string > shapeNames)
 Removes child shapes with given names. More...
 
virtual bool RemoveChildShapes (string[] shapeNames)
 
virtual void SetShape (HkdBreakableShape shape, bool compound)
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 
virtual MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
virtual void Deserialize (MyObjectBuilder_ComponentBase builder)
 
virtual void Init (MyComponentDefinitionBase definition)
 

Public Attributes

HkdBreakableShape Shape
 

Protected Member Functions

void GetCurrentFracturedShapeList (List< MyObjectBuilder_FractureComponentBase.FracturedShape > shapeList, string[] excludeShapeNames=null)
 
abstract void RecreateShape (List< MyObjectBuilder_FractureComponentBase.FracturedShape > shapeList)
 
void SerializeInternal (MyObjectBuilder_FractureComponentBase ob)
 

Protected Attributes

readonly List< HkdShapeInstanceInfo > m_tmpChildren = new List<HkdShapeInstanceInfo>()
 
readonly List< HkdShapeInstanceInfo > m_tmpShapeInfos = new List<HkdShapeInstanceInfo>()
 
readonly List< MyObjectBuilder_FractureComponentBase.FracturedShapem_tmpShapeList = new List<MyObjectBuilder_FractureComponentBase.FracturedShape>()
 

Properties

abstract MyPhysicalModelDefinition PhysicalModelDefinition [get]
 
override string ComponentTypeDebugString [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Additional Inherited Members

- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Fracture component adds fractures to entities. The component replaces renderer so the entity is responsible to restore it to original when this component is removed and original state is needed (repaired blocks).

Definition at line 26 of file MyFractureComponentBase.cs.

Member Function Documentation

void Sandbox.Game.EntityComponents.MyFractureComponentBase.GetCurrentFracturedShapeList ( List< MyObjectBuilder_FractureComponentBase.FracturedShape shapeList,
string[]  excludeShapeNames = null 
)
inlineprotected

Definition at line 105 of file MyFractureComponentBase.cs.

override bool Sandbox.Game.EntityComponents.MyFractureComponentBase.IsSerialized ( )
inlinevirtual

Tells the component container serializer whether this component should be saved

Returns

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 44 of file MyFractureComponentBase.cs.

override void Sandbox.Game.EntityComponents.MyFractureComponentBase.OnAddedToContainer ( )
inlinevirtual

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyComponentBase.

Reimplemented in Sandbox.Game.EntityComponents.MyFractureComponentCubeBlock.

Definition at line 54 of file MyFractureComponentBase.cs.

override void Sandbox.Game.EntityComponents.MyFractureComponentBase.OnBeforeRemovedFromContainer ( )
inlinevirtual

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyComponentBase.

Reimplemented in Sandbox.Game.EntityComponents.MyFractureComponentCubeBlock.

Definition at line 73 of file MyFractureComponentBase.cs.

abstract void Sandbox.Game.EntityComponents.MyFractureComponentBase.RecreateShape ( List< MyObjectBuilder_FractureComponentBase.FracturedShape shapeList)
protectedpure virtual
bool Sandbox.Game.EntityComponents.MyFractureComponentBase.RemoveChildShapes ( List< string >  shapeNames)
inline

Removes child shapes with given names.

Returns
true if the entity is to be removed

Definition at line 87 of file MyFractureComponentBase.cs.

virtual bool Sandbox.Game.EntityComponents.MyFractureComponentBase.RemoveChildShapes ( string[]  shapeNames)
inlinevirtual
void Sandbox.Game.EntityComponents.MyFractureComponentBase.SerializeInternal ( MyObjectBuilder_FractureComponentBase  ob)
inlineprotected

Definition at line 167 of file MyFractureComponentBase.cs.

virtual void Sandbox.Game.EntityComponents.MyFractureComponentBase.SetShape ( HkdBreakableShape  shape,
bool  compound 
)
inlinevirtual

Member Data Documentation

readonly List<HkdShapeInstanceInfo> Sandbox.Game.EntityComponents.MyFractureComponentBase.m_tmpChildren = new List<HkdShapeInstanceInfo>()
protected

Definition at line 28 of file MyFractureComponentBase.cs.

readonly List<HkdShapeInstanceInfo> Sandbox.Game.EntityComponents.MyFractureComponentBase.m_tmpShapeInfos = new List<HkdShapeInstanceInfo>()
protected

Definition at line 29 of file MyFractureComponentBase.cs.

readonly List<MyObjectBuilder_FractureComponentBase.FracturedShape> Sandbox.Game.EntityComponents.MyFractureComponentBase.m_tmpShapeList = new List<MyObjectBuilder_FractureComponentBase.FracturedShape>()
protected

Definition at line 30 of file MyFractureComponentBase.cs.

HkdBreakableShape Sandbox.Game.EntityComponents.MyFractureComponentBase.Shape

Definition at line 32 of file MyFractureComponentBase.cs.

Property Documentation

override string Sandbox.Game.EntityComponents.MyFractureComponentBase.ComponentTypeDebugString
get

Definition at line 50 of file MyFractureComponentBase.cs.

abstract MyPhysicalModelDefinition Sandbox.Game.EntityComponents.MyFractureComponentBase.PhysicalModelDefinition
get

Definition at line 34 of file MyFractureComponentBase.cs.


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