Base for all other worlds like RedWorld1, RedWorld2, RedWorld3. Implements simplified physical laws.
Create a new world. See class source for more information on defaults.
Manually add an object to this world. Usually never needed.
Manually remove an object from this world.
Wrap an object around world dimensions. i.e. in a world without borders - going out on the right side brings the object back on the left.
Returns an Array of objects that are in the surrounding locations. Only useful when working with discrete worlds. e.g. cellular automata.
Returns an Array of RedVector objects representing the surrounding locations. Only useful when working with discrete worlds. e.g. cellular automata.
Size of this world ( RedVector of any dimension). i.e. the world can have any number of dimensions.
World gravity ( RedVector of any dimension) for each dimension.
Scalar with maximum velocity. i.e. 'speed of light' for this world.
A scalar. The cost of running into walls etc.
An Array of all objects currently in this world.
An Array containing arrays with a size that matches the current world dimensions. Only useful when working with discrete worlds. e.g. cellular automata.
An Integer specifying how far the surroundings will stretch. A 1 here (the default) lists only the adjacent locations. e.g. a 1 gives 8 locations in the surroundings array if the world is 2D, while 2 gives 24 and 3 48. In a 3D world 1 gives 26, 2 124 and 3 342.