From 6c196ec8a41d6ed506c133c8b33dba9684f9a7a6 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 3 Mar 2010 12:34:43 +0000 Subject: Updated raytracer test. Added SPASS test. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1271 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- test/raytracer/object.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test/raytracer/object.c') diff --git a/test/raytracer/object.c b/test/raytracer/object.c index 3dd6e77e..c7e5f53f 100644 --- a/test/raytracer/object.c +++ b/test/raytracer/object.c @@ -6,30 +6,30 @@ #include "object.h" #include "matrix.h" -static struct object * new_object(int kind, struct closure * c) +static struct object * new_object(int kind, struct closure c) { struct object * o = arena_alloc(sizeof(struct object)); o->kind = kind; - ASSIGN(o->surf, *c); + o->surf = c; o->world2obj = o->obj2world = mid; o->max_scale_applied = 1.0; o->radius = BS_NOT_COMPUTED; return o; } -struct object * cone(struct closure * c) +struct object * cone(struct closure c) { return new_object(Cone, c); } -struct object * cube(struct closure * c) +struct object * cube(struct closure c) { return new_object(Cube, c); } -struct object * cylinder(struct closure * c) +struct object * cylinder(struct closure c) { return new_object(Cylinder, c); } -struct object * plane(struct closure * c) +struct object * plane(struct closure c) { return new_object(Plane, c); } -struct object * sphere(struct closure * c) +struct object * sphere(struct closure c) { return new_object(Sphere, c); } static struct object * transform(struct object * o, @@ -47,7 +47,7 @@ static struct object * transform(struct object * o, no->o2 = transform(o->o2, t, tinv, scale); break; default: - ASSIGN(no->surf, o->surf); + no->surf = o->surf; no->world2obj = mcompose(o->world2obj, tinv); no->obj2world = mcompose(t, o->obj2world); no->max_scale_applied = o->max_scale_applied * scale; @@ -212,3 +212,4 @@ void normal_vector(struct object * obj, struct point * p, int face, product(&tang_world1, &tang_world2, n); vnormalize(n, n); } + -- cgit