MinieExamples/src/main/java/jme3utilities/minie/test/TrackDemo.java
/**
     * Load the Sinbad model with an attached sword.
     */
Load the Sinbad model with an attached sword.
Load the Sinbad model with an attached sword .
private void loadSinbadWith1Sword() {
        cgModel = (Node) assetManager.loadModel("Models/Sinbad/Sinbad.j3o");
        cgModel.rotate(0f, -1.6f, 0f);
        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.R", swordConfig, sword);
        tipSpec = "4/Sword-geom-3/Handle.R"; 
        gridBottomLeft = new Vector3f(-1f, 0.5f, -1f);
        gridBottomRight = new Vector3f(-1f, 0.5f, 1f);
    }
private void loadSinbadWith1Sword ( ) { cgModel = ( Node ) assetManager . loadModel ( "Models/Sinbad/Sinbad.j3o" ) ; cgModel . rotate ( 0f , - 1.6f , 0f ) ; 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.R" , swordConfig , sword ) ; tipSpec = "4/Sword-geom-3/Handle.R" ; gridBottomLeft = new Vector3f ( - 1f , 0.5f , - 1f ) ; gridBottomRight = new Vector3f ( - 1f , 0.5f , 1f ) ; }
Load the Sinbad model with an attached sword.
Load the Sinbad model with an attached sword .
// tip of sword blade