]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/euler/modeling/modeling-tests.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / extra / euler / modeling / modeling-tests.factor
index f038818984b09f92bdcaa68e6e89993d1448a3a1..53088ee0078945f6d8fbeff97ca76fe6396a2710 100644 (file)
@@ -1,46 +1,46 @@
-USING: accessors kernel tools.test euler.b-rep euler.operators\r
-euler.modeling game.models.half-edge ;\r
-IN: euler.modeling.tests\r
-\r
-! polygon>double-face\r
-[ ] [\r
-    [\r
-        { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } { -1 1 0 } }\r
-        smooth-smooth polygon>double-face\r
-        [ face-sides 4 assert= ]\r
-        [ opposite-edge>> face-sides 4 assert= ]\r
-        [ face-normal { 0.0 0.0 1.0 } assert= ]\r
-        tri\r
-    ] make-b-rep check-b-rep\r
-] unit-test\r
-\r
-! extrude-simple\r
-[ ] [\r
-    [\r
-        { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } }\r
-        smooth-smooth polygon>double-face\r
-        1 f extrude-simple\r
-        [ face-sides 3 assert= ]\r
-        [ opposite-edge>> face-sides 4 assert= ]\r
-        bi\r
-    ] make-b-rep check-b-rep\r
-] unit-test\r
-\r
-! project-pt-line\r
-[ {  0 1 0 } ] [ {  0 0 0 } { 0 1 0 } { 1 1 0 } project-pt-line ] unit-test\r
-[ {  0 1 0 } ] [ {  0 0 0 } { 1 1 0 } { 0 1 0 } project-pt-line ] unit-test\r
-[ {  0 1 0 } ] [ {  0 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test\r
-[ { -1 1 0 } ] [ { -1 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test\r
-[ { 1/2 1/2 0 } ] [ {  0 0 0 } { 0 1 0 } { 1 0 0 } project-pt-line ] unit-test\r
-\r
-! project-pt-plane\r
-[ {  0  0  1 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -1 project-pt-plane ] unit-test\r
-[ {  0  0 -1 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 }  1 project-pt-plane ] unit-test\r
-[ {  0  0  3 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -3 project-pt-plane ] unit-test\r
-[ {  0  0  3 } ] [ { 0 0 0 } { 0 0 1 } { 0 0 -1 }  3 project-pt-plane ] unit-test\r
-[ {  0  0  1 } ] [ { 0 0 0 } { 0 0 1 } { 0 1  1 } -1 project-pt-plane ] unit-test\r
-\r
-[ { 0 2/3 1/3 } ] [ { 0 0 0 } { 0 2 1 } { 0 1  1 } -1 project-pt-plane ] unit-test\r
-\r
-[ {  0  0  1 } ] [ { 0 0 0 } { 0 0   1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test\r
-[ {  0  1  1 } ] [ { 0 0 0 } { 0 1/2 1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test\r
+USING: accessors kernel tools.test euler.b-rep euler.operators
+euler.modeling game.models.half-edge ;
+IN: euler.modeling.tests
+
+! polygon>double-face
+[ ] [
+    [
+        { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } { -1 1 0 } }
+        smooth-smooth polygon>double-face
+        [ face-sides 4 assert= ]
+        [ opposite-edge>> face-sides 4 assert= ]
+        [ face-normal { 0.0 0.0 1.0 } assert= ]
+        tri
+    ] make-b-rep check-b-rep
+] unit-test
+
+! extrude-simple
+[ ] [
+    [
+        { { -1 -1 0 } { 1 -1 0 } { 1 1 0 } }
+        smooth-smooth polygon>double-face
+        1 f extrude-simple
+        [ face-sides 3 assert= ]
+        [ opposite-edge>> face-sides 4 assert= ]
+        bi
+    ] make-b-rep check-b-rep
+] unit-test
+
+! project-pt-line
+[ {  0 1 0 } ] [ {  0 0 0 } { 0 1 0 } { 1 1 0 } project-pt-line ] unit-test
+[ {  0 1 0 } ] [ {  0 0 0 } { 1 1 0 } { 0 1 0 } project-pt-line ] unit-test
+[ {  0 1 0 } ] [ {  0 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test
+[ { -1 1 0 } ] [ { -1 0 0 } { 2 1 0 } { 1 1 0 } project-pt-line ] unit-test
+[ { 1/2 1/2 0 } ] [ {  0 0 0 } { 0 1 0 } { 1 0 0 } project-pt-line ] unit-test
+
+! project-pt-plane
+[ {  0  0  1 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -1 project-pt-plane ] unit-test
+[ {  0  0 -1 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 }  1 project-pt-plane ] unit-test
+[ {  0  0  3 } ] [ { 0 0 0 } { 0 0 1 } { 0 0  1 } -3 project-pt-plane ] unit-test
+[ {  0  0  3 } ] [ { 0 0 0 } { 0 0 1 } { 0 0 -1 }  3 project-pt-plane ] unit-test
+[ {  0  0  1 } ] [ { 0 0 0 } { 0 0 1 } { 0 1  1 } -1 project-pt-plane ] unit-test
+
+[ { 0 2/3 1/3 } ] [ { 0 0 0 } { 0 2 1 } { 0 1  1 } -1 project-pt-plane ] unit-test
+
+[ {  0  0  1 } ] [ { 0 0 0 } { 0 0   1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test
+[ {  0  1  1 } ] [ { 0 0 0 } { 0 1/2 1/2 } { 0 0 1 } -1 project-pt-plane ] unit-test