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

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

Best Java code snippets using com.ardor3d.math.Vector4.fetchTempInstance (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: 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: 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

/**
 * 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

final Vector4 position = Vector4.fetchTempInstance();
for (final Vector3 frustumCorner : frustumCorners) {
  position.set(frustumCorner.getX(), frustumCorner.getY(), frustumCorner.getZ(), 1);
origin: com.ardor3d/ardor3d-core

final Vector4 position = Vector4.fetchTempInstance();
position.set((screenPosition.getX() / getWidth() - _viewPortLeft) / (_viewPortRight - _viewPortLeft) * 2 - 1,
    (screenPosition.getY() / getHeight() - _viewPortBottom) / (_viewPortTop - _viewPortBottom) * 2 - 1,
origin: Renanse/Ardor3D

final Vector4 position = Vector4.fetchTempInstance();
position.set((screenPosition.getX() / getWidth() - _viewPortLeft) / (_viewPortRight - _viewPortLeft) * 2 - 1,
    (screenPosition.getY() / getHeight() - _viewPortBottom) / (_viewPortTop - _viewPortBottom) * 2 - 1,
origin: Renanse/Ardor3D

double optimalCameraNear = Double.MAX_VALUE;
double optimalCameraFar = -Double.MAX_VALUE;
final Vector4 position = Vector4.fetchTempInstance();
for (int i = 0; i < _corners.length; i++) {
  position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
origin: com.ardor3d/ardor3d-effects

double optimalCameraNear = Double.MAX_VALUE;
double optimalCameraFar = -Double.MAX_VALUE;
final Vector4 position = Vector4.fetchTempInstance();
for (int i = 0; i < _corners.length; i++) {
  position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
origin: Renanse/Ardor3D

double optimalCameraNear = Double.MAX_VALUE;
double optimalCameraFar = -Double.MAX_VALUE;
final Vector4 position = Vector4.fetchTempInstance();
for (int i = 0; i < _corners.length; i++) {
  position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
origin: com.ardor3d/ardor3d-core

double optimalCameraNear = Double.MAX_VALUE;
double optimalCameraFar = -Double.MAX_VALUE;
final Vector4 position = Vector4.fetchTempInstance();
for (int i = 0; i < _corners.length; i++) {
  position.set(_corners[i].getX(), _corners[i].getY(), _corners[i].getZ(), 1);
origin: Renanse/Ardor3D

final Vector4 clipPlane = Vector4.fetchTempInstance();
origin: com.ardor3d/ardor3d-effects

final Vector4 clipPlane = Vector4.fetchTempInstance();
origin: Renanse/Ardor3D

final Vector4 vec6 = Vector4.fetchTempInstance();
vec6.set(vec1);
assertEquals(vec1, vec6);
com.ardor3d.mathVector4fetchTempInstance

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,
  • getWf,
  • multiply,
  • normalizeLocal

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSharedPreferences (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
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