MinieExamples/src/main/java/jme3utilities/minie/test/BuoyDemo.java
/**
     * Add a large Quad to represent the surface of the water.
     */
Add a large Quad to represent the surface of the water.
Add a large Quad to represent the surface of the water .
private void addSurface() {
        float diameter = 2000f;
        Mesh mesh = new Quad(diameter, diameter);
        mesh.scaleTextureCoordinates(new Vector2f(80f, 80f));
        Geometry geometry = new Geometry("water surface", mesh);
        reflectorsNode.attachChild(geometry);
        geometry.move(-diameter / 2, 0f, diameter / 2);
        Quaternion rot = new Quaternion();
        rot.fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X);
        geometry.setLocalRotation(rot);
        Material material = processor.getMaterial();
        geometry.setMaterial(material);
    }
private void addSurface ( ) { float diameter = 2000f ; Mesh mesh = new Quad ( diameter , diameter ) ; mesh . scaleTextureCoordinates ( new Vector2f ( 80f , 80f ) ) ; Geometry geometry = new Geometry ( "water surface" , mesh ) ; reflectorsNode . attachChild ( geometry ) ; geometry . move ( - diameter / 2 , 0f , diameter / 2 ) ; Quaternion rot = new Quaternion ( ) ; rot . fromAngleAxis ( - FastMath . HALF_PI , Vector3f . UNIT_X ) ; geometry . setLocalRotation ( rot ) ; Material material = processor . getMaterial ( ) ; geometry . setMaterial ( material ) ; }
Add a large Quad to represent the surface of the water.
Add a large Quad to represent the surface of the water .