Space Engineers
Public Member Functions | Public Attributes | Protected Attributes | Properties | Events | List of all members
VRage.Game.Components.MyHierarchyComponentBase Class Reference
Inheritance diagram for VRage.Game.Components.MyHierarchyComponentBase:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase VRage.Game.Components.MyHierarchyComponent< TYPE >

Public Member Functions

MyHierarchyComponentBase GetTopMostParent (Type type=null)
 Return top most parent of this entity More...
 
void AddChild (IMyEntity child, bool preserveWorldPos=false, bool insertIntoSceneIfNeeded=true)
 Adds the child. More...
 
void AddChildWithMatrix (IMyEntity child, ref Matrix childLocalMatrix, bool insertIntoSceneIfNeeded=true)
 
void RemoveChild (IMyEntity child, bool preserveWorldPos=false)
 Adds the child. More...
 
void GetChildrenRecursive (HashSet< IMyEntity > result)
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
override bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
override 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...
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
override void Deserialize (MyObjectBuilder_ComponentBase builder)
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes 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 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 void Init (MyComponentDefinitionBase definition)
 

Public Attributes

long ChildId
 

Protected Attributes

List< MyHierarchyComponentBasem_children = new List<MyHierarchyComponentBase>()
 
readonly List< MyEntitym_deserializedEntities = new List<MyEntity>()
 

Properties

List< MyHierarchyComponentBaseChildren [get]
 Gets the childs collection. More...
 
MyHierarchyComponentBase Parent [get, set]
 
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...
 

Events

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

Detailed Description

Definition at line 13 of file MyHierarchyComponentBase.cs.

Member Function Documentation

void VRage.Game.Components.MyHierarchyComponentBase.AddChild ( IMyEntity  child,
bool  preserveWorldPos = false,
bool  insertIntoSceneIfNeeded = true 
)
inline

Adds the child.

Parameters
childThe child.
preserveWorldPosif set to true [preserve absolute position].

Definition at line 100 of file MyHierarchyComponentBase.cs.

void VRage.Game.Components.MyHierarchyComponentBase.AddChildWithMatrix ( IMyEntity  child,
ref Matrix  childLocalMatrix,
bool  insertIntoSceneIfNeeded = true 
)
inline

Definition at line 137 of file MyHierarchyComponentBase.cs.

override void VRage.Game.Components.MyHierarchyComponentBase.Deserialize ( MyObjectBuilder_ComponentBase  builder)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 243 of file MyHierarchyComponentBase.cs.

void VRage.Game.Components.MyHierarchyComponentBase.GetChildrenRecursive ( HashSet< IMyEntity result)
inline

Definition at line 180 of file MyHierarchyComponentBase.cs.

MyHierarchyComponentBase VRage.Game.Components.MyHierarchyComponentBase.GetTopMostParent ( Type  type = null)
inline

Return top most parent of this entity

Returns

Definition at line 24 of file MyHierarchyComponentBase.cs.

override bool VRage.Game.Components.MyHierarchyComponentBase.IsSerialized ( )
inlinevirtual

Tells the component container serializer whether this component should be saved

Returns

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 209 of file MyHierarchyComponentBase.cs.

override void VRage.Game.Components.MyHierarchyComponentBase.OnAddedToScene ( )
inlinevirtual

CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already!

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 214 of file MyHierarchyComponentBase.cs.

override void VRage.Game.Components.MyHierarchyComponentBase.OnBeforeRemovedFromContainer ( )
inlinevirtual

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyEntityComponentBase.

Definition at line 195 of file MyHierarchyComponentBase.cs.

void VRage.Game.Components.MyHierarchyComponentBase.RemoveChild ( IMyEntity  child,
bool  preserveWorldPos = false 
)
inline

Adds the child.

Parameters
childThe child.
preserveWorldPosif set to true [preserve absolute position].

Definition at line 155 of file MyHierarchyComponentBase.cs.

override MyObjectBuilder_ComponentBase VRage.Game.Components.MyHierarchyComponentBase.Serialize ( bool  copy = false)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 227 of file MyHierarchyComponentBase.cs.

Member Data Documentation

long VRage.Game.Components.MyHierarchyComponentBase.ChildId

Identifier for the parent hierarchy.

This is should be reliably unique within a hierarchy level but only usable by the parent.

Definition at line 41 of file MyHierarchyComponentBase.cs.

List<MyHierarchyComponentBase> VRage.Game.Components.MyHierarchyComponentBase.m_children = new List<MyHierarchyComponentBase>()
protected

Definition at line 15 of file MyHierarchyComponentBase.cs.

readonly List<MyEntity> VRage.Game.Components.MyHierarchyComponentBase.m_deserializedEntities = new List<MyEntity>()
protected

Definition at line 16 of file MyHierarchyComponentBase.cs.

Property Documentation

List<MyHierarchyComponentBase> VRage.Game.Components.MyHierarchyComponentBase.Children
get

Gets the childs collection.

Definition at line 47 of file MyHierarchyComponentBase.cs.

override string VRage.Game.Components.MyHierarchyComponentBase.ComponentTypeDebugString
get

Definition at line 191 of file MyHierarchyComponentBase.cs.

MyHierarchyComponentBase VRage.Game.Components.MyHierarchyComponentBase.Parent
getset

Definition at line 57 of file MyHierarchyComponentBase.cs.

Event Documentation

Action<IMyEntity> VRage.Game.Components.MyHierarchyComponentBase.OnChildRemoved

Definition at line 18 of file MyHierarchyComponentBase.cs.


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