Scripting Interface |
The Model3d JavaScript class. More...
Public Slots | |
Matrix4x4 | computeMatrix (String subnodeName) |
Returns a Matrix4x4 representing the transformations done up to and including the subnode in the parameter. More... | |
QScriptValue | root () |
Returns the root(s) of the 3d Model's tree structure. More... | |
QScriptValue | children (String subnodeName) |
Returns an array of all of a subnode's children. More... | |
String | parent (String subnodeName) |
Returns the name of a subnode's parent subnode. More... | |
QScriptValue | graph () |
Returns an array of objects representing the tree structure of the 3d Model. More... | |
Public Member Functions | |
Model3d (String nodeName, double frame) | |
Creates a new Model3d object. More... | |
The Model3d JavaScript class.
A Model3d is used to get information about a 3d Model.
A 3d Model is represented in Harmony by a tree structure of Subnodes that each contain an element of the model. This tree can be seen in the 3D Graph View. A Model3d object can be used to retrieve information about this tree structure and about each of the Subnodes within the tree.
Model3d::Model3d | ( | String | nodeName, |
double | frame | ||
) |
Creates a new Model3d object.
nodeName | : The name of the node corresponding to the 3d Model. This can also be a SubnodeTransformation node. |
frame | : The frame number. |
|
slot |
Returns an array of all of a subnode's children.
A subnodes children are the subnodes one level below it in the tree structure.
subnodeName | : The subnode to get the children of. |
|
slot |
|
slot |
Returns an array of objects representing the tree structure of the 3d Model.
The array is filled with objects of the form { Name : "string", Children : [array of objects] } Where the Name is the name of the subnode, and Children is an array of objects of the same form as it (with a name and array of children). The returned array has 1 element for each of the root nodes.
For example, in the case of a very simple 3d Model, with one root subnode named "Root", that has 2 children, "Child1" and "Child2", this will return an array like this:
|
slot |
Returns the name of a subnode's parent subnode.
A subnode's parent is the subnode one level above it in the tree structure.
subnodeName | : The subnode to get the parent of. |
|
slot |
Returns the root(s) of the 3d Model's tree structure.