com.jme3.util
Class TempVars

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

public class TempVars
extends java.lang.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 mean time.


Field Summary
 java.util.ArrayList<BIHNode.BIHStackData> bihStack
           
 float[] bihSwapTmp
          BIHTree
 ColorRGBA color
          Color
 Eigen3f eigen
          Eigen
 float[] fADdU
           
 float[] fAWdU
           
 float[] fAWxDdU
           
 float[] fDdU
           
 java.nio.FloatBuffer floatBuffer16
           
 float[] fWdU
          BoundingBox ray collision
 java.nio.IntBuffer intBuffer1
          For interfacing with OpenGL in Renderer.
 java.nio.IntBuffer intBuffer16
           
 float[] matrixWrite
           
 Plane plane
          Plane
 Quaternion quat1
          General quaternions.
 Quaternion quat2
           
 float[] skinNormals
           
 float[] skinPositions
          Skinning buffers
 float[] skinTangents
           
 Spatial[] spatialStack
          Maximum tree depth ..
 Matrix3f tempMat3
          General matrices.
 Matrix4f tempMat4
           
 Matrix4f tempMat42
           
 Vector3f[] tri
           
 Triangle triangle
          Fetching triangle from mesh
 Vector3f vect1
          General vectors.
 Vector3f vect10
           
 Vector3f vect2
           
 Vector2f vect2d
          2D vector
 Vector2f vect2d2
           
 Vector3f vect3
           
 Vector3f vect4
           
 Vector4f vect4f
           
 Vector3f vect5
           
 Vector3f vect6
           
 Vector3f vect7
           
 Vector3f vect8
           
 Vector3f vect9
           
 
Method Summary
static TempVars get()
          Acquire an instance of the TempVar class.
 void release()
          Releases this instance of TempVars.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intBuffer1

public final java.nio.IntBuffer intBuffer1
For interfacing with OpenGL in Renderer.


intBuffer16

public final java.nio.IntBuffer intBuffer16

floatBuffer16

public final java.nio.FloatBuffer floatBuffer16

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

vect4f

public final Vector4f vect4f

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

bihSwapTmp

public final float[] bihSwapTmp
BIHTree


bihStack

public final java.util.ArrayList<BIHNode.BIHStackData> bihStack
Method Detail

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.