1 ;;; guile-assimp, foreign interface to libassimp
2 ;;; Copyright (C) 2014 by Javier Sancho Fernandez <jsf at jsancho dot org>
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.
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.
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/>.
18 (define-module (assimp low-level material)
19 #:use-module (assimp low-level)
20 #:use-module (assimp low-level types)
21 #:use-module (system foreign)
22 #:export (parse-aiMaterial
23 parse-aiMaterialProperty
26 aiGetMaterialFloatArray
27 aiGetMaterialIntegerArray))
30 (define-struct-parser parse-aiMaterialProperty
32 (mSemantic unsigned-int)
34 (mDataLength unsigned-int)
38 (define-struct-parser parse-aiMaterial
40 (mNumProperties unsigned-int)
41 (mNumAllocated unsigned-int))
46 (name '("?mat.name" 0 0))
47 (twosided '("$mat.twosided" 0 0))
48 (shading-model '("$mat.shadingm" 0 0))
49 (enable-wireframe '("$mat.wireframe" 0 0))
50 (blend-func '("$mat.blend" 0 0))
51 (opacity '("$mat.opacity" 0 0))
52 (bumpscaling '("$mat.bumpscaling" 0 0))
53 (shininess '("$mat.shininess" 0 0))
54 (reflectivity '("$mat.reflectivity" 0 0))
55 (shininess-strength '("$mat.shinpercent" 0 0))
56 (refracti '("$mat.refracti" 0 0))
57 (color-diffuse '("$clr.diffuse" 0 0))
58 (color-ambient '("$clr.ambient" 0 0))
59 (color-specular '("$clr.specular" 0 0))
60 (color-emissive '("$clr.emissive" 0 0))
61 (color-transparent '("$clr.transparent" 0 0))
62 (color-reflective '("$clr.reflective" 0 0))
63 (global-background-image '("?bg.global" 0 0)))
66 (define-assimp-function (aiGetMaterialColor '* '* unsigned-int unsigned-int '*) -> int)
67 (define-assimp-function (aiGetMaterialFloatArray '* '* unsigned-int unsigned-int '* '*) -> int)
68 (define-assimp-function (aiGetMaterialIntegerArray '* '* unsigned-int unsigned-int '* '*) -> int)