maddux.objects package¶
Submodules¶
maddux.objects.ball module¶
A ball object to throw.
maddux.objects.dynamic module¶
An abstract base class for dynamic objects.
maddux.objects.obstacle module¶
A stationary rectangular solid that something may collide with
-
class
maddux.objects.obstacle.
Obstacle
(pt1, pt2, color='r')[source]¶ Bases:
maddux.objects.static.StaticObject
-
get_paths
()[source]¶ Returns the paths for each of the surfaces of the rectangle for plotting.
:returns (bottom, top, front, back, left, right) :rtype: list of 6 4x3 numpy.ndarrays
-
is_hit
(position)[source]¶ Checks if the rectangle is hit by a point or path
Parameters: position (numpy.ndarray or numpy.matrix) – An objects position (x, y, z) or positions if it is a path([x1, x2, ..], [y1, y2, ..], [z1, z2, ..] Returns: Whether the obstacle was hit by a point or path Return type: bool
-
maddux.objects.static module¶
An abstract base class for static objects.
maddux.objects.target module¶
A stationary object that something may collide with.
-
class
maddux.objects.target.
Target
(position, radius)[source]¶ Bases:
maddux.objects.static.StaticObject
-
is_hit
(position)[source]¶ Check if the target is hit.
Parameters: position (numpy.array) – A object’s position Return type: Boolean
-
maddux.objects.throwable module¶
A base throwable object class that encodes traits like gravity, velocity, etc.