I parse obj file and try to substitute vertices in f instead of ordinal numbers.
Example f:
[[{:v 1 :vt 1 :vn 1} {:v 2 :vt 2 :vn 2} {:v 3 :vt 3 :vn 3}]
...]
But I have error
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$map$fn__5583
in line
{:v (nth v-list (dec v)) :vt (get vt-list (dec vt)) :vn (nth vn-list (dec vn))}
How I can fix it? Thanks.
My code:
(defn fill-vertex [{:keys [v vt vn]} v-list vt-list vn-list]
{:v (nth v-list (dec v)) :vt (get vt-list (dec vt)) :vn (nth vn-list (dec vn))})
(defn fill-triangle [triangle v vt vn]
(map #(fill-vertex % v vt vn) triangle))
(defn to-f-list [{:keys [f v vt vn matrix]}]
(let [v-u (->> v (map #(add-perspective % matrix) (map #(viewport %))))
vn-u (map #(add-perspective % matrix) vn)]
(map #(fill-triangle % v-u vt vn-u) f)))
add-perspectiveand the top-level function call that triggers the error.) That will help people help you. - Ashton Wiersdorf