MinieExamples/src/main/java/jme3utilities/minie/test/TestDac.java
/**
     * Load the Sinbad model with 2 attached swords.
     */
Load the Sinbad model with 2 attached swords.
Load the Sinbad model with 2 attached swords .
private void loadSinbadWithSwords() {
        cgModel = (Node) assetManager.loadModel("Models/Sinbad/Sinbad.j3o");
        Node sword = (Node) assetManager.loadModel("Models/Sinbad/Sword.j3o");
        List<Spatial> list = MySpatial.listSpatials(sword);
        for (Spatial spatial : list) {
            spatial.setShadowMode(RenderQueue.ShadowMode.Cast);
        }
        LinkConfig swordConfig = new LinkConfig(5f, MassHeuristic.Density,
                ShapeHeuristic.VertexHull, Vector3f.UNIT_XYZ,
                CenterHeuristic.AABB);
        dac = new SinbadControl();
        dac.attach("Handle.L", swordConfig, sword);
        dac.attach("Handle.R", swordConfig, sword);
        animationName = "RunTop";
        leftClavicleName = "Clavicle.L";
        leftUlnaName = "Ulna.L";
        rightClavicleName = "Clavicle.R";
        upperBodyName = "Waist";
    }
private void loadSinbadWithSwords ( ) { cgModel = ( Node ) assetManager . loadModel ( "Models/Sinbad/Sinbad.j3o" ) ; Node sword = ( Node ) assetManager . loadModel ( "Models/Sinbad/Sword.j3o" ) ; List < Spatial > list = MySpatial . listSpatials ( sword ) ; for ( Spatial spatial : list ) { spatial . setShadowMode ( RenderQueue . ShadowMode . Cast ) ; } LinkConfig swordConfig = new LinkConfig ( 5f , MassHeuristic . Density , ShapeHeuristic . VertexHull , Vector3f . UNIT_XYZ , CenterHeuristic . AABB ) ; dac = new SinbadControl ( ) ; dac . attach ( "Handle.L" , swordConfig , sword ) ; dac . attach ( "Handle.R" , swordConfig , sword ) ; animationName = "RunTop" ; leftClavicleName = "Clavicle.L" ; leftUlnaName = "Ulna.L" ; rightClavicleName = "Clavicle.R" ; upperBodyName = "Waist" ; }
Load the Sinbad model with 2 attached swords.
Load the Sinbad model with 2 attached swords .