Mercurial > cortex
diff org/sense-util.org @ 167:9e6a30b8c99a
renamed some functions in eyes.org
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 04 Feb 2012 04:07:25 -0700 |
parents | c33a8e5fe7bc |
children | 0f1c7921d967 |
line wrap: on
line diff
1.1 --- a/org/sense-util.org Sat Feb 04 03:38:05 2012 -0700 1.2 +++ b/org/sense-util.org Sat Feb 04 04:07:25 2012 -0700 1.3 @@ -13,7 +13,8 @@ 1.4 (cortex.import/mega-import-jme3) 1.5 (import ij.process.ImageProcessor) 1.6 (import java.awt.image.BufferedImage) 1.7 - 1.8 +(use 'cortex.util) 1.9 +(import jme3tools.converters.ImageToAwt) 1.10 1.11 (defn meta-data [blender-node key] 1.12 (if-let [data (.getUserData blender-node "properties")] 1.13 @@ -181,6 +182,13 @@ 1.14 (seq (.getChildren sense-node)) 1.15 (do (println-repl "could not find" parent-name "node") [])))) 1.16 1.17 +(defn load-image 1.18 + "Load an image as a BufferedImage using the asset-manager system." 1.19 + [asset-relative-path] 1.20 + (ImageToAwt/convert 1.21 + (.getImage (.loadTexture (asset-manager) asset-relative-path)) 1.22 + false false 0)) 1.23 + 1.24 1.25 #+end_src 1.26