ObjectData

Top Previous Topic Next Topic  Print this topic

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

m_parent

Parent of an ObjectData

m_children

Children of an ObjectData

m_transform

Matrix transform of an ObjectData

ID

Id of this object

 

Methods

 

Name

Description

getID

get id

getObjectType

get type of ObjectData instance

Transform

get or set matrix transform for object

ChildrenCount

get number of children

Parent

get parent

AddChildren

add a new child to this object children

GetChildren

get all children

GetChildrenByType

get all children by specified type

GetChildByIdx

get the child with specified index

GetChildById

get the child whit specified id

GetVisualElement

get visual element create from an ObjectData

 

Members

 

m_parent

 

Specifies parent of an ObjectData or null if this ObjectData has no parent

 

private ObjectData m_parent = null;

 

 

m_children

 

List of ObjectData represent the children of current object

 

protected List<ObjectData> m_children = new List<ObjectData>();

 

 

m_transform

 

Specifies matrix used for visual transformation

 

protected Matrix m_transform = Matrix.Identity;

 

 

ID

 

Specifies a unique ID for every ObjectData

 

protected Int32 ID = 0;

 

Methods

 

 

getID - returns the object's ID

 

 

public Int32 getID

{

  get;

}

 

 

 

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