animation and/or skinning. A model is not intended to be rendered directly. Instead you should create one or more ModelInstances of a Model, which are used for the actual rendering. The structure of a ModelInstance is roughly the same as a Model.
Nodes
nodes array or using one of the getNode(...) methods. Each node has a unique id within a model.
Each Node can belong to only one Model or one ModelInstance at a time and is never shared amongst multiple Models or ModelInstances. Modifications to a Node of a ModelInstance will therefore only affect that particular ModelInstance. Modifications to a Node of a Model will affect that Model and all ModelInstances created from it after the modifications, but previously created ModelInstances from that Model remain unchanged.
Node transformation
translation and scale vector and a rotation quaternion. When these values are changed the transformation (including all children) must be updated to reflect the changes. This can be done using the model.calculateTransforms(); method (also available for the ModelInstance class).
localTransform and globalTransform matrices. The localTransform matrix represents the transformation of the node relative to its parent node. The globalTransform matrix represents the transformation of the node relative to the model or modelinstance. In other words: the globalTransform of a Node is the globalTransform of its parent node multiplied by the node’s localTransform.
isAnimated value is set to true. This will cause the translation, scale and rotation values not to be used when recalculating the transforms.
NodePart
A node can optionally have a visual representation. Therefor the Node class contains an array of NodeParts. Each NodePart consist of a MeshPart and Material, specifying how (the material) and where (the node transformation) the shape (the MeshPart) should be rendered. Optionally it also contains information about mesh deformation (used for skinning) and UV mapping (used for multiple texture coordinates).
Managing resources
dispose(); method, causing all backing resources to be disposed and therefor invalidating all depending objects (like ModelInstance).
getManagedDisposables() method. To programmatically make a model responsible for a resource, use the manageDisposable(Disposable) method. For example, when changing the texture of a model and you want the texture to be disposed when the model is disposed.
Because a model is responsible for its resources, it is recommended to keep them separated. For example, it is not advised to share resources amongst multiple models. Instead, in most cases it is possible to combine models completely (prior to loading or building them) or to share resources amongst ModelInstances instead of Models.
