Package org.jbox2d.pooling.normal
Class DefaultWorldPool
java.lang.Object
org.jbox2d.pooling.normal.DefaultWorldPool
- All Implemented Interfaces:
IWorldPool
Provides object pooling for all objects used in the engine. Objects retrieved from here should
only be used temporarily, and then pushed back (with the exception of arrays).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OrderedStack
<AABB> private final java.util.HashMap
<java.lang.Integer, float[]> private final java.util.HashMap
<java.lang.Integer, int[]> private final java.util.HashMap
<java.lang.Integer, Vec2[]> private final MutableStack
<Contact> private final MutableStack
<Contact> private final MutableStack
<Contact> private final Collision
private final MutableStack
<Contact> private final Distance
private final MutableStack
<Contact> private final MutableStack
<Contact> private final OrderedStack
<Mat33> private final OrderedStack
<Mat22> private final MutableStack
<Contact> private final OrderedStack
<Rot> private final TimeOfImpact
private final OrderedStack
<Vec3> private final OrderedStack
<Vec2> private final IWorldPool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IDynamicStack
<Contact> final Collision
final Distance
final float[]
getFloatArray
(int argLength) final int[]
getIntArray
(int argLength) final IDynamicStack
<Contact> final IDynamicStack
<Contact> final TimeOfImpact
final Vec2[]
getVec2Array
(int argLength) final AABB
popAABB()
final AABB[]
popAABB
(int argNum) final Mat22
popMat22()
final Mat22[]
popMat22
(int argNum) final Mat33
popMat33()
final Rot
popRot()
final Vec2
popVec2()
final Vec2[]
popVec2
(int argNum) final Vec3
popVec3()
final Vec3[]
popVec3
(int argNum) final void
pushAABB
(int argNum) final void
pushMat22
(int argNum) final void
pushMat33
(int argNum) final void
pushRot
(int num) final void
pushVec2
(int argNum) final void
pushVec3
(int argNum) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
vecs
-
vec3s
-
mats
-
mat33s
-
aabbs
-
rots
-
afloats
private final java.util.HashMap<java.lang.Integer,float[]> afloats -
aints
private final java.util.HashMap<java.lang.Integer,int[]> aints -
avecs
-
world
-
pcstack
-
ccstack
-
cpstack
-
ecstack
-
epstack
-
chcstack
-
chpstack
-
collision
-
toi
-
dist
-
-
Constructor Details
-
DefaultWorldPool
public DefaultWorldPool(int argSize, int argContainerSize)
-
-
Method Details
-
getPolyContactStack
- Specified by:
getPolyContactStack
in interfaceIWorldPool
-
getCircleContactStack
- Specified by:
getCircleContactStack
in interfaceIWorldPool
-
getPolyCircleContactStack
- Specified by:
getPolyCircleContactStack
in interfaceIWorldPool
-
getEdgeCircleContactStack
- Specified by:
getEdgeCircleContactStack
in interfaceIWorldPool
-
getEdgePolyContactStack
- Specified by:
getEdgePolyContactStack
in interfaceIWorldPool
-
getChainCircleContactStack
- Specified by:
getChainCircleContactStack
in interfaceIWorldPool
-
getChainPolyContactStack
- Specified by:
getChainPolyContactStack
in interfaceIWorldPool
-
popVec2
- Specified by:
popVec2
in interfaceIWorldPool
-
popVec2
- Specified by:
popVec2
in interfaceIWorldPool
-
pushVec2
public final void pushVec2(int argNum) - Specified by:
pushVec2
in interfaceIWorldPool
-
popVec3
- Specified by:
popVec3
in interfaceIWorldPool
-
popVec3
- Specified by:
popVec3
in interfaceIWorldPool
-
pushVec3
public final void pushVec3(int argNum) - Specified by:
pushVec3
in interfaceIWorldPool
-
popMat22
- Specified by:
popMat22
in interfaceIWorldPool
-
popMat22
- Specified by:
popMat22
in interfaceIWorldPool
-
pushMat22
public final void pushMat22(int argNum) - Specified by:
pushMat22
in interfaceIWorldPool
-
popMat33
- Specified by:
popMat33
in interfaceIWorldPool
-
pushMat33
public final void pushMat33(int argNum) - Specified by:
pushMat33
in interfaceIWorldPool
-
popAABB
- Specified by:
popAABB
in interfaceIWorldPool
-
popAABB
- Specified by:
popAABB
in interfaceIWorldPool
-
pushAABB
public final void pushAABB(int argNum) - Specified by:
pushAABB
in interfaceIWorldPool
-
popRot
- Specified by:
popRot
in interfaceIWorldPool
-
pushRot
public final void pushRot(int num) - Specified by:
pushRot
in interfaceIWorldPool
-
getCollision
- Specified by:
getCollision
in interfaceIWorldPool
-
getTimeOfImpact
- Specified by:
getTimeOfImpact
in interfaceIWorldPool
-
getDistance
- Specified by:
getDistance
in interfaceIWorldPool
-
getFloatArray
public final float[] getFloatArray(int argLength) - Specified by:
getFloatArray
in interfaceIWorldPool
-
getIntArray
public final int[] getIntArray(int argLength) - Specified by:
getIntArray
in interfaceIWorldPool
-
getVec2Array
- Specified by:
getVec2Array
in interfaceIWorldPool
-