]> git.jsancho.org Git - guile-assimp.git/blob - src/low-level/postprocess.scm
A lot of functionality added
[guile-assimp.git] / src / low-level / postprocess.scm
1 ;;; guile-assimp, foreign interface to libassimp
2 ;;; Copyright (C) 2014 by Javier Sancho Fernandez <jsf at jsancho dot org>
3 ;;;
4 ;;; This program is free software: you can redistribute it and/or modify
5 ;;; it under the terms of the GNU General Public License as published by
6 ;;; the Free Software Foundation, either version 3 of the License, or
7 ;;; (at your option) any later version.
8 ;;;
9 ;;; This program is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ;;; GNU General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17
18 (define-module (assimp low-level postprocess)
19   #:use-module (assimp low-level)
20   #:export (ai-process-steps
21             ai-process-convert-to-left-handed
22             ai-process-preset-target-realtime-fast
23             ai-process-preset-target-realtime-quality
24             ai-process-preset-target-realtime-max-quality))
25
26
27 (define-bitfield
28   ai-process-steps
29   (calc-tangent-space #x1)
30   (join-identical-vertices #x2)
31   (make-left-handed #x4)
32   (triangulate #x8)
33   (remove-component #x10)
34   (gen-normals #x20)
35   (gen-smooth-normals #x40)
36   (split-large-meshes #x80)
37   (pretransform-vertices #x100)
38   (limit-bone-weights #x200)
39   (validate-data-structure #x400)
40   (improve-cache-locality #x800)
41   (remove-redundant-materials #x1000)
42   (fix-infacing-normals #x2000)
43   (sort-by-ptype #x8000)
44   (find-degenerates #x10000)
45   (find-invalid-data #x20000)
46   (gen-UV-coords #x40000)
47   (transform-UV-coords #x80000)
48   (find-instances #x100000)
49   (optimize-meshes #x200000)
50   (optimize-graph #x400000)
51   (flip-UVs #x800000)
52   (flip-winding-order #x1000000)
53   (split-by-bone-count #x2000000)
54   (debone #x4000000))
55
56 (define ai-process-convert-to-left-handed
57   (ai-process-steps
58    make-left-handed
59    flip-UVs
60    flip-winding-order))
61
62 (define ai-process-preset-target-realtime-fast
63   (ai-process-steps
64    calc-tangent-space
65    gen-normals
66    join-identical-vertices
67    triangulate
68    gen-UV-coords
69    sort-by-ptype))
70
71 (define ai-process-preset-target-realtime-quality
72   (ai-process-steps
73    calc-tangent-space
74    gen-smooth-normals
75    join-identical-vertices
76    improve-cache-locality
77    limit-bone-weights
78    remove-redundant-materials
79    split-large-meshes
80    triangulate
81    gen-UV-coords
82    sort-by-ptype
83    find-degenerates
84    find-invalid-data))
85
86 (define ai-process-preset-target-realtime-max-quality
87   (+ ai-process-preset-target-realtime-quality
88      (ai-process-steps
89       find-instances
90       validate-data-structure
91       optimize-meshes
92       debone)))