Package com.jme3.math

Examples of com.jme3.math.Vector3f.negate()


        if (left) {
            walkDirection.addLocal(camLeft);
        }
        if (right) {
            walkDirection.addLocal(camLeft.negate());
        }
        if (up) {
            walkDirection.addLocal(camDir);
        }
        if (down) {
View Full Code Here


    walkDirection.set(0, 0, 0);
    if (left) {
      walkDirection.addLocal(camLeft);
    }
    if (right) {
      walkDirection.addLocal(camLeft.negate());
    }
    if (up) {
      walkDirection.addLocal(camDir);
    }
    if (down) {
View Full Code Here

        vertices[v_index + 2] = World.toCartesian(azimuth[j + 1], elevation[i + 1], radius);
        vertices[v_index + 3] = World.toCartesian(azimuth[j + 1], elevation[i], radius);

        temp_normal = vertices[v_index].subtract(vertices[v_index + 1]).cross(vertices[v_index + 1].subtract(vertices[v_index + 2])).normalize();
        if (outsideView)
          temp_normal = temp_normal.negate();
        normals[v_index] = normals[v_index + 1] = normals[v_index + 2] = normals[v_index + 3] = temp_normal;

        texCoord[v_index] = new Vector2f(0, 0);
        texCoord[v_index + 1] = new Vector2f(0, 1);
        texCoord[v_index + 2] = new Vector2f(1, 1);
View Full Code Here

      vertices[v_index + 1] = new Vector3f(0, radius, 0);
      vertices[v_index + 2] = World.toCartesian(azimuth[i + 1], elevation[elevation.length - 2], radius);

      temp_normal = vertices[v_index].subtract(vertices[v_index + 1]).cross(vertices[v_index + 1].subtract(vertices[v_index + 2])).normalize();
      if (outsideView)
        temp_normal = temp_normal.negate();
      normals[v_index] = normals[v_index + 1] = normals[v_index + 2] = temp_normal;

      texCoord[v_index] = new Vector2f(0, 0);
      texCoord[v_index] = new Vector2f(0.5f, 1);
      texCoord[v_index] = new Vector2f(1, 0);
View Full Code Here

        if (p.getAvatarControlSystem().isLeft()) {

            walkDirection.addLocal(camLeft);
        }
        if (p.getAvatarControlSystem().isRight()) {
            walkDirection.addLocal(camLeft.negate());
        }
        if (p.getAvatarControlSystem().isUp()) {
            walkDirection.addLocal(camDir);
        }
        if (p.getAvatarControlSystem().isDown()) {
View Full Code Here

                // reading the current texture's pixel
                pixelReader.read(image, dataLayerIndex, pixel, index);
                index += bytesPerPixel;
                pixel.toRGBA(pixelColor);
                if (negateTexture) {
                    pixel.negate();
                }

                this.blendPixel(resultPixel, materialColor, pixelColor, blenderContext);
                newData.put(dataIndex++, (byte) (resultPixel[0] * 255.0f));
                newData.put(dataIndex++, (byte) (resultPixel[1] * 255.0f));
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.