ObjectData is a base class encapsulating mandatory parameters for any object data and providing a solid functionality for a tree data structure.
Members
Name |
Description |
Parent of an ObjectData |
|
Children of an ObjectData |
|
Matrix transform of an ObjectData |
|
Id of this object |
Methods
Name |
Description |
get id |
|
get type of ObjectData instance |
|
get or set matrix transform for object |
|
get number of children |
|
get parent |
|
add a new child to this object children |
|
get all children |
|
get all children by specified type |
|
get the child with specified index |
|
get the child whit specified id |
|
get visual element create from an ObjectData |
Members
Specifies parent of an ObjectData or null if this ObjectData has no parent
private ObjectData m_parent = null; |
List of ObjectData represent the children of current object
protected List<ObjectData> m_children = new List<ObjectData>(); |
Specifies matrix used for visual transformation
protected Matrix m_transform = Matrix.Identity; |
Specifies a unique ID for every ObjectData
protected Int32 ID = 0; |
Methods
getID - returns the object's ID
|
getObjectType - returns object type
public Type getObjectType { get; } |
Transform - gets or sets matrix transform
public Matrix Transform { get; set; } |
ChildrenCount - gets number of children of this ObjectData
public Int32 ChidrenCount { get; } |
Parent - gets this ObjectData's parent
public ObjectData Parent { get; set; } |
AddChildren - adds a new chilld to this ObjectData's chidren
public virtual void AddChildren(ObjectData child); |
This is a virtual method. Other classes derived from ObjectData could potentially override it.
GetChildren - returns all the children of this ObjectData
public List<ObjectData> GetChildren(); |
GetChildrenByType - returns all children by specific type
public List<ObjectData> GetChildrenByType(); |
GetChildByIdx - return the child with specified index
public ObjectData GetChildByIdx(Int32 childIdx); |
Returns an ObjectData object if the child was found or null if there is no child at that index
GetChildById - returns the child with the specified ID
public ObjectData GetChildById(Int32 childId); |
Returns an ObjectData object if the child was found or null if there is no child with that ID
GetVisualElement - get visual elements created from an ObjectData
public abstract List<UIElement> GetVisualElement(PluginsBridge pluginsBridge); |
Parameters
pluginsBridge
PluginsBridge object which provides communication with plugins
Return Value
A list of visual elements