MinieLibrary/src/main/java/com/jme3/bullet/animation/DacLinks.java
/**
     * Create a jointed AttachmentLink for the named bone and add it to the
     * attachmentLinks map.
     *
     * @param boneName the name of the attachment bone to be linked (not null)
     * @param skeletonControl (not null)
     * @param managerMap a map from bone indices to managing link names (not
     * null, unaffected)
     * @return an attachment link with a joint, added to the boneLinks map
     */
Create a jointed AttachmentLink for the named bone and add it to the
attachmentLinks map.

@param boneName the name of the attachment bone to be linked (not null)
@param skeletonControl (not null)
@param managerMap a map from bone indices to managing link names (not
null, unaffected)
@return an attachment link with a joint, added to the boneLinks map
Create a jointed AttachmentLink for the named bone and add it to the attachmentLinks map . @param boneName the name of the attachment bone to be linked ( not null ) @param skeletonControl ( not null ) @param managerMap a map from bone indices to managing link names ( not null unaffected ) @return an attachment link with a joint added to the boneLinks map
private void createAttachmentLink(String boneName,
            SkeletonControl skeletonControl, String[] managerMap) {
        assert boneName != null;
        assert skeletonControl != null;
        assert managerMap != null;
        /*
         * Collect the location of every mesh vertex in the attached model.
         */
        Spatial attachModel = getAttachmentModel(boneName);
        attachModel = Heart.deepCopy(attachModel);
        VectorSet vertexLocations
                = MyMesh.listVertexLocations(attachModel, null);
        /*
         * Attach the model to the attachments node.
         */
        Node node = skeletonControl.getAttachmentsNode(boneName);
        node.attachChild(attachModel);
        /*
         * Determine which link will manage the new AttachmentLink.
         */
        Bone bone = skeleton.getBone(boneName);
        int boneIndex = skeleton.getBoneIndex(bone);
        String managerName = managerMap[boneIndex];
        PhysicsLink manager;
        if (managerName.equals(torsoName)) {
            manager = torsoLink;
        } else {
            manager = boneLinks.get(managerName);
        }
        /*
         * Locate the attached model's center of mass.
         */
        LinkConfig linkConfig = attachmentConfig(boneName);
        CenterHeuristic centerHeuristic = linkConfig.centerHeuristic();
        assert centerHeuristic != CenterHeuristic.Joint;
        Vector3f center = centerHeuristic.center(vertexLocations, null);
        /*
         * Create the CollisionShape.
         */
        CollisionShape shape = linkConfig.createShape(transformIdentity,
                center, vertexLocations);
        AttachmentLink link = new AttachmentLink(this, bone, manager,
                attachModel, shape, linkConfig, center);
        attachmentLinks.put(boneName, link);
    }
private void createAttachmentLink ( String boneName , SkeletonControl skeletonControl , String [ ] managerMap ) { assert boneName != null ; assert skeletonControl != null ; assert managerMap != null ; /*
         * Collect the location of every mesh vertex in the attached model.
         */ Spatial attachModel = getAttachmentModel ( boneName ) ; attachModel = Heart . deepCopy ( attachModel ) ; VectorSet vertexLocations = MyMesh . listVertexLocations ( attachModel , null ) ; /*
         * Attach the model to the attachments node.
         */ Node node = skeletonControl . getAttachmentsNode ( boneName ) ; node . attachChild ( attachModel ) ; /*
         * Determine which link will manage the new AttachmentLink.
         */ Bone bone = skeleton . getBone ( boneName ) ; int boneIndex = skeleton . getBoneIndex ( bone ) ; String managerName = managerMap [ boneIndex ] ; PhysicsLink manager ; if ( managerName . equals ( torsoName ) ) { manager = torsoLink ; } else { manager = boneLinks . get ( managerName ) ; } /*
         * Locate the attached model's center of mass.
         */ LinkConfig linkConfig = attachmentConfig ( boneName ) ; CenterHeuristic centerHeuristic = linkConfig . centerHeuristic ( ) ; assert centerHeuristic != CenterHeuristic . Joint ; Vector3f center = centerHeuristic . center ( vertexLocations , null ) ; /*
         * Create the CollisionShape.
         */ CollisionShape shape = linkConfig . createShape ( transformIdentity , center , vertexLocations ) ; AttachmentLink link = new AttachmentLink ( this , bone , manager , attachModel , shape , linkConfig , center ) ; attachmentLinks . put ( boneName , link ) ; }
Create a jointed AttachmentLink for the named bone and add it to the
 attachmentLinks map.
Create a jointed AttachmentLink for the named bone and add it to the attachmentLinks map .