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 Collisionprivate final MutableStack<Contact> private final Distanceprivate 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 TimeOfImpactprivate final OrderedStack<Vec3> private final OrderedStack<Vec2> private final IWorldPool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IDynamicStack<Contact> final Collisionfinal Distancefinal float[]getFloatArray(int argLength) final int[]getIntArray(int argLength) final IDynamicStack<Contact> final IDynamicStack<Contact> final TimeOfImpactfinal Vec2[]getVec2Array(int argLength) final AABBpopAABB()final AABB[]popAABB(int argNum) final Mat22popMat22()final Mat22[]popMat22(int argNum) final Mat33popMat33()final RotpopRot()final Vec2popVec2()final Vec2[]popVec2(int argNum) final Vec3popVec3()final Vec3[]popVec3(int argNum) final voidpushAABB(int argNum) final voidpushMat22(int argNum) final voidpushMat33(int argNum) final voidpushRot(int num) final voidpushVec2(int argNum) final voidpushVec3(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:
getPolyContactStackin interfaceIWorldPool
-
getCircleContactStack
- Specified by:
getCircleContactStackin interfaceIWorldPool
-
getPolyCircleContactStack
- Specified by:
getPolyCircleContactStackin interfaceIWorldPool
-
getEdgeCircleContactStack
- Specified by:
getEdgeCircleContactStackin interfaceIWorldPool
-
getEdgePolyContactStack
- Specified by:
getEdgePolyContactStackin interfaceIWorldPool
-
getChainCircleContactStack
- Specified by:
getChainCircleContactStackin interfaceIWorldPool
-
getChainPolyContactStack
- Specified by:
getChainPolyContactStackin interfaceIWorldPool
-
popVec2
- Specified by:
popVec2in interfaceIWorldPool
-
popVec2
- Specified by:
popVec2in interfaceIWorldPool
-
pushVec2
public final void pushVec2(int argNum) - Specified by:
pushVec2in interfaceIWorldPool
-
popVec3
- Specified by:
popVec3in interfaceIWorldPool
-
popVec3
- Specified by:
popVec3in interfaceIWorldPool
-
pushVec3
public final void pushVec3(int argNum) - Specified by:
pushVec3in interfaceIWorldPool
-
popMat22
- Specified by:
popMat22in interfaceIWorldPool
-
popMat22
- Specified by:
popMat22in interfaceIWorldPool
-
pushMat22
public final void pushMat22(int argNum) - Specified by:
pushMat22in interfaceIWorldPool
-
popMat33
- Specified by:
popMat33in interfaceIWorldPool
-
pushMat33
public final void pushMat33(int argNum) - Specified by:
pushMat33in interfaceIWorldPool
-
popAABB
- Specified by:
popAABBin interfaceIWorldPool
-
popAABB
- Specified by:
popAABBin interfaceIWorldPool
-
pushAABB
public final void pushAABB(int argNum) - Specified by:
pushAABBin interfaceIWorldPool
-
popRot
- Specified by:
popRotin interfaceIWorldPool
-
pushRot
public final void pushRot(int num) - Specified by:
pushRotin interfaceIWorldPool
-
getCollision
- Specified by:
getCollisionin interfaceIWorldPool
-
getTimeOfImpact
- Specified by:
getTimeOfImpactin interfaceIWorldPool
-
getDistance
- Specified by:
getDistancein interfaceIWorldPool
-
getFloatArray
public final float[] getFloatArray(int argLength) - Specified by:
getFloatArrayin interfaceIWorldPool
-
getIntArray
public final int[] getIntArray(int argLength) - Specified by:
getIntArrayin interfaceIWorldPool
-
getVec2Array
- Specified by:
getVec2Arrayin interfaceIWorldPool
-