Skip to content

Documentation

ChiCubed edited this page Oct 20, 2016 · 1 revision

constants.py

This file is intended to hold fundamental physical constants; at present it only holds an FPS value, which shouldn't be there and only is at the moment for convenience.

display.py

This is intended to provide a temporary method of displaying the interactions in the physics world. Actually, the engine is intended to be a standalone physics engine which has Non-Euclidean capabilities (that's practically the whole reason I'm writing engine, namely PORTALS) and the ability to simulate complex interactions, such as those around black holes.

Camera

__init__(pos=Vector2D(0,0), zoom=100, resizable=True, screen=None)

The pos parameter is the central position of the camera in metres as a Vector. In this plane positive means up/right, which is the case for the vast majority of this physics engine. The zoom parameter is the number of pixels per metre, i.e. increasing this zooms in. The resizable parameter decides whether the screen should be resizable. The screen parameter is the PyGame surface to which the Camera should display. If this is not given or is None, a screen will be initialised.

addHandle(key, value)

Adds a handle to the Camera. See below for a detailed description of handles. If the key exists, the key's value will be replaced.

addKeyValue(key, value)

Essentially the same as addHandle except specifically for key presses.

Clone this wiki locally