From 9af188db64514fd5dd6db0a0bf82920b9b661758 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 25 Nov 2009 01:42:37 -0500 Subject: Implement object modifiers and rotation. --- tests/dimension/arithexp.sh | 2 +- tests/dimension/demo.pov | 1 + tests/dimension/demo.sh | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/dimension/arithexp.sh b/tests/dimension/arithexp.sh index 12e3432..dc63576 100755 --- a/tests/dimension/arithexp.sh +++ b/tests/dimension/arithexp.sh @@ -21,7 +21,7 @@ arithexp=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/arithexp.pov) arithexp_exp='(sphere { < < (float "2.0") - (float "1.0") , (float "3.0") , (float "4.0") > . x , \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , (float "1.0") + (integer "2") * (integer "2") - (integer "4") > - - < (integer "0") , (integer "0") , (integer "1") > , (float "2.25") - (integer "1") * (integer "2") }) -((sphere (vector (float 0) (float 0) (float 0) (integer 0) (integer 0)) (float 0.25)))' +((sphere (vector (float 0) (float 0) (float 0) (integer 0) (integer 0)) (float 0.25) object-modifiers))' if [ "$arithexp" != "$arithexp_exp" ]; then echo "arithexp.pov parsed as \"$arithexp\"" >&2 diff --git a/tests/dimension/demo.pov b/tests/dimension/demo.pov index 85607b8..453ebfc 100644 --- a/tests/dimension/demo.pov +++ b/tests/dimension/demo.pov @@ -21,6 +21,7 @@ box { <-1, -1, -1>, <1, 1, 1> + rotate <45, 0, 0> } sphere { diff --git a/tests/dimension/demo.sh b/tests/dimension/demo.sh index 3ee9635..da3548a 100755 --- a/tests/dimension/demo.sh +++ b/tests/dimension/demo.sh @@ -20,8 +20,8 @@ ######################################################################### demo=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/demo.pov) -demo_exp='(box { < - (integer "1") , - (integer "1") , - (integer "1") > , < (integer "1") , (integer "1") , (integer "1") > } sphere { < (integer "0") , (integer "0") , (integer "0") > , (float "1.25") }) -((box (vector (integer -1) (integer -1) (integer -1) (integer 0) (integer 0)) (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0))) (sphere (vector (integer 0) (integer 0) (integer 0) (integer 0) (integer 0)) (float 1.25)))' +demo_exp='(box { < - (integer "1") , - (integer "1") , - (integer "1") > , < (integer "1") , (integer "1") , (integer "1") > rotate < (integer "45") , (integer "0") , (integer "0") > } sphere { < (integer "0") , (integer "0") , (integer "0") > , (float "1.25") }) +((box (vector (integer -1) (integer -1) (integer -1) (integer 0) (integer 0)) (vector (integer 1) (integer 1) (integer 1) (integer 0) (integer 0)) (object-modifiers (rotate (vector (integer 45) (integer 0) (integer 0) (integer 0) (integer 0))))) (sphere (vector (integer 0) (integer 0) (integer 0) (integer 0) (integer 0)) (float 1.25) object-modifiers))' if [ "$demo" != "$demo_exp" ]; then echo "demo.pov parsed as \"$demo\"" >&2 -- cgit v1.2.3