Package com.jme3.util

Class TempVars

java.lang.Object
com.jme3.util.TempVars

public class TempVars extends Object
Temporary variables assigned to each thread. Engine classes may access these temp variables with TempVars.get(), all retrieved TempVars instances must be returned via TempVars.release(). This returns an available instance of the TempVar class ensuring this particular instance is never used elsewhere in the meantime.
  • Field Details

    • intBuffer1

      public final IntBuffer intBuffer1
      For interfacing with OpenGL in Renderer.
    • intBuffer16

      public final IntBuffer intBuffer16
    • floatBuffer16

      public final FloatBuffer floatBuffer16
    • bbox

      public final BoundingBox bbox
      BoundingVolumes (for shadows etc.)
    • skinPositions

      public final float[] skinPositions
      Skinning buffers
    • skinNormals

      public final float[] skinNormals
    • skinTangents

      public final float[] skinTangents
    • triangle

      public final Triangle triangle
      Fetching triangle from mesh
    • color

      public final ColorRGBA color
      Color
    • vect1

      public final Vector3f vect1
      General vectors.
    • vect2

      public final Vector3f vect2
    • vect3

      public final Vector3f vect3
    • vect4

      public final Vector3f vect4
    • vect5

      public final Vector3f vect5
    • vect6

      public final Vector3f vect6
    • vect7

      public final Vector3f vect7
    • vect8

      public final Vector3f vect8
    • vect9

      public final Vector3f vect9
    • vect10

      public final Vector3f vect10
    • vect4f1

      public final Vector4f vect4f1
    • vect4f2

      public final Vector4f vect4f2
    • tri

      public final Vector3f[] tri
    • vect2d

      public final Vector2f vect2d
      2D vector
    • vect2d2

      public final Vector2f vect2d2
    • tempMat3

      public final Matrix3f tempMat3
      General matrices.
    • tempMat4

      public final Matrix4f tempMat4
    • tempMat42

      public final Matrix4f tempMat42
    • quat1

      public final Quaternion quat1
      General quaternions.
    • quat2

      public final Quaternion quat2
    • eigen

      public final Eigen3f eigen
      Eigen
    • plane

      public final Plane plane
      Plane
    • fWdU

      public final float[] fWdU
      BoundingBox ray collision
    • fAWdU

      public final float[] fAWdU
    • fDdU

      public final float[] fDdU
    • fADdU

      public final float[] fADdU
    • fAWxDdU

      public final float[] fAWxDdU
    • spatialStack

      public final Spatial[] spatialStack
      Maximum tree depth .. 32 levels??
    • matrixWrite

      public final float[] matrixWrite
    • collisionResults

      public final CollisionResults collisionResults
      BIHTree
    • bihSwapTmp

      public final float[] bihSwapTmp
    • bihStack

      public final ArrayList<BIHNode.BIHStackData> bihStack
  • Method Details

    • get

      public static TempVars get()
      Acquire an instance of the TempVar class. You have to release the instance after use by calling the release() method. If more than STACK_SIZE (currently 5) instances are requested in a single thread then an ArrayIndexOutOfBoundsException will be thrown.
      Returns:
      A TempVar instance
    • release

      public void release()
      Releases this instance of TempVars. Once released, the contents of the TempVars are undefined. The TempVars must be released in the opposite order that they are retrieved, e.g. Acquiring vars1, then acquiring vars2, vars2 MUST be released first otherwise an exception will be thrown.