
;; Objects for namespace Graphene

(define-object Box
  (in-module "Graphene")
  (c-name "graphene_box_t")
  (gtype-id "GRAPHENE_BOX_T_TYPE_T")
)

(define-object Box2D
  (in-module "Graphene")
  (c-name "graphene_box2d_t")
  (gtype-id "GRAPHENE_BOX2D_T_TYPE_T")
)

(define-object Euler
  (in-module "Graphene")
  (c-name "graphene_euler_t")
  (gtype-id "GRAPHENE_EULER_T_TYPE_T")
)

(define-object Frustum
  (in-module "Graphene")
  (c-name "graphene_frustum_t")
  (gtype-id "GRAPHENE_FRUSTUM_T_TYPE_T")
)

(define-object Matrix
  (in-module "Graphene")
  (c-name "graphene_matrix_t")
  (gtype-id "GRAPHENE_MATRIX_T_TYPE_T")
)

(define-object Plane
  (in-module "Graphene")
  (c-name "graphene_plane_t")
  (gtype-id "GRAPHENE_PLANE_T_TYPE_T")
)

(define-object Point
  (in-module "Graphene")
  (c-name "graphene_point_t")
  (gtype-id "GRAPHENE_POINT_T_TYPE_T")
)

(define-object Point3D
  (in-module "Graphene")
  (c-name "graphene_point3d_t")
  (gtype-id "GRAPHENE_POINT3D_T_TYPE_T")
)

(define-object Quad
  (in-module "Graphene")
  (c-name "graphene_quad_t")
  (gtype-id "GRAPHENE_QUAD_T_TYPE_T")
)

(define-object Quaternion
  (in-module "Graphene")
  (c-name "graphene_quaternion_t")
  (gtype-id "GRAPHENE_QUATERNION_T_TYPE_T")
)

(define-object Ray
  (in-module "Graphene")
  (c-name "graphene_ray_t")
  (gtype-id "GRAPHENE_RAY_T_TYPE_T")
)

(define-object Rect
  (in-module "Graphene")
  (c-name "graphene_rect_t")
  (gtype-id "GRAPHENE_RECT_T_TYPE_T")
)

(define-object Simd4F
  (in-module "Graphene")
  (c-name "graphene_simd4f_t")
  (gtype-id "GRAPHENE_SIMD4F_T_TYPE_T")
)

(define-object Simd4X4F
  (in-module "Graphene")
  (c-name "graphene_simd4x4f_t")
  (gtype-id "GRAPHENE_SIMD4X4F_T_TYPE_T")
)

(define-object Size
  (in-module "Graphene")
  (c-name "graphene_size_t")
  (gtype-id "GRAPHENE_SIZE_T_TYPE_T")
)

(define-object Sphere
  (in-module "Graphene")
  (c-name "graphene_sphere_t")
  (gtype-id "GRAPHENE_SPHERE_T_TYPE_T")
)

(define-object Triangle
  (in-module "Graphene")
  (c-name "graphene_triangle_t")
  (gtype-id "GRAPHENE_TRIANGLE_T_TYPE_T")
)

(define-object Vec2
  (in-module "Graphene")
  (c-name "graphene_vec2_t")
  (gtype-id "GRAPHENE_VEC2_T_TYPE_T")
)

(define-object Vec3
  (in-module "Graphene")
  (c-name "graphene_vec3_t")
  (gtype-id "GRAPHENE_VEC3_T_TYPE_T")
)

(define-object Vec4
  (in-module "Graphene")
  (c-name "graphene_vec4_t")
  (gtype-id "GRAPHENE_VEC4_T_TYPE_T")
)


;; Functions for namespace Graphene

(define-function graphene_box2d_empty
  (c-name "graphene_box2d_empty")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_infinite
  (c-name "graphene_box2d_infinite")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_minus_one
  (c-name "graphene_box2d_minus_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_one
  (c-name "graphene_box2d_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_one_minus_one
  (c-name "graphene_box2d_one_minus_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_zero
  (c-name "graphene_box2d_zero")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box_empty
  (c-name "graphene_box_empty")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_infinite
  (c-name "graphene_box_infinite")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_minus_one
  (c-name "graphene_box_minus_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_one
  (c-name "graphene_box_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_one_minus_one
  (c-name "graphene_box_one_minus_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_zero
  (c-name "graphene_box_zero")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_point3d_zero
  (c-name "graphene_point3d_zero")
  (return-type "const-graphene_point3d_t*")
)

(define-function graphene_point_zero
  (c-name "graphene_point_zero")
  (return-type "const-graphene_point_t*")
)

(define-function graphene_rect_alloc
  (c-name "graphene_rect_alloc")
  (return-type "graphene_rect_t*")
)

(define-function graphene_rect_zero
  (c-name "graphene_rect_zero")
  (return-type "const-graphene_rect_t*")
)

(define-function graphene_size_zero
  (c-name "graphene_size_zero")
  (return-type "const-graphene_size_t*")
)

(define-function graphene_vec2_one
  (c-name "graphene_vec2_one")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_x_axis
  (c-name "graphene_vec2_x_axis")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_y_axis
  (c-name "graphene_vec2_y_axis")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_zero
  (c-name "graphene_vec2_zero")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec3_one
  (c-name "graphene_vec3_one")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_x_axis
  (c-name "graphene_vec3_x_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_y_axis
  (c-name "graphene_vec3_y_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_z_axis
  (c-name "graphene_vec3_z_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_zero
  (c-name "graphene_vec3_zero")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec4_one
  (c-name "graphene_vec4_one")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_w_axis
  (c-name "graphene_vec4_w_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_x_axis
  (c-name "graphene_vec4_x_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_y_axis
  (c-name "graphene_vec4_y_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_z_axis
  (c-name "graphene_vec4_z_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_zero
  (c-name "graphene_vec4_zero")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_box_empty
  (c-name "graphene_box_empty")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_infinite
  (c-name "graphene_box_infinite")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_minus_one
  (c-name "graphene_box_minus_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_one
  (c-name "graphene_box_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_one_minus_one
  (c-name "graphene_box_one_minus_one")
  (return-type "const-graphene_box_t*")
)

(define-function graphene_box_zero
  (c-name "graphene_box_zero")
  (return-type "const-graphene_box_t*")
)

(define-method contains_box
  (of-object "graphene_box_t")
  (c-name "graphene_box_contains_box")
  (return-type "bool")
  (parameters
    '("const-graphene_box_t*" "b")
  )
)

(define-method contains_point
  (of-object "graphene_box_t")
  (c-name "graphene_box_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method equal
  (of-object "graphene_box_t")
  (c-name "graphene_box_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_box_t*" "b")
  )
)

(define-method expand
  (of-object "graphene_box_t")
  (c-name "graphene_box_expand")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "point")
    '("graphene_box_t*" "res")
  )
)

(define-method expand_scalar
  (of-object "graphene_box_t")
  (c-name "graphene_box_expand_scalar")
  (return-type "none")
  (parameters
    '("float" "scalar")
    '("graphene_box_t*" "res")
  )
)

(define-method expand_vec3
  (of-object "graphene_box_t")
  (c-name "graphene_box_expand_vec3")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "vec")
    '("graphene_box_t*" "res")
  )
)

(define-method free
  (of-object "graphene_box_t")
  (c-name "graphene_box_free")
  (return-type "none")
)

(define-method get_bounding_sphere
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_bounding_sphere")
  (return-type "none")
  (parameters
    '("graphene_sphere_t*" "sphere")
  )
)

(define-method get_center
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_center")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "center")
  )
)

(define-method get_depth
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_depth")
  (return-type "float")
)

(define-method get_height
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_height")
  (return-type "float")
)

(define-method get_max
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_max")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "max")
  )
)

(define-method get_min
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_min")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "min")
  )
)

(define-method get_minmax
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_minmax")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "min")
    '("graphene_point3d_t*" "max")
  )
)

(define-method get_size
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_size")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "size")
  )
)

(define-method get_vertices
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_vertices")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "vertices")
  )
)

(define-method get_width
  (of-object "graphene_box_t")
  (c-name "graphene_box_get_width")
  (return-type "float")
)

(define-method init
  (of-object "graphene_box_t")
  (c-name "graphene_box_init")
  (return-type "graphene_box_t*")
  (parameters
    '("const-graphene_point3d_t*" "min")
    '("const-graphene_point3d_t*" "max")
  )
)

(define-method init_from_box
  (of-object "graphene_box_t")
  (c-name "graphene_box_init_from_box")
  (return-type "graphene_box_t*")
  (parameters
    '("const-graphene_box_t*" "src")
  )
)

(define-method init_from_points
  (of-object "graphene_box_t")
  (c-name "graphene_box_init_from_points")
  (return-type "graphene_box_t*")
  (parameters
    '("unsigned-int" "n_points")
    '("const-graphene_point3d_t*" "points")
  )
)

(define-method init_from_vec3
  (of-object "graphene_box_t")
  (c-name "graphene_box_init_from_vec3")
  (return-type "graphene_box_t*")
  (parameters
    '("const-graphene_vec3_t*" "min")
    '("const-graphene_vec3_t*" "max")
  )
)

(define-method init_from_vectors
  (of-object "graphene_box_t")
  (c-name "graphene_box_init_from_vectors")
  (return-type "graphene_box_t*")
  (parameters
    '("unsigned-int" "n_vectors")
    '("const-graphene_vec3_t*" "vectors")
  )
)

(define-method intersection
  (of-object "graphene_box_t")
  (c-name "graphene_box_intersection")
  (return-type "bool")
  (parameters
    '("const-graphene_box_t*" "b")
    '("graphene_box_t*" "res")
  )
)

(define-method union
  (of-object "graphene_box_t")
  (c-name "graphene_box_union")
  (return-type "none")
  (parameters
    '("const-graphene_box_t*" "b")
    '("graphene_box_t*" "res")
  )
)

(define-function graphene_box_alloc
  (c-name "graphene_box_alloc")
  (is-constructor-of "graphene_box_t")
  (return-type "graphene_box_t*")
)

(define-function graphene_box2d_empty
  (c-name "graphene_box2d_empty")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_infinite
  (c-name "graphene_box2d_infinite")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_minus_one
  (c-name "graphene_box2d_minus_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_one
  (c-name "graphene_box2d_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_one_minus_one
  (c-name "graphene_box2d_one_minus_one")
  (return-type "const-graphene_box2d_t*")
)

(define-function graphene_box2d_zero
  (c-name "graphene_box2d_zero")
  (return-type "const-graphene_box2d_t*")
)

(define-method contains_box
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_contains_box")
  (return-type "bool")
  (parameters
    '("const-graphene_box2d_t*" "b")
  )
)

(define-method contains_point
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "point")
  )
)

(define-method contains_rect
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_contains_rect")
  (return-type "bool")
  (parameters
    '("const-graphene_rect_t*" "rect")
  )
)

(define-method equal
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_box2d_t*" "b")
  )
)

(define-method expand
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_expand")
  (return-type "none")
  (parameters
    '("const-graphene_point_t*" "point")
    '("graphene_box2d_t*" "res")
  )
)

(define-method expand_scalar
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_expand_scalar")
  (return-type "none")
  (parameters
    '("float" "scalar")
    '("graphene_box2d_t*" "res")
  )
)

(define-method expand_vec2
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_expand_vec2")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "vec")
    '("graphene_box2d_t*" "res")
  )
)

(define-method free
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_free")
  (return-type "none")
)

(define-method get_center
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_center")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "center")
  )
)

(define-method get_height
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_height")
  (return-type "float")
)

(define-method get_max
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_max")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "max")
  )
)

(define-method get_min
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_min")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "min")
  )
)

(define-method get_minmax
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_minmax")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "min")
    '("graphene_point_t*" "max")
  )
)

(define-method get_size
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_size")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "size")
  )
)

(define-method get_vertices
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_vertices")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "vertices")
  )
)

(define-method get_width
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_get_width")
  (return-type "float")
)

(define-method init
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init")
  (return-type "graphene_box2d_t*")
  (parameters
    '("const-graphene_point_t*" "min")
    '("const-graphene_point_t*" "max")
  )
)

(define-method init_from_box
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init_from_box")
  (return-type "graphene_box2d_t*")
  (parameters
    '("const-graphene_box2d_t*" "src")
  )
)

(define-method init_from_points
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init_from_points")
  (return-type "graphene_box2d_t*")
  (parameters
    '("unsigned-int" "n_points")
    '("const-graphene_point_t*" "points")
  )
)

(define-method init_from_rect
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init_from_rect")
  (return-type "graphene_box2d_t*")
  (parameters
    '("const-graphene_rect_t*" "src")
  )
)

(define-method init_from_vec2
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init_from_vec2")
  (return-type "graphene_box2d_t*")
  (parameters
    '("const-graphene_vec2_t*" "min")
    '("const-graphene_vec2_t*" "max")
  )
)

(define-method init_from_vectors
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_init_from_vectors")
  (return-type "graphene_box2d_t*")
  (parameters
    '("unsigned-int" "n_vectors")
    '("const-graphene_vec2_t*" "vectors")
  )
)

(define-method intersection
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_intersection")
  (return-type "bool")
  (parameters
    '("const-graphene_box2d_t*" "b")
    '("graphene_box2d_t*" "res")
  )
)

(define-method intersects
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_intersects")
  (return-type "bool")
  (parameters
    '("const-graphene_box2d_t*" "b")
  )
)

(define-method scale_offset
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_scale_offset")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "scale")
    '("const-graphene_point_t*" "offset")
    '("graphene_box2d_t*" "res")
  )
)

(define-method to_float
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_to_float")
  (return-type "none")
  (parameters
    '("float*" "v")
  )
)

(define-method to_rect
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_to_rect")
  (return-type "none")
  (parameters
    '("graphene_rect_t*" "rect")
  )
)

(define-method union
  (of-object "graphene_box2d_t")
  (c-name "graphene_box2d_union")
  (return-type "none")
  (parameters
    '("const-graphene_box2d_t*" "b")
    '("graphene_box2d_t*" "res")
  )
)

(define-function graphene_box2d_alloc
  (c-name "graphene_box2d_alloc")
  (is-constructor-of "graphene_box2d_t")
  (return-type "graphene_box2d_t*")
)

(define-method equal
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_euler_t*" "b")
  )
)

(define-method free
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_free")
  (return-type "none")
)

(define-method get_alpha
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_alpha")
  (return-type "float")
)

(define-method get_beta
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_beta")
  (return-type "float")
)

(define-method get_gamma
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_gamma")
  (return-type "float")
)

(define-method get_order
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_order")
  (return-type "graphene_euler_order_t")
)

(define-method get_x
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_x")
  (return-type "float")
)

(define-method get_y
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_y")
  (return-type "float")
)

(define-method get_z
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_get_z")
  (return-type "float")
)

(define-method init
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init")
  (return-type "graphene_euler_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
  )
)

(define-method init_from_euler
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_from_euler")
  (return-type "graphene_euler_t*")
  (parameters
    '("const-graphene_euler_t*" "src")
  )
)

(define-method init_from_matrix
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_from_matrix")
  (return-type "graphene_euler_t*")
  (parameters
    '("const-graphene_matrix_t*" "m")
    '("graphene_euler_order_t" "order")
  )
)

(define-method init_from_quaternion
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_from_quaternion")
  (return-type "graphene_euler_t*")
  (parameters
    '("const-graphene_quaternion_t*" "q")
    '("graphene_euler_order_t" "order")
  )
)

(define-method init_from_radians
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_from_radians")
  (return-type "graphene_euler_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
    '("graphene_euler_order_t" "order")
  )
)

(define-method init_from_vec3
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_from_vec3")
  (return-type "graphene_euler_t*")
  (parameters
    '("const-graphene_vec3_t*" "v")
    '("graphene_euler_order_t" "order")
  )
)

(define-method init_with_order
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_init_with_order")
  (return-type "graphene_euler_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
    '("graphene_euler_order_t" "order")
  )
)

(define-method reorder
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_reorder")
  (return-type "none")
  (parameters
    '("graphene_euler_order_t" "order")
    '("graphene_euler_t*" "res")
  )
)

(define-method to_matrix
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_to_matrix")
  (return-type "none")
  (parameters
    '("graphene_matrix_t*" "res")
  )
)

(define-method to_quaternion
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_to_quaternion")
  (return-type "none")
  (parameters
    '("graphene_quaternion_t*" "res")
  )
)

(define-method to_vec3
  (of-object "graphene_euler_t")
  (c-name "graphene_euler_to_vec3")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-function graphene_euler_alloc
  (c-name "graphene_euler_alloc")
  (is-constructor-of "graphene_euler_t")
  (return-type "graphene_euler_t*")
)

(define-method contains_point
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method equal
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_frustum_t*" "b")
  )
)

(define-method free
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_free")
  (return-type "none")
)

(define-method get_planes
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_get_planes")
  (return-type "none")
  (parameters
    '("graphene_plane_t*" "planes")
  )
)

(define-method init
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_init")
  (return-type "graphene_frustum_t*")
  (parameters
    '("const-graphene_plane_t*" "p0")
    '("const-graphene_plane_t*" "p1")
    '("const-graphene_plane_t*" "p2")
    '("const-graphene_plane_t*" "p3")
    '("const-graphene_plane_t*" "p4")
    '("const-graphene_plane_t*" "p5")
  )
)

(define-method init_from_frustum
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_init_from_frustum")
  (return-type "graphene_frustum_t*")
  (parameters
    '("const-graphene_frustum_t*" "src")
  )
)

(define-method init_from_matrix
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_init_from_matrix")
  (return-type "graphene_frustum_t*")
  (parameters
    '("const-graphene_matrix_t*" "matrix")
  )
)

(define-method intersects_box
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_intersects_box")
  (return-type "bool")
  (parameters
    '("const-graphene_box_t*" "box")
  )
)

(define-method intersects_sphere
  (of-object "graphene_frustum_t")
  (c-name "graphene_frustum_intersects_sphere")
  (return-type "bool")
  (parameters
    '("const-graphene_sphere_t*" "sphere")
  )
)

(define-function graphene_frustum_alloc
  (c-name "graphene_frustum_alloc")
  (is-constructor-of "graphene_frustum_t")
  (return-type "graphene_frustum_t*")
)

(define-method decompose
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_decompose")
  (return-type "bool")
  (parameters
    '("graphene_vec3_t*" "translate")
    '("graphene_vec3_t*" "scale")
    '("graphene_quaternion_t*" "rotate")
    '("graphene_vec3_t*" "shear")
    '("graphene_vec4_t*" "perspective")
  )
)

(define-method determinant
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_determinant")
  (return-type "float")
)

(define-method equal
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_matrix_t*" "b")
  )
)

(define-method equal_fast
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_equal_fast")
  (return-type "bool")
  (parameters
    '("const-graphene_matrix_t*" "b")
  )
)

(define-method free
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_free")
  (return-type "none")
)

(define-method get_row
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_row")
  (return-type "none")
  (parameters
    '("unsigned-int" "index_")
    '("graphene_vec4_t*" "res")
  )
)

(define-method get_value
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_value")
  (return-type "float")
  (parameters
    '("unsigned-int" "row")
    '("unsigned-int" "col")
  )
)

(define-method get_x_scale
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_x_scale")
  (return-type "float")
)

(define-method get_x_translation
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_x_translation")
  (return-type "float")
)

(define-method get_y_scale
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_y_scale")
  (return-type "float")
)

(define-method get_y_translation
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_y_translation")
  (return-type "float")
)

(define-method get_z_scale
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_z_scale")
  (return-type "float")
)

(define-method get_z_translation
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_get_z_translation")
  (return-type "float")
)

(define-method init_from_2d
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_from_2d")
  (return-type "graphene_matrix_t*")
  (parameters
    '("double" "xx")
    '("double" "yx")
    '("double" "xy")
    '("double" "yy")
    '("double" "x_0")
    '("double" "y_0")
  )
)

(define-method init_from_float
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_from_float")
  (return-type "graphene_matrix_t*")
  (parameters
    '("const-float*" "v")
  )
)

(define-method init_from_matrix
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_from_matrix")
  (return-type "graphene_matrix_t*")
  (parameters
    '("const-graphene_matrix_t*" "src")
  )
)

(define-method init_from_vec4
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_from_vec4")
  (return-type "graphene_matrix_t*")
  (parameters
    '("const-graphene_vec4_t*" "v0")
    '("const-graphene_vec4_t*" "v1")
    '("const-graphene_vec4_t*" "v2")
    '("const-graphene_vec4_t*" "v3")
  )
)

(define-method init_frustum
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_frustum")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "left")
    '("float" "right")
    '("float" "bottom")
    '("float" "top")
    '("float" "z_near")
    '("float" "z_far")
  )
)

(define-method init_identity
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_identity")
  (return-type "graphene_matrix_t*")
)

(define-method init_look_at
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_look_at")
  (return-type "graphene_matrix_t*")
  (parameters
    '("const-graphene_vec3_t*" "eye")
    '("const-graphene_vec3_t*" "center")
    '("const-graphene_vec3_t*" "up")
  )
)

(define-method init_ortho
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_ortho")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "left")
    '("float" "right")
    '("float" "top")
    '("float" "bottom")
    '("float" "z_near")
    '("float" "z_far")
  )
)

(define-method init_perspective
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_perspective")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "fovy")
    '("float" "aspect")
    '("float" "z_near")
    '("float" "z_far")
  )
)

(define-method init_rotate
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_rotate")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "angle")
    '("const-graphene_vec3_t*" "axis")
  )
)

(define-method init_scale
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_scale")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
  )
)

(define-method init_skew
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_skew")
  (return-type "graphene_matrix_t*")
  (parameters
    '("float" "x_skew")
    '("float" "y_skew")
  )
)

(define-method init_translate
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_init_translate")
  (return-type "graphene_matrix_t*")
  (parameters
    '("const-graphene_point3d_t*" "p")
  )
)

(define-method interpolate
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_matrix_t*" "b")
    '("double" "factor")
    '("graphene_matrix_t*" "res")
  )
)

(define-method inverse
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_inverse")
  (return-type "bool")
  (parameters
    '("graphene_matrix_t*" "res")
  )
)

(define-method is_2d
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_is_2d")
  (return-type "bool")
)

(define-method is_backface_visible
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_is_backface_visible")
  (return-type "bool")
)

(define-method is_identity
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_is_identity")
  (return-type "bool")
)

(define-method is_singular
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_is_singular")
  (return-type "bool")
)

(define-method multiply
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_multiply")
  (return-type "none")
  (parameters
    '("const-graphene_matrix_t*" "b")
    '("graphene_matrix_t*" "res")
  )
)

(define-method near
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_near")
  (return-type "bool")
  (parameters
    '("const-graphene_matrix_t*" "b")
    '("float" "epsilon")
  )
)

(define-method normalize
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_normalize")
  (return-type "none")
  (parameters
    '("graphene_matrix_t*" "res")
  )
)

(define-method perspective
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_perspective")
  (return-type "none")
  (parameters
    '("float" "depth")
    '("graphene_matrix_t*" "res")
  )
)

(define-method print
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_print")
  (return-type "none")
)

(define-method project_point
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_project_point")
  (return-type "none")
  (parameters
    '("const-graphene_point_t*" "p")
    '("graphene_point_t*" "res")
  )
)

(define-method project_rect
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_project_rect")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "r")
    '("graphene_quad_t*" "res")
  )
)

(define-method project_rect_bounds
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_project_rect_bounds")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "r")
    '("graphene_rect_t*" "res")
  )
)

(define-method rotate
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate")
  (return-type "none")
  (parameters
    '("float" "angle")
    '("const-graphene_vec3_t*" "axis")
  )
)

(define-method rotate_euler
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate_euler")
  (return-type "none")
  (parameters
    '("const-graphene_euler_t*" "e")
  )
)

(define-method rotate_quaternion
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate_quaternion")
  (return-type "none")
  (parameters
    '("const-graphene_quaternion_t*" "q")
  )
)

(define-method rotate_x
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate_x")
  (return-type "none")
  (parameters
    '("float" "angle")
  )
)

(define-method rotate_y
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate_y")
  (return-type "none")
  (parameters
    '("float" "angle")
  )
)

(define-method rotate_z
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_rotate_z")
  (return-type "none")
  (parameters
    '("float" "angle")
  )
)

(define-method scale
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_scale")
  (return-type "none")
  (parameters
    '("float" "factor_x")
    '("float" "factor_y")
    '("float" "factor_z")
  )
)

(define-method skew_xy
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_skew_xy")
  (return-type "none")
  (parameters
    '("float" "factor")
  )
)

(define-method skew_xz
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_skew_xz")
  (return-type "none")
  (parameters
    '("float" "factor")
  )
)

(define-method skew_yz
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_skew_yz")
  (return-type "none")
  (parameters
    '("float" "factor")
  )
)

(define-method to_2d
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_to_2d")
  (return-type "bool")
  (parameters
    '("double*" "xx")
    '("double*" "yx")
    '("double*" "xy")
    '("double*" "yy")
    '("double*" "x_0")
    '("double*" "y_0")
  )
)

(define-method to_float
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_to_float")
  (return-type "none")
  (parameters
    '("float*" "v")
  )
)

(define-method transform_bounds
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_bounds")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "r")
    '("graphene_rect_t*" "res")
  )
)

(define-method transform_box
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_box")
  (return-type "none")
  (parameters
    '("const-graphene_box_t*" "b")
    '("graphene_box_t*" "res")
  )
)

(define-method transform_point
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_point")
  (return-type "none")
  (parameters
    '("const-graphene_point_t*" "p")
    '("graphene_point_t*" "res")
  )
)

(define-method transform_point3d
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_point3d")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "p")
    '("graphene_point3d_t*" "res")
  )
)

(define-method transform_ray
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_ray")
  (return-type "none")
  (parameters
    '("const-graphene_ray_t*" "r")
    '("graphene_ray_t*" "res")
  )
)

(define-method transform_rect
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_rect")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "r")
    '("graphene_quad_t*" "res")
  )
)

(define-method transform_sphere
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_sphere")
  (return-type "none")
  (parameters
    '("const-graphene_sphere_t*" "s")
    '("graphene_sphere_t*" "res")
  )
)

(define-method transform_vec3
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_vec3")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "v")
    '("graphene_vec3_t*" "res")
  )
)

(define-method transform_vec4
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transform_vec4")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "v")
    '("graphene_vec4_t*" "res")
  )
)

(define-method translate
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_translate")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "pos")
  )
)

(define-method transpose
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_transpose")
  (return-type "none")
  (parameters
    '("graphene_matrix_t*" "res")
  )
)

(define-method unproject_point3d
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_unproject_point3d")
  (return-type "none")
  (parameters
    '("const-graphene_matrix_t*" "modelview")
    '("const-graphene_point3d_t*" "point")
    '("graphene_point3d_t*" "res")
  )
)

(define-method untransform_bounds
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_untransform_bounds")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "r")
    '("const-graphene_rect_t*" "bounds")
    '("graphene_rect_t*" "res")
  )
)

(define-method untransform_point
  (of-object "graphene_matrix_t")
  (c-name "graphene_matrix_untransform_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "p")
    '("const-graphene_rect_t*" "bounds")
    '("graphene_point_t*" "res")
  )
)

(define-function graphene_matrix_alloc
  (c-name "graphene_matrix_alloc")
  (is-constructor-of "graphene_matrix_t")
  (return-type "graphene_matrix_t*")
)

(define-method distance
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_distance")
  (return-type "float")
  (parameters
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method equal
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_plane_t*" "b")
  )
)

(define-method free
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_free")
  (return-type "none")
)

(define-method get_constant
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_get_constant")
  (return-type "float")
)

(define-method get_normal
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_get_normal")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "normal")
  )
)

(define-method init
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_init")
  (return-type "graphene_plane_t*")
  (parameters
    '("const-graphene_vec3_t*" "normal")
    '("float" "constant")
  )
)

(define-method init_from_plane
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_init_from_plane")
  (return-type "graphene_plane_t*")
  (parameters
    '("const-graphene_plane_t*" "src")
  )
)

(define-method init_from_point
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_init_from_point")
  (return-type "graphene_plane_t*")
  (parameters
    '("const-graphene_vec3_t*" "normal")
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method init_from_points
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_init_from_points")
  (return-type "graphene_plane_t*")
  (parameters
    '("const-graphene_point3d_t*" "a")
    '("const-graphene_point3d_t*" "b")
    '("const-graphene_point3d_t*" "c")
  )
)

(define-method init_from_vec4
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_init_from_vec4")
  (return-type "graphene_plane_t*")
  (parameters
    '("const-graphene_vec4_t*" "src")
  )
)

(define-method negate
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_negate")
  (return-type "none")
  (parameters
    '("graphene_plane_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_normalize")
  (return-type "none")
  (parameters
    '("graphene_plane_t*" "res")
  )
)

(define-method transform
  (of-object "graphene_plane_t")
  (c-name "graphene_plane_transform")
  (return-type "none")
  (parameters
    '("const-graphene_matrix_t*" "matrix")
    '("const-graphene_matrix_t*" "normal_matrix")
    '("graphene_plane_t*" "res")
  )
)

(define-function graphene_plane_alloc
  (c-name "graphene_plane_alloc")
  (is-constructor-of "graphene_plane_t")
  (return-type "graphene_plane_t*")
)

(define-function graphene_point_zero
  (c-name "graphene_point_zero")
  (return-type "const-graphene_point_t*")
)

(define-method distance
  (of-object "graphene_point_t")
  (c-name "graphene_point_distance")
  (return-type "float")
  (parameters
    '("const-graphene_point_t*" "b")
    '("float*" "d_x")
    '("float*" "d_y")
  )
)

(define-method distance_squared
  (of-object "graphene_point_t")
  (c-name "graphene_point_distance_squared")
  (return-type "float")
  (parameters
    '("const-graphene_point_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_point_t")
  (c-name "graphene_point_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "b")
  )
)

(define-method free
  (of-object "graphene_point_t")
  (c-name "graphene_point_free")
  (return-type "none")
)

(define-method init
  (of-object "graphene_point_t")
  (c-name "graphene_point_init")
  (return-type "graphene_point_t*")
  (parameters
    '("float" "x")
    '("float" "y")
  )
)

(define-method init_from_point
  (of-object "graphene_point_t")
  (c-name "graphene_point_init_from_point")
  (return-type "graphene_point_t*")
  (parameters
    '("const-graphene_point_t*" "src")
  )
)

(define-method init_from_vec2
  (of-object "graphene_point_t")
  (c-name "graphene_point_init_from_vec2")
  (return-type "graphene_point_t*")
  (parameters
    '("const-graphene_vec2_t*" "src")
  )
)

(define-method interpolate
  (of-object "graphene_point_t")
  (c-name "graphene_point_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_point_t*" "b")
    '("double" "factor")
    '("graphene_point_t*" "res")
  )
)

(define-method near
  (of-object "graphene_point_t")
  (c-name "graphene_point_near")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "b")
    '("float" "epsilon")
  )
)

(define-method to_vec2
  (of-object "graphene_point_t")
  (c-name "graphene_point_to_vec2")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "v")
  )
)

(define-function graphene_point_alloc
  (c-name "graphene_point_alloc")
  (is-constructor-of "graphene_point_t")
  (return-type "graphene_point_t*")
)

(define-function graphene_point3d_zero
  (c-name "graphene_point3d_zero")
  (return-type "const-graphene_point3d_t*")
)

(define-method cross
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_cross")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "b")
    '("graphene_point3d_t*" "res")
  )
)

(define-method distance
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_distance")
  (return-type "float")
  (parameters
    '("const-graphene_point3d_t*" "b")
    '("graphene_vec3_t*" "delta")
  )
)

(define-method dot
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_dot")
  (return-type "float")
  (parameters
    '("const-graphene_point3d_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "b")
  )
)

(define-method free
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_free")
  (return-type "none")
)

(define-method init
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_init")
  (return-type "graphene_point3d_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
  )
)

(define-method init_from_point
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_init_from_point")
  (return-type "graphene_point3d_t*")
  (parameters
    '("const-graphene_point3d_t*" "src")
  )
)

(define-method init_from_vec3
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_init_from_vec3")
  (return-type "graphene_point3d_t*")
  (parameters
    '("const-graphene_vec3_t*" "v")
  )
)

(define-method interpolate
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "b")
    '("double" "factor")
    '("graphene_point3d_t*" "res")
  )
)

(define-method length
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_length")
  (return-type "float")
)

(define-method near
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_near")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "b")
    '("float" "epsilon")
  )
)

(define-method normalize
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_normalize")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "res")
  )
)

(define-method normalize_viewport
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_normalize_viewport")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "viewport")
    '("float" "z_near")
    '("float" "z_far")
    '("graphene_point3d_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_point3d_t*" "res")
  )
)

(define-method to_vec3
  (of-object "graphene_point3d_t")
  (c-name "graphene_point3d_to_vec3")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "v")
  )
)

(define-function graphene_point3d_alloc
  (c-name "graphene_point3d_alloc")
  (is-constructor-of "graphene_point3d_t")
  (return-type "graphene_point3d_t*")
)

(define-method bounds
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_bounds")
  (return-type "none")
  (parameters
    '("graphene_rect_t*" "r")
  )
)

(define-method contains
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_contains")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "p")
  )
)

(define-method free
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_free")
  (return-type "none")
)

(define-method get_point
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_get_point")
  (return-type "const-graphene_point_t*")
  (parameters
    '("unsigned-int" "index_")
  )
)

(define-method init
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_init")
  (return-type "graphene_quad_t*")
  (parameters
    '("const-graphene_point_t*" "p1")
    '("const-graphene_point_t*" "p2")
    '("const-graphene_point_t*" "p3")
    '("const-graphene_point_t*" "p4")
  )
)

(define-method init_from_points
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_init_from_points")
  (return-type "graphene_quad_t*")
  (parameters
    '("const-graphene_point_t*" "points")
  )
)

(define-method init_from_rect
  (of-object "graphene_quad_t")
  (c-name "graphene_quad_init_from_rect")
  (return-type "graphene_quad_t*")
  (parameters
    '("const-graphene_rect_t*" "r")
  )
)

(define-function graphene_quad_alloc
  (c-name "graphene_quad_alloc")
  (is-constructor-of "graphene_quad_t")
  (return-type "graphene_quad_t*")
)

(define-method add
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_add")
  (return-type "none")
  (parameters
    '("const-graphene_quaternion_t*" "b")
    '("graphene_quaternion_t*" "res")
  )
)

(define-method dot
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_dot")
  (return-type "float")
  (parameters
    '("const-graphene_quaternion_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_quaternion_t*" "b")
  )
)

(define-method free
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_free")
  (return-type "none")
)

(define-method init
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
    '("float" "w")
  )
)

(define-method init_from_angle_vec3
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_angle_vec3")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("float" "angle")
    '("const-graphene_vec3_t*" "axis")
  )
)

(define-method init_from_angles
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_angles")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("float" "deg_x")
    '("float" "deg_y")
    '("float" "deg_z")
  )
)

(define-method init_from_euler
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_euler")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("const-graphene_euler_t*" "e")
  )
)

(define-method init_from_matrix
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_matrix")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("const-graphene_matrix_t*" "m")
  )
)

(define-method init_from_quaternion
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_quaternion")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("const-graphene_quaternion_t*" "src")
  )
)

(define-method init_from_radians
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_radians")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("float" "rad_x")
    '("float" "rad_y")
    '("float" "rad_z")
  )
)

(define-method init_from_vec4
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_from_vec4")
  (return-type "graphene_quaternion_t*")
  (parameters
    '("const-graphene_vec4_t*" "src")
  )
)

(define-method init_identity
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_init_identity")
  (return-type "graphene_quaternion_t*")
)

(define-method invert
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_invert")
  (return-type "none")
  (parameters
    '("graphene_quaternion_t*" "res")
  )
)

(define-method multiply
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_multiply")
  (return-type "none")
  (parameters
    '("const-graphene_quaternion_t*" "b")
    '("graphene_quaternion_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_normalize")
  (return-type "none")
  (parameters
    '("graphene_quaternion_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_quaternion_t*" "res")
  )
)

(define-method slerp
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_slerp")
  (return-type "none")
  (parameters
    '("const-graphene_quaternion_t*" "b")
    '("float" "factor")
    '("graphene_quaternion_t*" "res")
  )
)

(define-method to_angle_vec3
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_to_angle_vec3")
  (return-type "none")
  (parameters
    '("float*" "angle")
    '("graphene_vec3_t*" "axis")
  )
)

(define-method to_angles
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_to_angles")
  (return-type "none")
  (parameters
    '("float*" "deg_x")
    '("float*" "deg_y")
    '("float*" "deg_z")
  )
)

(define-method to_matrix
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_to_matrix")
  (return-type "none")
  (parameters
    '("graphene_matrix_t*" "m")
  )
)

(define-method to_radians
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_to_radians")
  (return-type "none")
  (parameters
    '("float*" "rad_x")
    '("float*" "rad_y")
    '("float*" "rad_z")
  )
)

(define-method to_vec4
  (of-object "graphene_quaternion_t")
  (c-name "graphene_quaternion_to_vec4")
  (return-type "none")
  (parameters
    '("graphene_vec4_t*" "res")
  )
)

(define-function graphene_quaternion_alloc
  (c-name "graphene_quaternion_alloc")
  (is-constructor-of "graphene_quaternion_t")
  (return-type "graphene_quaternion_t*")
)

(define-method equal
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_ray_t*" "b")
  )
)

(define-method free
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_free")
  (return-type "none")
)

(define-method get_closest_point_to_point
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_closest_point_to_point")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "p")
    '("graphene_point3d_t*" "res")
  )
)

(define-method get_direction
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_direction")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "direction")
  )
)

(define-method get_distance_to_plane
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_distance_to_plane")
  (return-type "float")
  (parameters
    '("const-graphene_plane_t*" "p")
  )
)

(define-method get_distance_to_point
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_distance_to_point")
  (return-type "float")
  (parameters
    '("const-graphene_point3d_t*" "p")
  )
)

(define-method get_origin
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_origin")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "origin")
  )
)

(define-method get_position_at
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_get_position_at")
  (return-type "none")
  (parameters
    '("float" "t")
    '("graphene_point3d_t*" "position")
  )
)

(define-method init
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_init")
  (return-type "graphene_ray_t*")
  (parameters
    '("const-graphene_point3d_t*" "origin")
    '("const-graphene_vec3_t*" "direction")
  )
)

(define-method init_from_ray
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_init_from_ray")
  (return-type "graphene_ray_t*")
  (parameters
    '("const-graphene_ray_t*" "src")
  )
)

(define-method init_from_vec3
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_init_from_vec3")
  (return-type "graphene_ray_t*")
  (parameters
    '("const-graphene_vec3_t*" "origin")
    '("const-graphene_vec3_t*" "direction")
  )
)

(define-method intersect_box
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersect_box")
  (return-type "graphene_ray_intersection_kind_t")
  (parameters
    '("const-graphene_box_t*" "b")
    '("float*" "t_out")
  )
)

(define-method intersect_sphere
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersect_sphere")
  (return-type "graphene_ray_intersection_kind_t")
  (parameters
    '("const-graphene_sphere_t*" "s")
    '("float*" "t_out")
  )
)

(define-method intersect_triangle
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersect_triangle")
  (return-type "graphene_ray_intersection_kind_t")
  (parameters
    '("const-graphene_triangle_t*" "t")
    '("float*" "t_out")
  )
)

(define-method intersects_box
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersects_box")
  (return-type "bool")
  (parameters
    '("const-graphene_box_t*" "b")
  )
)

(define-method intersects_sphere
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersects_sphere")
  (return-type "bool")
  (parameters
    '("const-graphene_sphere_t*" "s")
  )
)

(define-method intersects_triangle
  (of-object "graphene_ray_t")
  (c-name "graphene_ray_intersects_triangle")
  (return-type "bool")
  (parameters
    '("const-graphene_triangle_t*" "t")
  )
)

(define-function graphene_ray_alloc
  (c-name "graphene_ray_alloc")
  (is-constructor-of "graphene_ray_t")
  (return-type "graphene_ray_t*")
)

(define-function graphene_rect_alloc
  (c-name "graphene_rect_alloc")
  (return-type "graphene_rect_t*")
)

(define-function graphene_rect_zero
  (c-name "graphene_rect_zero")
  (return-type "const-graphene_rect_t*")
)

(define-method contains_point
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point_t*" "p")
  )
)

(define-method contains_rect
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_contains_rect")
  (return-type "bool")
  (parameters
    '("const-graphene_rect_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_rect_t*" "b")
  )
)

(define-method expand
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_expand")
  (return-type "none")
  (parameters
    '("const-graphene_point_t*" "p")
    '("graphene_rect_t*" "res")
  )
)

(define-method free
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_free")
  (return-type "none")
)

(define-method get_area
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_area")
  (return-type "float")
)

(define-method get_bottom_left
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_bottom_left")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "p")
  )
)

(define-method get_bottom_right
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_bottom_right")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "p")
  )
)

(define-method get_center
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_center")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "p")
  )
)

(define-method get_height
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_height")
  (return-type "float")
)

(define-method get_top_left
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_top_left")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "p")
  )
)

(define-method get_top_right
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_top_right")
  (return-type "none")
  (parameters
    '("graphene_point_t*" "p")
  )
)

(define-method get_vertices
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_vertices")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "vertices")
  )
)

(define-method get_width
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_width")
  (return-type "float")
)

(define-method get_x
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_x")
  (return-type "float")
)

(define-method get_y
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_get_y")
  (return-type "float")
)

(define-method init
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_init")
  (return-type "graphene_rect_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "width")
    '("float" "height")
  )
)

(define-method init_from_rect
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_init_from_rect")
  (return-type "graphene_rect_t*")
  (parameters
    '("const-graphene_rect_t*" "src")
  )
)

(define-method inset
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_inset")
  (return-type "graphene_rect_t*")
  (parameters
    '("float" "d_x")
    '("float" "d_y")
  )
)

(define-method inset_r
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_inset_r")
  (return-type "none")
  (parameters
    '("float" "d_x")
    '("float" "d_y")
    '("graphene_rect_t*" "res")
  )
)

(define-method interpolate
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "b")
    '("double" "factor")
    '("graphene_rect_t*" "res")
  )
)

(define-method intersection
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_intersection")
  (return-type "bool")
  (parameters
    '("const-graphene_rect_t*" "b")
    '("graphene_rect_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_normalize")
  (return-type "graphene_rect_t*")
)

(define-method normalize_r
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_normalize_r")
  (return-type "none")
  (parameters
    '("graphene_rect_t*" "res")
  )
)

(define-method offset
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_offset")
  (return-type "graphene_rect_t*")
  (parameters
    '("float" "d_x")
    '("float" "d_y")
  )
)

(define-method offset_r
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_offset_r")
  (return-type "none")
  (parameters
    '("float" "d_x")
    '("float" "d_y")
    '("graphene_rect_t*" "res")
  )
)

(define-method round
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_round")
  (return-type "none")
  (parameters
    '("graphene_rect_t*" "res")
  )
)

(define-method round_extents
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_round_extents")
  (return-type "none")
  (parameters
    '("graphene_rect_t*" "res")
  )
)

(define-method round_to_pixel
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_round_to_pixel")
  (return-type "graphene_rect_t*")
)

(define-method scale
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_scale")
  (return-type "none")
  (parameters
    '("float" "s_h")
    '("float" "s_v")
    '("graphene_rect_t*" "res")
  )
)

(define-method union
  (of-object "graphene_rect_t")
  (c-name "graphene_rect_union")
  (return-type "none")
  (parameters
    '("const-graphene_rect_t*" "b")
    '("graphene_rect_t*" "res")
  )
)

(define-function graphene_size_zero
  (c-name "graphene_size_zero")
  (return-type "const-graphene_size_t*")
)

(define-method equal
  (of-object "graphene_size_t")
  (c-name "graphene_size_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_size_t*" "b")
  )
)

(define-method free
  (of-object "graphene_size_t")
  (c-name "graphene_size_free")
  (return-type "none")
)

(define-method init
  (of-object "graphene_size_t")
  (c-name "graphene_size_init")
  (return-type "graphene_size_t*")
  (parameters
    '("float" "width")
    '("float" "height")
  )
)

(define-method init_from_size
  (of-object "graphene_size_t")
  (c-name "graphene_size_init_from_size")
  (return-type "graphene_size_t*")
  (parameters
    '("const-graphene_size_t*" "src")
  )
)

(define-method interpolate
  (of-object "graphene_size_t")
  (c-name "graphene_size_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_size_t*" "b")
    '("double" "factor")
    '("graphene_size_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_size_t")
  (c-name "graphene_size_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_size_t*" "res")
  )
)

(define-function graphene_size_alloc
  (c-name "graphene_size_alloc")
  (is-constructor-of "graphene_size_t")
  (return-type "graphene_size_t*")
)

(define-method contains_point
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method distance
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_distance")
  (return-type "float")
  (parameters
    '("const-graphene_point3d_t*" "point")
  )
)

(define-method equal
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_sphere_t*" "b")
  )
)

(define-method free
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_free")
  (return-type "none")
)

(define-method get_bounding_box
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_get_bounding_box")
  (return-type "none")
  (parameters
    '("graphene_box_t*" "box")
  )
)

(define-method get_center
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_get_center")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "center")
  )
)

(define-method get_radius
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_get_radius")
  (return-type "float")
)

(define-method init
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_init")
  (return-type "graphene_sphere_t*")
  (parameters
    '("const-graphene_point3d_t*" "center")
    '("float" "radius")
  )
)

(define-method init_from_points
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_init_from_points")
  (return-type "graphene_sphere_t*")
  (parameters
    '("unsigned-int" "n_points")
    '("const-graphene_point3d_t*" "points")
    '("const-graphene_point3d_t*" "center")
  )
)

(define-method init_from_vectors
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_init_from_vectors")
  (return-type "graphene_sphere_t*")
  (parameters
    '("unsigned-int" "n_vectors")
    '("const-graphene_vec3_t*" "vectors")
    '("const-graphene_point3d_t*" "center")
  )
)

(define-method is_empty
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_is_empty")
  (return-type "bool")
)

(define-method translate
  (of-object "graphene_sphere_t")
  (c-name "graphene_sphere_translate")
  (return-type "none")
  (parameters
    '("const-graphene_point3d_t*" "point")
    '("graphene_sphere_t*" "res")
  )
)

(define-function graphene_sphere_alloc
  (c-name "graphene_sphere_alloc")
  (is-constructor-of "graphene_sphere_t")
  (return-type "graphene_sphere_t*")
)

(define-method contains_point
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_contains_point")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "p")
  )
)

(define-method equal
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_triangle_t*" "b")
  )
)

(define-method free
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_free")
  (return-type "none")
)

(define-method get_area
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_area")
  (return-type "float")
)

(define-method get_barycoords
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_barycoords")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "p")
    '("graphene_vec2_t*" "res")
  )
)

(define-method get_bounding_box
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_bounding_box")
  (return-type "none")
  (parameters
    '("graphene_box_t*" "res")
  )
)

(define-method get_midpoint
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_midpoint")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "res")
  )
)

(define-method get_normal
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_normal")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-method get_plane
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_plane")
  (return-type "none")
  (parameters
    '("graphene_plane_t*" "res")
  )
)

(define-method get_points
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_points")
  (return-type "none")
  (parameters
    '("graphene_point3d_t*" "a")
    '("graphene_point3d_t*" "b")
    '("graphene_point3d_t*" "c")
  )
)

(define-method get_uv
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_uv")
  (return-type "bool")
  (parameters
    '("const-graphene_point3d_t*" "p")
    '("const-graphene_vec2_t*" "uv_a")
    '("const-graphene_vec2_t*" "uv_b")
    '("const-graphene_vec2_t*" "uv_c")
    '("graphene_vec2_t*" "res")
  )
)

(define-method get_vertices
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_get_vertices")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "a")
    '("graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "c")
  )
)

(define-method init_from_float
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_init_from_float")
  (return-type "graphene_triangle_t*")
  (parameters
    '("const-float*" "a")
    '("const-float*" "b")
    '("const-float*" "c")
  )
)

(define-method init_from_point3d
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_init_from_point3d")
  (return-type "graphene_triangle_t*")
  (parameters
    '("const-graphene_point3d_t*" "a")
    '("const-graphene_point3d_t*" "b")
    '("const-graphene_point3d_t*" "c")
  )
)

(define-method init_from_vec3
  (of-object "graphene_triangle_t")
  (c-name "graphene_triangle_init_from_vec3")
  (return-type "graphene_triangle_t*")
  (parameters
    '("const-graphene_vec3_t*" "a")
    '("const-graphene_vec3_t*" "b")
    '("const-graphene_vec3_t*" "c")
  )
)

(define-function graphene_triangle_alloc
  (c-name "graphene_triangle_alloc")
  (is-constructor-of "graphene_triangle_t")
  (return-type "graphene_triangle_t*")
)

(define-function graphene_vec2_one
  (c-name "graphene_vec2_one")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_x_axis
  (c-name "graphene_vec2_x_axis")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_y_axis
  (c-name "graphene_vec2_y_axis")
  (return-type "const-graphene_vec2_t*")
)

(define-function graphene_vec2_zero
  (c-name "graphene_vec2_zero")
  (return-type "const-graphene_vec2_t*")
)

(define-method add
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_add")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method divide
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_divide")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method dot
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_dot")
  (return-type "float")
  (parameters
    '("const-graphene_vec2_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_vec2_t*" "v2")
  )
)

(define-method free
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_free")
  (return-type "none")
)

(define-method get_x
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_get_x")
  (return-type "float")
)

(define-method get_y
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_get_y")
  (return-type "float")
)

(define-method init
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_init")
  (return-type "graphene_vec2_t*")
  (parameters
    '("float" "x")
    '("float" "y")
  )
)

(define-method init_from_float
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_init_from_float")
  (return-type "graphene_vec2_t*")
  (parameters
    '("const-float*" "src")
  )
)

(define-method init_from_vec2
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_init_from_vec2")
  (return-type "graphene_vec2_t*")
  (parameters
    '("const-graphene_vec2_t*" "src")
  )
)

(define-method interpolate
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "v2")
    '("double" "factor")
    '("graphene_vec2_t*" "res")
  )
)

(define-method length
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_length")
  (return-type "float")
)

(define-method max
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_max")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method min
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_min")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method multiply
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_multiply")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method near
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_near")
  (return-type "bool")
  (parameters
    '("const-graphene_vec2_t*" "v2")
    '("float" "epsilon")
  )
)

(define-method negate
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_negate")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_normalize")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_vec2_t*" "res")
  )
)

(define-method subtract
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_subtract")
  (return-type "none")
  (parameters
    '("const-graphene_vec2_t*" "b")
    '("graphene_vec2_t*" "res")
  )
)

(define-method to_float
  (of-object "graphene_vec2_t")
  (c-name "graphene_vec2_to_float")
  (return-type "none")
  (parameters
    '("float*" "dest")
  )
)

(define-function graphene_vec2_alloc
  (c-name "graphene_vec2_alloc")
  (is-constructor-of "graphene_vec2_t")
  (return-type "graphene_vec2_t*")
)

(define-function graphene_vec3_one
  (c-name "graphene_vec3_one")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_x_axis
  (c-name "graphene_vec3_x_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_y_axis
  (c-name "graphene_vec3_y_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_z_axis
  (c-name "graphene_vec3_z_axis")
  (return-type "const-graphene_vec3_t*")
)

(define-function graphene_vec3_zero
  (c-name "graphene_vec3_zero")
  (return-type "const-graphene_vec3_t*")
)

(define-method add
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_add")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method cross
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_cross")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method divide
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_divide")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method dot
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_dot")
  (return-type "float")
  (parameters
    '("const-graphene_vec3_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_vec3_t*" "v2")
  )
)

(define-method free
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_free")
  (return-type "none")
)

(define-method get_x
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_x")
  (return-type "float")
)

(define-method get_xy
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_xy")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "res")
  )
)

(define-method get_xy0
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_xy0")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-method get_xyz0
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_xyz0")
  (return-type "none")
  (parameters
    '("graphene_vec4_t*" "res")
  )
)

(define-method get_xyz1
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_xyz1")
  (return-type "none")
  (parameters
    '("graphene_vec4_t*" "res")
  )
)

(define-method get_xyzw
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_xyzw")
  (return-type "none")
  (parameters
    '("float" "w")
    '("graphene_vec4_t*" "res")
  )
)

(define-method get_y
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_y")
  (return-type "float")
)

(define-method get_z
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_get_z")
  (return-type "float")
)

(define-method init
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_init")
  (return-type "graphene_vec3_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
  )
)

(define-method init_from_float
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_init_from_float")
  (return-type "graphene_vec3_t*")
  (parameters
    '("const-float*" "src")
  )
)

(define-method init_from_vec3
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_init_from_vec3")
  (return-type "graphene_vec3_t*")
  (parameters
    '("const-graphene_vec3_t*" "src")
  )
)

(define-method interpolate
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "v2")
    '("double" "factor")
    '("graphene_vec3_t*" "res")
  )
)

(define-method length
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_length")
  (return-type "float")
)

(define-method max
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_max")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method min
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_min")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method multiply
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_multiply")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method near
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_near")
  (return-type "bool")
  (parameters
    '("const-graphene_vec3_t*" "v2")
    '("float" "epsilon")
  )
)

(define-method negate
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_negate")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_normalize")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_vec3_t*" "res")
  )
)

(define-method subtract
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_subtract")
  (return-type "none")
  (parameters
    '("const-graphene_vec3_t*" "b")
    '("graphene_vec3_t*" "res")
  )
)

(define-method to_float
  (of-object "graphene_vec3_t")
  (c-name "graphene_vec3_to_float")
  (return-type "none")
  (parameters
    '("float*" "dest")
  )
)

(define-function graphene_vec3_alloc
  (c-name "graphene_vec3_alloc")
  (is-constructor-of "graphene_vec3_t")
  (return-type "graphene_vec3_t*")
)

(define-function graphene_vec4_one
  (c-name "graphene_vec4_one")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_w_axis
  (c-name "graphene_vec4_w_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_x_axis
  (c-name "graphene_vec4_x_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_y_axis
  (c-name "graphene_vec4_y_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_z_axis
  (c-name "graphene_vec4_z_axis")
  (return-type "const-graphene_vec4_t*")
)

(define-function graphene_vec4_zero
  (c-name "graphene_vec4_zero")
  (return-type "const-graphene_vec4_t*")
)

(define-method add
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_add")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method divide
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_divide")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method dot
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_dot")
  (return-type "float")
  (parameters
    '("const-graphene_vec4_t*" "b")
  )
)

(define-method equal
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_equal")
  (return-type "bool")
  (parameters
    '("const-graphene_vec4_t*" "v2")
  )
)

(define-method free
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_free")
  (return-type "none")
)

(define-method get_w
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_w")
  (return-type "float")
)

(define-method get_x
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_x")
  (return-type "float")
)

(define-method get_xy
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_xy")
  (return-type "none")
  (parameters
    '("graphene_vec2_t*" "res")
  )
)

(define-method get_xyz
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_xyz")
  (return-type "none")
  (parameters
    '("graphene_vec3_t*" "res")
  )
)

(define-method get_y
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_y")
  (return-type "float")
)

(define-method get_z
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_get_z")
  (return-type "float")
)

(define-method init
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_init")
  (return-type "graphene_vec4_t*")
  (parameters
    '("float" "x")
    '("float" "y")
    '("float" "z")
    '("float" "w")
  )
)

(define-method init_from_float
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_init_from_float")
  (return-type "graphene_vec4_t*")
  (parameters
    '("const-float*" "src")
  )
)

(define-method init_from_vec2
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_init_from_vec2")
  (return-type "graphene_vec4_t*")
  (parameters
    '("const-graphene_vec2_t*" "src")
    '("float" "z")
    '("float" "w")
  )
)

(define-method init_from_vec3
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_init_from_vec3")
  (return-type "graphene_vec4_t*")
  (parameters
    '("const-graphene_vec3_t*" "src")
    '("float" "w")
  )
)

(define-method init_from_vec4
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_init_from_vec4")
  (return-type "graphene_vec4_t*")
  (parameters
    '("const-graphene_vec4_t*" "src")
  )
)

(define-method interpolate
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_interpolate")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "v2")
    '("double" "factor")
    '("graphene_vec4_t*" "res")
  )
)

(define-method length
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_length")
  (return-type "float")
)

(define-method max
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_max")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method min
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_min")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method multiply
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_multiply")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method near
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_near")
  (return-type "bool")
  (parameters
    '("const-graphene_vec4_t*" "v2")
    '("float" "epsilon")
  )
)

(define-method negate
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_negate")
  (return-type "none")
  (parameters
    '("graphene_vec4_t*" "res")
  )
)

(define-method normalize
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_normalize")
  (return-type "none")
  (parameters
    '("graphene_vec4_t*" "res")
  )
)

(define-method scale
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_scale")
  (return-type "none")
  (parameters
    '("float" "factor")
    '("graphene_vec4_t*" "res")
  )
)

(define-method subtract
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_subtract")
  (return-type "none")
  (parameters
    '("const-graphene_vec4_t*" "b")
    '("graphene_vec4_t*" "res")
  )
)

(define-method to_float
  (of-object "graphene_vec4_t")
  (c-name "graphene_vec4_to_float")
  (return-type "none")
  (parameters
    '("float*" "dest")
  )
)

(define-function graphene_vec4_alloc
  (c-name "graphene_vec4_alloc")
  (is-constructor-of "graphene_vec4_t")
  (return-type "graphene_vec4_t*")
)

