diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-06 17:18:14 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-06 17:18:14 -0400 |
commit | 86cb5f26029b3357727b88fee3fa7dd799a8d6c8 (patch) | |
tree | fc915556ef813cf4ad59edeb7b59fee0e3244c34 /make.py | |
parent | 3d3140071713e523516793258e3c904ca162d7b7 (diff) | |
download | chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.gz chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.bz2 chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.zip |
geometry on the GPU is now a struct created in the GPUGeometry class. coding style for cuda code is now compliant with python PEP 7 -- Style Guide for C Code.
Diffstat (limited to 'make.py')
-rw-r--r-- | make.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -72,12 +72,12 @@ def box(dx, dy, dz, center=(0,0,0)): "Return a box with linear dimensions `dx`, `dy`, and `dz`." return linear_extrude([-dx/2.0,dx/2.0,dx/2.0,-dx/2.0],[-dy/2.0,-dy/2.0,dy/2.0,dy/2.0],height=dz,center=center) -def cube(size=1, height=None): +def cube(size=1, height=None, center=(0,0,0)): "Return a cube mesh whose sides have length `size`." if height is None: height = size - return linear_extrude([-size/2.0,size/2.0,size/2.0,-size/2.0],[-size/2.0,-size/2.0,size/2.0,size/2.0], height=size) + return linear_extrude([-size/2.0,size/2.0,size/2.0,-size/2.0],[-size/2.0,-size/2.0,size/2.0,size/2.0], height=size, center=center) def cylinder(radius=1, height=2, radius2=None, nsteps=64): """ |