+
+
+;;; Vectors
+
+(define-conversion-type parse-aiVector2D -> vector2d
+ (x (field 'x))
+ (y (field 'y)))
+
+(export vector2d?
+ vector2d-contents
+ vector2d-x
+ vector2d-y)
+
+(define-conversion-type parse-aiVector3D -> vector3d
+ (x (field 'x))
+ (y (field 'y))
+ (z (field 'z)))
+
+(export vector3d?
+ vector3d-contents
+ vector3d-x
+ vector3d-y
+ vector3d-z)
+
+
+;;; Colors
+
+(define-conversion-type parse-aiColor4D -> color4d
+ (r (field 'r))
+ (g (field 'g))
+ (b (field 'b))
+ (a (field 'a)))
+
+(export color4d?
+ color4d-contents
+ color4d-r
+ color4d-g
+ color4d-b
+ color4d-a)
+
+
+;;; Bones
+
+(define-conversion-type parse-aiBone -> bone
+ (name (sized-string (field 'mName)))
+ (weights (wrap
+ (array (field 'mNumWeights) (field 'mWeights) #:element-size 8 #:element-proc get-element-address)
+ wrap-vertex-weight))
+ (offset-matrix (field 'mOffsetMatrix)))
+
+(export bone?
+ bone-contents
+ bone-name
+ bone-weights
+ bone-offset-matrix)
+
+
+;;; Weights
+
+(define-conversion-type parse-aiVertexWeight -> vertex-weight
+ (vertex-id (field 'mVertexId))
+ (weight (field 'mWeight)))
+
+(export vertex-weight?
+ vertex-weight-contents
+ vertex-weight-vertex-id
+ vertex-weight-weight)