comparison org/sense.org @ 211:97b8caf66824

added continuation links
author Robert McIntyre <rlm@mit.edu>
date Thu, 09 Feb 2012 05:36:47 -0700
parents d5c597a7aed4
children f283c62bd212
comparison
equal deleted inserted replaced
210:384ed3437948 211:97b8caf66824
416 Here is some example code which shows how a camera bound to a blue box 416 Here is some example code which shows how a camera bound to a blue box
417 with =(bind-sense)= moves as the box is buffeted by white cannonballs. 417 with =(bind-sense)= moves as the box is buffeted by white cannonballs.
418 418
419 #+name: test 419 #+name: test
420 #+begin_src clojure 420 #+begin_src clojure
421 (ns cortex.test.sense
422 (:use (cortex world util sense vision))
423 (:import
424 java.io.File
425 (com.jme3.math Vector3f ColorRGBA)
426 (com.aurellem.capture RatchetTimer Capture)))
427
428 (defn test-bind-sense 421 (defn test-bind-sense
429 "Show a camera that stays in the same relative position to a blue 422 "Show a camera that stays in the same relative position to a blue
430 cube." 423 cube."
431 [] 424 []
432 (let [eye-pos (Vector3f. 0 30 0) 425 (let [eye-pos (Vector3f. 0 30 0)
505 #+begin_src sh :results silent 498 #+begin_src sh :results silent
506 cd /home/r/proj/cortex/render/ 499 cd /home/r/proj/cortex/render/
507 ffmpeg -r 60 -b 9000k -i bind-sense/%07d.png bind-sense.ogg 500 ffmpeg -r 60 -b 9000k -i bind-sense/%07d.png bind-sense.ogg
508 #+end_src 501 #+end_src
509 502
510 * Bookkeeping 503 * Headers
511 Here is the header for this namespace, included for completness. 504 #+name: sense-header
512 #+name: header
513 #+begin_src clojure 505 #+begin_src clojure
514 (ns cortex.sense 506 (ns cortex.sense
515 "Here are functions useful in the construction of two or more 507 "Here are functions useful in the construction of two or more
516 sensors/effectors." 508 sensors/effectors."
517 {:author "Robert McInytre"} 509 {:author "Robert McInytre"}
527 (:import javax.imageio.ImageIO) 519 (:import javax.imageio.ImageIO)
528 (:import java.io.File) 520 (:import java.io.File)
529 (:import (javax.swing JPanel JFrame SwingUtilities))) 521 (:import (javax.swing JPanel JFrame SwingUtilities)))
530 #+end_src 522 #+end_src
531 523
524 #+name: test-header
525 #+begin_src clojure
526 (ns cortex.test.sense
527 (:use (cortex world util sense vision))
528 (:import
529 java.io.File
530 (com.jme3.math Vector3f ColorRGBA)
531 (com.aurellem.capture RatchetTimer Capture)))
532 #+end_src
533
532 * Source Listing 534 * Source Listing
533 Full source: [[../src/cortex/sense.clj][sense.clj]] 535 - [[../src/cortex/sense.clj][cortex.sense]]
536 - [[../src/cortex/test/sense.clj][cortex.test.sense]]
537 - [[../assets/Models/subtitles/subtitles.blend][subtitles.blend]]
538 - [[../assets/Models/subtitles/Lake_CraterLake03_sm.hdr][subtitles reflection map]]
539 #+html: <ul> <li> <a href="../org/sense.org">This org file</a> </li> </ul>
540
541 * Next
542 Now that some of the preliminaries are out of the way, in the [[./body.org][next
543 post]] I'll create a simulated body.
534 544
535 545
536 * COMMENT generate source 546 * COMMENT generate source
537 #+begin_src clojure :tangle ../src/cortex/sense.clj 547 #+begin_src clojure :tangle ../src/cortex/sense.clj
538 <<header>> 548 <<sense-header>>
539 <<blender-1>> 549 <<blender-1>>
540 <<blender-2>> 550 <<blender-2>>
541 <<topology-1>> 551 <<topology-1>>
542 <<topology-2>> 552 <<topology-2>>
543 <<node-1>> 553 <<node-1>>
544 <<node-2>> 554 <<node-2>>
545 <<view-senses>> 555 <<view-senses>>
546 #+end_src 556 #+end_src
547 557
548 #+begin_src clojure :tangle ../src/cortex/test/sense.clj 558 #+begin_src clojure :tangle ../src/cortex/test/sense.clj
559 <<test-header>>
549 <<test>> 560 <<test>>
550 #+end_src 561 #+end_src