-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshapes.py
More file actions
33 lines (27 loc) · 742 Bytes
/
shapes.py
File metadata and controls
33 lines (27 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from vector import Vector, Vector2D, Vector3D
class Shape():
"""
Base shape class for physicalPython
xPos: Initial shape x position
yPos: Initial shape y position
zPos: Initial shape z position
"""
def __init__(self, xPos = 0, yPos = 0, zPos = 0):
self.xPos = xPos
self.yPos = yPos
self.zPos = zPos
def draw(self):
"""
Draws this shape object on a given canvas
"""
pass
def isTouching(self, shape2):
pass
class Sphere(Shape):
"""
Sphere shape class for physicalPython
xPos: Initial shape x position
yPos: Initial shape y position
zPos: Initial shape z position
radius: The radius of the given sphere
"""