Class ContextPhysics<T>
java.lang.Object
repast.simphony.space.projection.DefaultProjection<T>
repast.simphony.space.continuous.AbstractContinuousSpace<T,Map<NdPoint,Object>>
repast.simphony.space.continuous.DefaultContinuousSpace<T>
repast.simphony.space.physics.DefaultPhysicsSpace<T>
repast.simphony.context.space.physics.ContextPhysics<T>
- All Implemented Interfaces:
ContextListener<T>,ContinuousSpace<T>,PhysicsSpace<T>,Projection<T>
Default implementation of an n-dimensional continuous space.
-
Nested Class Summary
Nested classes/interfaces inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
AbstractContinuousSpace.PointHolder -
Field Summary
Fields inherited from class repast.simphony.space.physics.DefaultPhysicsSpace
bodyToObjectMap, collisionConfiguration, dispatcher, dynamicsWorld, maxSubSteps, objectToBodyMap, solver, stepSizeFields inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
accessor, adder, agentLocationMap, dimensions, locationStorage, size, translatorFields inherited from class repast.simphony.space.projection.DefaultProjection
listeners, name -
Constructor Summary
ConstructorsConstructorDescriptionContextPhysics(String name, ContinuousAdder<T> adder, PointTranslator translator, double[] size, double[] origin) Constructs this space with the specified name, adder, translator, accessor and size.ContextPhysics(String name, ContinuousAdder<T> adder, PointTranslator translator, double xdim, double ydim, double zdim) Constructs this space with the specified name, adder, translator, accessor and size. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddFromContext(T t) voideventOccured(ContextEvent<T> evt) If the event is an add this will put the object at the (0, 0, ..., 0) location.Methods inherited from class repast.simphony.space.physics.DefaultPhysicsSpace
addObject, getGravity, getLinearVelocity, getMaxSubSteps, getStepSize, getTransformForObject, initPhysics, setGravity, setLinearVelocity, setMaxSubSteps, setStepSize, stepMethods inherited from class repast.simphony.space.continuous.DefaultContinuousSpace
createLocationStorageMethods inherited from class repast.simphony.space.continuous.AbstractContinuousSpace
doMove, evaluate, getAdder, getDimensions, getDisplacement, getDistance, getDistanceSq, getLocation, getLocation, getObjectAt, getObjects, getObjectsAt, getPointTranslator, getRandomObjectAt, isPeriodic, moveByDisplacement, moveByVector, moveTo, remove, removeAll, setAdder, setPointTranslator, sizeMethods inherited from class repast.simphony.space.projection.DefaultProjection
addProjectionListener, fireProjectionEvent, getName, getProjectionListeners, removeProjectionListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface repast.simphony.space.projection.Projection
addProjectionListener, evaluate, getName, getProjectionListeners, removeProjectionListener
-
Constructor Details
-
ContextPhysics
public ContextPhysics(String name, ContinuousAdder<T> adder, PointTranslator translator, double xdim, double ydim, double zdim) Constructs this space with the specified name, adder, translator, accessor and size. The size is the size of the space meaning [3, 3] is a 3x3 space.- Parameters:
name- the name of the spacesize- the dimensions of the space
-
ContextPhysics
public ContextPhysics(String name, ContinuousAdder<T> adder, PointTranslator translator, double[] size, double[] origin) Constructs this space with the specified name, adder, translator, accessor and size. The size is the size of the space meaning [3, 3] is a 3x3 space.- Parameters:
name- the name of the spacesize- the dimensions of the spaceorigin- the origin of the space
-
-
Method Details
-
eventOccured
If the event is an add this will put the object at the (0, 0, ..., 0) location. If it is a remove it will remove the object from its location map.- Specified by:
eventOccuredin interfaceContextListener<T>- Parameters:
evt- aContextEventthat occurred to the context this is a part of
-
addFromContext
-
addAll
-