Base for all other object like RedPendulum, RedParticle, RedBoid etc. Implements simplified physical laws. All objects register themselves in the world when created.
Create a new object. See class source for more information on defaults.
Returns a scalar value representing the gravity force from another object within this world.
Slows down velocity. Scalar.
Slows down velocity. Scalar.
Returns true if two objects touch. See -size below.
Returns true if location ( RedVector ) is within the object.
Collision detection. Add acceleration vector to both objects if they touch.
redObj |
Another red object. |
safety |
How many times the method should nudge objects apart. |
A Boolean.
A world ( RedWorld of any dimension) that currently holds this object. The object will add itself.
The current location ( RedVector of any dimension) within the world.
The current velocity ( RedVector of any dimension) that the object has.
A vector or scalar representing current acceleration.
A scalar. How hard it will be to move this object around. Used for gravity forces.
A scalar. The distance from location to the outer border i.e. radius. Used for contains and rendering.