diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-06-09 00:30:12 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-06-09 00:30:12 -0400 |
commit | a5e56fc6eaeca787827145eedfdfc1aa5ec6ed78 (patch) | |
tree | 101773306e2029e7aeb9a4de776371c4bd908b0b /model_c2rs.py | |
parent | c630ab9996b052dc59ea166006df40195f776a30 (diff) | |
download | exuberant-hacks-a5e56fc6eaeca787827145eedfdfc1aa5ec6ed78.tar.gz exuberant-hacks-a5e56fc6eaeca787827145eedfdfc1aa5ec6ed78.zip |
draw all the parts of the cow
Diffstat (limited to 'model_c2rs.py')
-rwxr-xr-x | model_c2rs.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/model_c2rs.py b/model_c2rs.py index bd0ba82..9d6c63b 100755 --- a/model_c2rs.py +++ b/model_c2rs.py @@ -1,5 +1,10 @@ #!/usr/bin/env python +""" +This script is intended to be run in the same directory as a bunch of .c files; +it outputs .rs files. +""" + import sys def main(): @@ -28,15 +33,10 @@ def main(): // This file auto-generated from %s.c using model_c2rs.py // Don't edit by hand! -#[derive(Copy, Clone)] -pub struct Vertex { - position: (f32, f32, f32), - normal: (f32, f32, f32), -} -implement_vertex!(Vertex, position, normal); +use cow_vertex::Vertex; -pub const %s_vertices: [Vertex; %d] = [ -""" % (fname, fname, len(vertices))) +pub const %s_VERTICES: [Vertex; %d] = [ +""" % (fname, fname.upper(), len(vertices))) for i in range(len(vertices)): v = vertices[i] n = normals [i] |