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

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

Best Java code snippets using com.ardor3d.math.Vector4.releaseTempInstance (Showing top 20 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: com.ardor3d/ardor3d-core

/**
 * Checks to see if the given Vector3 is equals to the data stored in the buffer at the given data index.
 * 
 * @param check
 *            the vector to check against - null will return false.
 * @param buf
 *            the buffer to compare data with
 * @param index
 *            the position (in terms of vectors, not floats) of the vector in the buffer to check against
 * @return
 */
public static boolean equals(final ReadOnlyVector4 check, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  final boolean equals = temp.equals(check);
  Vector4.releaseTempInstance(temp);
  return equals;
}
origin: Renanse/Ardor3D

/**
 * Checks to see if the given Vector3 is equals to the data stored in the buffer at the given data index.
 * 
 * @param check
 *            the vector to check against - null will return false.
 * @param buf
 *            the buffer to compare data with
 * @param index
 *            the position (in terms of vectors, not floats) of the vector in the buffer to check against
 * @return
 */
public static boolean equals(final ReadOnlyVector4 check, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  final boolean equals = temp.equals(check);
  Vector4.releaseTempInstance(temp);
  return equals;
}
origin: com.ardor3d/ardor3d-core

/**
 * Multiply and store a Vector3 in-buffer.
 * 
 * @param toMult
 *            the vector to multiply against
 * @param buf
 *            the buffer to find the Vector3 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to multiply
 */
public static void multInBuffer(final ReadOnlyVector4 toMult, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.multiplyLocal(toMult);
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: com.ardor3d/ardor3d-core

/**
 * Normalize a Vector4 in-buffer.
 * 
 * @param buf
 *            the buffer to find the Vector4 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to normalize
 */
public static void normalizeVector4(final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.normalizeLocal();
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: Renanse/Ardor3D

/**
 * Multiply and store a Vector3 in-buffer.
 * 
 * @param toMult
 *            the vector to multiply against
 * @param buf
 *            the buffer to find the Vector3 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to multiply
 */
public static void multInBuffer(final ReadOnlyVector4 toMult, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.multiplyLocal(toMult);
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: Renanse/Ardor3D

/**
 * Normalize a Vector4 in-buffer.
 * 
 * @param buf
 *            the buffer to find the Vector4 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to normalize
 */
public static void normalizeVector4(final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.normalizeLocal();
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: com.ardor3d/ardor3d-core

/**
 * Add to a Vector4 in-buffer.
 * 
 * @param toAdd
 *            the vector to add from
 * @param buf
 *            the buffer to find the Vector4 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to add to
 */
public static void addInBuffer(final ReadOnlyVector4 toAdd, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.addLocal(toAdd);
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: Renanse/Ardor3D

/**
 * Add to a Vector4 in-buffer.
 * 
 * @param toAdd
 *            the vector to add from
 * @param buf
 *            the buffer to find the Vector4 within
 * @param index
 *            the position (in terms of vectors, not floats) of the vector to add to
 */
public static void addInBuffer(final ReadOnlyVector4 toAdd, final FloatBuffer buf, final int index) {
  final Vector4 temp = Vector4.fetchTempInstance();
  populateFromBuffer(temp, buf, index);
  temp.addLocal(toAdd);
  setInBuffer(temp, buf, index);
  Vector4.releaseTempInstance(temp);
}
origin: com.ardor3d/ardor3d-core

public Vector3 getNormalizedDeviceCoordinates(final ReadOnlyVector3 worldPosition, Vector3 store) {
  if (store == null) {
    store = new Vector3();
  }
  checkModelViewProjection();
  final Vector4 position = Vector4.fetchTempInstance();
  position.set(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), 1);
  _modelViewProjection.applyPre(position, position);
  position.multiplyLocal(1.0 / position.getW());
  store.setX(position.getX());
  store.setY(position.getY());
  store.setZ(position.getZ());
  Vector4.releaseTempInstance(position);
  return store;
}
origin: Renanse/Ardor3D

public Vector3 getNormalizedDeviceCoordinates(final ReadOnlyVector3 worldPosition, Vector3 store) {
  if (store == null) {
    store = new Vector3();
  }
  checkModelViewProjection();
  final Vector4 position = Vector4.fetchTempInstance();
  position.set(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), 1);
  _modelViewProjection.applyPre(position, position);
  position.multiplyLocal(1.0 / position.getW());
  store.setX(position.getX());
  store.setY(position.getY());
  store.setZ(position.getZ());
  Vector4.releaseTempInstance(position);
  return store;
}
origin: Renanse/Ardor3D

Vector4.releaseTempInstance(position);
origin: com.ardor3d/ardor3d-effects

Vector4.releaseTempInstance(position);
origin: com.ardor3d/ardor3d-effects

Vector4.releaseTempInstance(pointTop);
Vector4.releaseTempInstance(pointFinal);
Vector4.releaseTempInstance(pointBottom);
origin: com.ardor3d/ardor3d-core

store.setZ(position.getZ());
Vector4.releaseTempInstance(position);
return store;
origin: Renanse/Ardor3D

store.setZ(position.getZ());
Vector4.releaseTempInstance(position);
return store;
origin: Renanse/Ardor3D

  optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
Vector4.releaseTempInstance(position);
origin: Renanse/Ardor3D

  optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
Vector4.releaseTempInstance(position);
origin: com.ardor3d/ardor3d-effects

  optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
Vector4.releaseTempInstance(position);
origin: com.ardor3d/ardor3d-core

  optimalCameraFar = Math.max(-position.getZ(), optimalCameraFar);
Vector4.releaseTempInstance(position);
origin: Renanse/Ardor3D

assertEquals(vec1, vec6);
assertNotSame(vec1, vec6);
Vector4.releaseTempInstance(vec6);
com.ardor3d.mathVector4releaseTempInstance

Javadoc

Releases a Vector4 back to be used by a future call to fetchTempInstance. TAKE CARE: this Vector4 object should no longer have other classes referencing it or "Bad Things" will happen.

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.
  • getXf
  • 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.
  • multiplyLocal,
  • setW,
  • setX,
  • setY,
  • setZ,
  • dot,
  • fetchTempInstance,
  • getWf,
  • multiply,
  • normalizeLocal

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BoxLayout (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