Package com.jme.math

Examples of com.jme.math.Vector2f


    public void relayout(HUDComponent component) {
        int hudWidth = hud.getWidth();
        int hudHeight = hud.getHeight();

        HUDComponent2D component2D = (HUDComponent2D) component;
        Vector2f positionPercent = positionMap.get(component2D);
        float compX = hud.getX() + positionPercent.x * hudWidth;
        float compY = hud.getY() + positionPercent.y * hudHeight;

        HUDView2D view = (HUDView2D) hudViewMap.get(component2D);
        float viewWidth = view.getDisplayerLocalWidth();
View Full Code Here


            frameWindow.addView(frameView);

            // set view properties
            frameView.setPixelScaleOrtho(WonderlandHUD.HUD_SCALE, false);
            frameView.setSizeApp(new Dimension((int) (frameWindow.getWidth()), frameWindow.getHeight()), false);
            frameView.setLocationOrtho(new Vector2f(0.0f, (float) (WonderlandHUD.HUD_SCALE.y * getWindow().getHeight() / 2 + WonderlandHUD.HUD_SCALE.y * frameImpl.getPreferredSize().height / 2)), false);
            frameView.setOrtho(true, false);

            // register listeners for events on the frame
            frameImpl.addMouseMotionListener(frame);
            frame.addMouseMotionListener(this);
View Full Code Here

     * Specify a new pixelScale.
     *
     * @param pixelScale The new pixel scale.
     */
    public void setPixelScale(Vector2f pixelScale) {
        this.pixelScale = new Vector2f(pixelScale);
    }
View Full Code Here

    /**
     * Return the pixel scale.
     */
    public Vector2f getPixelScale() {
        return new Vector2f(pixelScale);
    }
View Full Code Here

        final float textureYPos = (float) MathUtils.interpolateClamp( y, 1, mySizeY_vertices - 2, 1, 0 );

        final Vector3f position = new Vector3f( xPos, yPos, zPos );
        final Vector3f normal = new Vector3f( 0, 0, 1 );
        final ColorRGBA color = new ColorRGBA( 1.0f, 1.0f, 1.0f, 1.0f );
        final Vector2f textureCoordinate = new Vector2f( textureXPos, textureYPos );

        BufferUtils.setInBuffer( position, myVertexes, index );
        BufferUtils.setInBuffer( normal, myNormals, index );
        BufferUtils.setInBuffer( color, myColors, index );
        BufferUtils.setInBuffer( textureCoordinate, myTextureCoordinates, index );
View Full Code Here

                                                                              1,
                                                                              mySizeY_vertices - 2,
                                                                              boundingRectangle.getY2(),
                                                                              boundingRectangle.getY1() );

                final Vector2f textureCoordinate = new Vector2f( textureXPos, textureYPos );

                BufferUtils.setInBuffer( textureCoordinate, myTextureCoordinates, index );
            }
        }
View Full Code Here

TOP

Related Classes of com.jme.math.Vector2f

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.