From a5e56fc6eaeca787827145eedfdfc1aa5ec6ed78 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 9 Jun 2016 00:30:12 -0400 Subject: draw all the parts of the cow --- model_c2rs.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'model_c2rs.py') 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] -- cgit v1.2.3