/** * Releases a ColorRGBA back to be used by a future call to fetchTempInstance. TAKE CARE: this ColorRGBA object * should no longer have other classes referencing it or "Bad Things" will happen. * * @param color * the ColorRGBA to release. */ public final static void releaseTempInstance(final ColorRGBA color) { if (MathConstants.useMathPools) { ColorRGBA.COLOR_POOL.release(color); } }
/** * Releases a ColorRGBA back to be used by a future call to fetchTempInstance. TAKE CARE: this ColorRGBA object * should no longer have other classes referencing it or "Bad Things" will happen. * * @param color * the ColorRGBA to release. */ public final static void releaseTempInstance(final ColorRGBA color) { if (MathConstants.useMathPools) { ColorRGBA.COLOR_POOL.release(color); } }
/** * Releases a Matrix3 back to be used by a future call to fetchTempInstance. TAKE CARE: this Matrix3 object should * no longer have other classes referencing it or "Bad Things" will happen. * * @param mat * the Matrix3 to release. */ public final static void releaseTempInstance(final Matrix3 mat) { if (MathConstants.useMathPools) { Matrix3.MAT_POOL.release(mat); } } }
/** * Releases a Triangle back to be used by a future call to fetchTempInstance. TAKE CARE: this Triangle object should * no longer have other classes referencing it or "Bad Things" will happen. * * @param tri * the Triangle to release. */ public final static void releaseTempInstance(final Triangle tri) { if (MathConstants.useMathPools) { Triangle.TRI_POOL.release(tri); } } }
/** * 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. * * @param vec * the Vector4 to release. */ public final static void releaseTempInstance(final Vector4 vec) { if (MathConstants.useMathPools) { Vector4.VEC_POOL.release(vec); } } }
public final static void releaseTempInstance(final StateStack s) { if (Constants.useStatePools) { STATESTACKS_POOL.release(s); } }
/** * Releases a Ring back to be used by a future call to fetchTempInstance. TAKE CARE: this Ring object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param ring * the Ring to release. */ public final static void releaseTempInstance(final Ring ring) { if (MathConstants.useMathPools) { Ring.RING_POOL.release(ring); } } }
public final static void releaseTempInstance(final StateStack s) { if (Constants.useStatePools) { STATESTACKS_POOL.release(s); } }
/** * Releases a Ray back to be used by a future call to fetchTempInstance. TAKE CARE: this Ray object should no longer * have other classes referencing it or "Bad Things" will happen. * * @param ray * the Ray to release. */ public final static void releaseTempInstance(final Ray3 ray) { if (MathConstants.useMathPools) { Ray3.RAY_POOL.release(ray); } } }
/** * Releases a Rectangle2 back to be used by a future call to fetchTempInstance. TAKE CARE: this object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param rectangle * the Rectangle2 to release. */ public final static void releaseTempInstance(final Rectangle2 rectangle) { if (MathConstants.useMathPools) { Rectangle2.RECTANGLE_POOL.release(rectangle); } } }
/** * Releases a Transform back to be used by a future call to fetchTempInstance. TAKE CARE: this Transform object * should no longer have other classes referencing it or "Bad Things" will happen. * * @param trans * the Transform to release. */ public final static void releaseTempInstance(final Transform trans) { if (MathConstants.useMathPools) { Transform.TRANS_POOL.release(trans); } } }
/** * Releases a Vector3 back to be used by a future call to fetchTempInstance. TAKE CARE: this Vector3 object should * no longer have other classes referencing it or "Bad Things" will happen. * * @param vec * the Vector3 to release. */ public final static void releaseTempInstance(final Vector3 vec) { if (MathConstants.useMathPools) { Vector3.VEC_POOL.release(vec); } } }
/** * Releases a Quaternion back to be used by a future call to fetchTempInstance. TAKE CARE: this Quaternion object * should no longer have other classes referencing it or "Bad Things" will happen. * * @param mat * the Quaternion to release. */ public final static void releaseTempInstance(final Quaternion mat) { if (MathConstants.useMathPools) { Quaternion.QUAT_POOL.release(mat); } } }
/** * Releases a Ring back to be used by a future call to fetchTempInstance. TAKE CARE: this Ring object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param ring * the Ring to release. */ public final static void releaseTempInstance(final Ring ring) { if (MathConstants.useMathPools) { Ring.RING_POOL.release(ring); } } }
/** * Releases a Plane back to be used by a future call to fetchTempInstance. TAKE CARE: this Plane object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param plane * the Plane to release. */ public final static void releaseTempInstance(final Plane plane) { if (MathConstants.useMathPools) { Plane.PLANE_POOL.release(plane); } } }
/** * Releases a Matrix4 back to be used by a future call to fetchTempInstance. TAKE CARE: this Matrix4 object should * no longer have other classes referencing it or "Bad Things" will happen. * * @param mat * the Matrix4 to release. */ public final static void releaseTempInstance(final Matrix4 mat) { if (MathConstants.useMathPools) { Matrix4.MAT_POOL.release(mat); } } }
/** * Releases a Vector2 back to be used by a future call to fetchTempInstance. TAKE CARE: this Vector2 object should * no longer have other classes referencing it or "Bad Things" will happen. * * @param vec * the Vector2 to release. */ public final static void releaseTempInstance(final Vector2 vec) { if (MathConstants.useMathPools) { Vector2.VEC_POOL.release(vec); } } }
/** * Releases a Line3 back to be used by a future call to fetchTempInstance. TAKE CARE: this Line3 object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param line * the Line3 to release. */ public final static void releaseTempInstance(final Line3 line) { if (MathConstants.useMathPools) { LINE3_POOL.release(line); } } }
/** * Releases a Line3 back to be used by a future call to fetchTempInstance. TAKE CARE: this Line3 object should no * longer have other classes referencing it or "Bad Things" will happen. * * @param line * the Line3 to release. */ public final static void releaseTempInstance(final Line3 line) { if (MathConstants.useMathPools) { LINE3_POOL.release(line); } } }
@Test public void testPoolSize() { final ObjectPool<Vector2> pool = ObjectPool.create(Vector2.class, 10); for (int i = 0; i < 11; i++) { pool.release(new Vector2()); } } }