diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-12-21 15:51:47 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-12-21 15:52:06 -0500 |
commit | b602fff4133fd793b04839e4e0514c8c101fa50a (patch) | |
tree | e9023f73ef1170378d09130305fc72a561ce7ff2 /libdimension-python | |
parent | babba43cd4d1b9c92a569f19acbe17e429193b01 (diff) | |
download | dimension-b602fff4133fd793b04839e4e0514c8c101fa50a.tar.xz |
Add teapots WIP.teapot
Diffstat (limited to 'libdimension-python')
-rw-r--r-- | libdimension-python/dimension.pxd | 1 | ||||
-rw-r--r-- | libdimension-python/dimension.pyx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libdimension-python/dimension.pxd b/libdimension-python/dimension.pxd index 3f89e71..cddd7ba 100644 --- a/libdimension-python/dimension.pxd +++ b/libdimension-python/dimension.pxd @@ -335,6 +335,7 @@ cdef extern from "../libdimension/dimension.h": dmnsn_object *dmnsn_new_cube() dmnsn_object *dmnsn_new_cone(double r1, double r2, bint open) dmnsn_object *dmnsn_new_torus(double major, double minor) + dmnsn_object *dmnsn_new_teapot() dmnsn_object *dmnsn_new_csg_union(dmnsn_array *objects) dmnsn_object *dmnsn_new_csg_intersection(dmnsn_object *A, dmnsn_object *B) diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx index a34d2eb..704d6fa 100644 --- a/libdimension-python/dimension.pyx +++ b/libdimension-python/dimension.pyx @@ -1271,6 +1271,15 @@ cdef class Torus(Object): self._object = dmnsn_new_torus(major_radius, minor_radius) Object.__init__(self, *args, **kwargs) +cdef class Teapot(Object): + """The Utah teapot.""" + def __init__(self, *args, **kwargs): + """ + Create a Teapot. Teapot() accepts any arguments that Object() accepts. + """ + self._object = dmnsn_new_teapot() + Object.__init__(self, *args, **kwargs) + cdef class Union(Object): """A CSG union.""" def __init__(self, objects, *args, **kwargs): |