bindSkeleton method
dynamic
bindSkeleton(
- dynamic skeletons,
- dynamic geometryMap,
- dynamic modelMap
Implementation
bindSkeleton( skeletons, geometryMap, modelMap ) {
var bindMatrices = this.parsePoseNodes();
for ( var ID in skeletons.keys ) {
var skeleton = skeletons[ ID ];
var parents = connections[parseInt( skeleton["ID"] )]["parents"];
parents.forEach( ( parent ) {
if ( geometryMap.containsKey( parent["ID"] ) ) {
var geoID = parent["ID"];
var geoRelationships = connections[ geoID ];
geoRelationships["parents"].forEach( ( geoConnParent ) {
if ( modelMap.containsKey( geoConnParent["ID"] ) ) {
var model = modelMap[ geoConnParent["ID"] ];
model.bind( new Skeleton( List<Bone>.from(skeleton["bones"]) ), bindMatrices[ geoConnParent["ID"] ] );
}
} );
}
} );
}
}