congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Vector4.releaseTempInstance
Code IndexAdd Tabnine 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)

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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JOptionPane (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now