Codota Logo
Vector4.getXf
Code IndexAdd Codota to your IDE (free)

How to use
getXf
method
in
com.ardor3d.math.Vector4

Best Java code snippets using com.ardor3d.math.Vector4.getXf (Showing top 8 results out of 315)

  • Common ways to obtain Vector4
private void myMethod () {
Vector4 v =
  • Codota Iconnew Vector4()
  • Codota IconVector4.fetchTempInstance()
  • Codota IconReadOnlyVector4 src;new Vector4(src)
  • Smart code suggestions by Codota
}
origin: Renanse/Ardor3D

private void setTextureData() {
  // x = left, y = top, z = right, w = bottom
  final FloatBuffer coords = _meshData.getTextureBuffer(0);
  coords.rewind();
  coords.put(0).put(0);
  coords.put(_textureBorderOffsets.getXf()).put(0);
  coords.put(1f - _textureBorderOffsets.getZf()).put(0);
  coords.put(1).put(0);
  coords.put(0).put(_textureBorderOffsets.getWf());
  coords.put(_textureBorderOffsets.getXf()).put(_textureBorderOffsets.getWf());
  coords.put(1f - _textureBorderOffsets.getZf()).put(_textureBorderOffsets.getWf());
  coords.put(1).put(_textureBorderOffsets.getWf());
  coords.put(0).put(1f - _textureBorderOffsets.getYf());
  coords.put(_textureBorderOffsets.getXf()).put(1f - _textureBorderOffsets.getYf());
  coords.put(1f - _textureBorderOffsets.getZf()).put(1f - _textureBorderOffsets.getYf());
  coords.put(1).put(1f - _textureBorderOffsets.getYf());
  coords.put(0).put(1);
  coords.put(_textureBorderOffsets.getXf()).put(1);
  coords.put(1f - _textureBorderOffsets.getZf()).put(1);
  coords.put(1).put(1);
  _meshData.markBufferDirty(MeshData.KEY_TextureCoords0);
}
origin: Renanse/Ardor3D

float ys = y + size.getYf();
x -= _contentPadding.getXf();
ys += _contentPadding.getYf();
xs += _contentPadding.getZf();
  leftB = img.getWidth() * _textureBorderOffsets.getXf() * _borderScale;
  rightB = img.getWidth() * _textureBorderOffsets.getZf() * _borderScale;
  topB = img.getHeight() * _textureBorderOffsets.getYf() * _borderScale;
origin: com.ardor3d/ardor3d-lwjgl

private static void setPosition(final int index, final LightStateRecord record, final float positionX,
    final float positionY, final float positionZ, final float positionW, final LightRecord lr) {
  // From OpenGL Docs:
  // The light position is transformed by the contents of the current top
  // of the ModelView matrix stack when you specify the light position
  // with a call to glLightfv(GL_LIGHT_POSITION,...). If you later change
  // the ModelView matrix, such as when the view changes for the next
  // frame, the light position isn't automatically retransformed by the
  // new contents of the ModelView matrix. If you want to update the
  // light's position, you must again specify the light position with a
  // call to glLightfv(GL_LIGHT_POSITION,...).
  // XXX: This is a hack until we get a better lighting model up
  final ReadOnlyMatrix4 modelViewMatrix = Camera.getCurrentCamera().getModelViewMatrix();
  if (!record.isValid() || lr.position.getXf() != positionX || lr.position.getYf() != positionY
      || lr.position.getZf() != positionZ || lr.position.getWf() != positionW
      || !lr.modelViewMatrix.equals(modelViewMatrix)) {
    record.lightBuffer.clear();
    record.lightBuffer.put(positionX);
    record.lightBuffer.put(positionY);
    record.lightBuffer.put(positionZ);
    record.lightBuffer.put(positionW);
    record.lightBuffer.flip();
    GL11.glLight(GL11.GL_LIGHT0 + index, GL11.GL_POSITION, record.lightBuffer);
    lr.position.set(positionX, positionY, positionZ, positionW);
    if (!Camera.getCurrentCamera().isFrameDirty()) {
      lr.modelViewMatrix.set(modelViewMatrix);
    }
  }
}
origin: com.ardor3d/ardor3d-jogl

private static void setPosition(final int index, final LightStateRecord record, final float positionX,
    final float positionY, final float positionZ, final float positionW, final LightRecord lr) {
  final GL gl = GLContext.getCurrentGL();
  // From OpenGL Docs:
  // The light position is transformed by the contents of the current top
  // of the ModelView matrix stack when you specify the light position
  // with a call to glLightfv(GL_LIGHT_POSITION,...). If you later change
  // the ModelView matrix, such as when the view changes for the next
  // frame, the light position isn't automatically retransformed by the
  // new contents of the ModelView matrix. If you want to update the
  // light's position, you must again specify the light position with a
  // call to glLightfv(GL_LIGHT_POSITION,...).
  // XXX: This is a hack until we get a better lighting model up
  final ReadOnlyMatrix4 modelViewMatrix = Camera.getCurrentCamera().getModelViewMatrix();
  if (!record.isValid() || lr.position.getXf() != positionX || lr.position.getYf() != positionY
      || lr.position.getZf() != positionZ || lr.position.getWf() != positionW
      || !lr.modelViewMatrix.equals(modelViewMatrix)) {
    record.lightBuffer.clear();
    record.lightBuffer.put(positionX);
    record.lightBuffer.put(positionY);
    record.lightBuffer.put(positionZ);
    record.lightBuffer.put(positionW);
    record.lightBuffer.flip();
    gl.getGL2().glLightfv(GLLightingFunc.GL_LIGHT0 + index, GLLightingFunc.GL_POSITION, record.lightBuffer);
    lr.position.set(positionX, positionY, positionZ, positionW);
    if (!Camera.getCurrentCamera().isFrameDirty()) {
      lr.modelViewMatrix.set(modelViewMatrix);
    }
  }
}
origin: Renanse/Ardor3D

if (value instanceof Vector4) {
  final Vector4 vec = (Vector4) value;
  return stack.mallocFloat(4).put(vec.getXf()).put(vec.getYf()).put(vec.getZf()).put(vec.getWf())
      .flip();
origin: com.ardor3d/ardor3d-effects

pointFinal.setY(heightGenerator.getHeight(pointFinal.getX(), pointFinal.getZ(), time));
vertBufArray[index++] = pointFinal.getXf();
vertBufArray[index++] = pointFinal.getYf();
vertBufArray[index++] = pointFinal.getZf();
origin: Renanse/Ardor3D

pointFinal.setY(heightGenerator.getHeight(pointFinal.getX(), pointFinal.getZ(), time));
vertBufArray[index++] = pointFinal.getXf();
vertBufArray[index++] = pointFinal.getYf();
vertBufArray[index++] = pointFinal.getZf();
origin: Renanse/Ardor3D

assertTrue(vec1.getXf() == (float) Math.PI);
assertTrue(vec1.getYf() == (float) Math.PI);
assertTrue(vec1.getZf() == (float) Math.PI);
com.ardor3d.mathVector4getXf

Popular methods of Vector4

  • <init>
    Constructs a new vector set to the (x, y, z, w) values of the given source vector.
  • set
    Sets the value of this vector to the (x, y, z, w) values of the provided source vector.
  • getW
  • getX
  • getY
  • getZ
  • addLocal
    Increments the values of this vector with the x, y, z and w values of the given vector.
  • getYf
  • getZf
  • multiplyLocal
    Internally modifies the values of this vector by multiplying them each by the given scale values.
  • setW
    Sets the fourth component of this vector to the given double value.
  • setX
    Sets the first component of this vector to the given double value.
  • setW,
  • setX,
  • setY,
  • setZ,
  • dot,
  • fetchTempInstance,
  • getWf,
  • multiply,
  • normalizeLocal

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JComboBox (javax.swing)
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now