
/*
** This file is machine generated by the scripts/cthulhu.tcl file
*/

#include "odieInt.h"

DLLEXPORT int Odielib_Init( Tcl_Interp *interp ) {
  Tcl_Namespace *modPtr;


    /* Initialise the stubs tables. */
#ifdef USE_TCL_STUBS
    if (
        !Tcl_InitStubs(interp, "8.3", 0)
    ) {
        return TCL_ERROR;
    }
#endif

    Tcl_RegisterObjType(&matrix_tclobjtype);
    Tcl_RegisterObjType(&polygon_tclobjtype);
    Tcl_RegisterObjType(&segmentset_tclobjtype);
  if(Slicer_Init(interp)) return TCL_ERROR;
  if(TclExtra_Init(interp)) return TCL_ERROR;
  if(Wallset_Init(interp)) return TCL_ERROR;

  modPtr=Tcl_FindNamespace(interp,"affine2d",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "affine2d", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::affine2d::apply",(Tcl_ObjCmdProc *)affine2d_method_apply,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine2d::combine",(Tcl_ObjCmdProc *)affine2d_method_combine,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine2d::rotation_from_angle",(Tcl_ObjCmdProc *)affine2d_method_rotation_from_angle,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine2d::rotation_from_normal",(Tcl_ObjCmdProc *)affine2d_method_rotation_from_normal,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"affine3d",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "affine3d", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::affine3d::from_euler",(Tcl_ObjCmdProc *)affine3d_method_from_euler,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine3d::identity",(Tcl_ObjCmdProc *)affine3d_method_identity,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine3d::multiply",(Tcl_ObjCmdProc *)affine3d_method_multiply,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine3d::scale",(Tcl_ObjCmdProc *)affine3d_method_scale,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::affine3d::translation",(Tcl_ObjCmdProc *)affine3d_method_translation,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"logicset",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "logicset", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::logicset::add",(Tcl_ObjCmdProc *)logicset_method_add,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::contains",(Tcl_ObjCmdProc *)logicset_method_contains,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::create",(Tcl_ObjCmdProc *)logicset_method_create,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::empty",(Tcl_ObjCmdProc *)logicset_method_empty,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::expr_and",(Tcl_ObjCmdProc *)logicset_method_expr_and,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::expr_or",(Tcl_ObjCmdProc *)logicset_method_expr_or,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::product_intersect",(Tcl_ObjCmdProc *)logicset_method_product_intersect,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::product_missing",(Tcl_ObjCmdProc *)logicset_method_product_missing,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::product_union",(Tcl_ObjCmdProc *)logicset_method_product_union,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::product_xor",(Tcl_ObjCmdProc *)logicset_method_product_xor,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::remove",(Tcl_ObjCmdProc *)logicset_method_remove,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::sort",(Tcl_ObjCmdProc *)logicset_method_sort,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::logicset::union",(Tcl_ObjCmdProc *)logicset_method_union,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"matrix",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "matrix", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::matrix::to_affine",(Tcl_ObjCmdProc *)matrix_method_to_affine,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_cylindrical",(Tcl_ObjCmdProc *)matrix_method_to_cylindrical,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_euler",(Tcl_ObjCmdProc *)matrix_method_to_euler,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_heading",(Tcl_ObjCmdProc *)matrix_method_to_heading,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_mat2",(Tcl_ObjCmdProc *)matrix_method_to_mat2,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_mat3",(Tcl_ObjCmdProc *)matrix_method_to_mat3,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_mat4",(Tcl_ObjCmdProc *)matrix_method_to_mat4,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_null",(Tcl_ObjCmdProc *)matrix_method_to_null,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_polar",(Tcl_ObjCmdProc *)matrix_method_to_polar,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_scaler",(Tcl_ObjCmdProc *)matrix_method_to_scaler,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_spherical",(Tcl_ObjCmdProc *)matrix_method_to_spherical,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_vector_xy",(Tcl_ObjCmdProc *)matrix_method_to_vector_xy,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_vector_xyz",(Tcl_ObjCmdProc *)matrix_method_to_vector_xyz,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::matrix::to_vector_xyzw",(Tcl_ObjCmdProc *)matrix_method_to_vector_xyzw,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"odiemath",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "odiemath", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::odiemath::double_to_fuzzy",(Tcl_ObjCmdProc *)odiemath_method_double_to_fuzzy,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::fuzzy_compare",(Tcl_ObjCmdProc *)odiemath_method_fuzzy_compare,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::fuzzy_is_zero",(Tcl_ObjCmdProc *)odiemath_method_fuzzy_is_zero,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::grid_hex",(Tcl_ObjCmdProc *)odiemath_method_grid_hex,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::grid_square",(Tcl_ObjCmdProc *)odiemath_method_grid_square,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::line_circle_intersect",(Tcl_ObjCmdProc *)odiemath_method_line_circle_intersect,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::line_intersect",(Tcl_ObjCmdProc *)odiemath_method_line_intersect,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::line_overlap",(Tcl_ObjCmdProc *)odiemath_method_line_overlap,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::list_round",(Tcl_ObjCmdProc *)odiemath_method_list_round,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::list_to_int",(Tcl_ObjCmdProc *)odiemath_method_list_to_int,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_1_pi",(Tcl_ObjCmdProc *)odiemath_method_m_1_pi,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_2_pi",(Tcl_ObjCmdProc *)odiemath_method_m_2_pi,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_2_sqrtpi",(Tcl_ObjCmdProc *)odiemath_method_m_2_sqrtpi,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_e",(Tcl_ObjCmdProc *)odiemath_method_m_e,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_ln2",(Tcl_ObjCmdProc *)odiemath_method_m_ln2,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_ln10",(Tcl_ObjCmdProc *)odiemath_method_m_ln10,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_log2e",(Tcl_ObjCmdProc *)odiemath_method_m_log2e,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_log10e",(Tcl_ObjCmdProc *)odiemath_method_m_log10e,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_pi",(Tcl_ObjCmdProc *)odiemath_method_m_pi,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_pi_2",(Tcl_ObjCmdProc *)odiemath_method_m_pi_2,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_pi_4",(Tcl_ObjCmdProc *)odiemath_method_m_pi_4,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_sqrt1_2",(Tcl_ObjCmdProc *)odiemath_method_m_sqrt1_2,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::odiemath::m_sqrt2",(Tcl_ObjCmdProc *)odiemath_method_m_sqrt2,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"polygon",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "polygon", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::polygon::area",(Tcl_ObjCmdProc *)polygon_method_area,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::bbox",(Tcl_ObjCmdProc *)polygon_method_bbox,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::corners",(Tcl_ObjCmdProc *)polygon_method_corners,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::create",(Tcl_ObjCmdProc *)polygon_method_create,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::drawobj_orientation",(Tcl_ObjCmdProc *)polygon_method_drawobj_orientation,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::hexagon",(Tcl_ObjCmdProc *)polygon_method_hexagon,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::info",(Tcl_ObjCmdProc *)polygon_method_info,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::intersect",(Tcl_ObjCmdProc *)polygon_method_intersect,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::poly_place",(Tcl_ObjCmdProc *)polygon_method_poly_place,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::rectangle",(Tcl_ObjCmdProc *)polygon_method_rectangle,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::segments",(Tcl_ObjCmdProc *)polygon_method_segments,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::vector_place",(Tcl_ObjCmdProc *)polygon_method_vector_place,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::polygon::within",(Tcl_ObjCmdProc *)polygon_method_within,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"segset",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "segset", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::segset::add",(Tcl_ObjCmdProc *)segset_method_add,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::segset::create",(Tcl_ObjCmdProc *)segset_method_create,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::segset::decompose",(Tcl_ObjCmdProc *)segset_method_decompose,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::segset::rectangle",(Tcl_ObjCmdProc *)segset_method_rectangle,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vector",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vector", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vector::add",(Tcl_ObjCmdProc *)vector_add,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::dot_product",(Tcl_ObjCmdProc *)vector_dot_product,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::length",(Tcl_ObjCmdProc *)vector_method_length,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::length_squared",(Tcl_ObjCmdProc *)vector_method_length_squared,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::scale",(Tcl_ObjCmdProc *)vector_scale,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::subtract",(Tcl_ObjCmdProc *)vector_subtract,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector::to_matrix",(Tcl_ObjCmdProc *)vector_to_matrix,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vector2d",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vector2d", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vector2d::add",(Tcl_ObjCmdProc *)vector2d_method_add,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::angle",(Tcl_ObjCmdProc *)vector2d_method_angle,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::distance",(Tcl_ObjCmdProc *)vector2d_method_distance,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::dotproduct",(Tcl_ObjCmdProc *)vector2d_method_dotproduct,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::rightof",(Tcl_ObjCmdProc *)vector2d_method_rightof,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::rotate_and_size",(Tcl_ObjCmdProc *)vector2d_method_rotate_and_size,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::scale",(Tcl_ObjCmdProc *)vector2d_method_scale,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::subtract",(Tcl_ObjCmdProc *)vector2d_method_subtract,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vector2d::translate_and_zoom",(Tcl_ObjCmdProc *)vector2d_method_translate_and_zoom,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vector3d",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vector3d", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vector3d::distance",(Tcl_ObjCmdProc *)vector3d_method_distance,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vectorN",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vectorN", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vectorN::distance",(Tcl_ObjCmdProc *)vectorN_method_distance,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorN::length",(Tcl_ObjCmdProc *)vectorN_method_length,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vectorxy",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vectorxy", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vectorxy::add",(Tcl_ObjCmdProc *)vectorxy_method_add,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::angle",(Tcl_ObjCmdProc *)vectorxy_method_angle,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::distance",(Tcl_ObjCmdProc *)vectorxy_method_distance,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::dotproduct",(Tcl_ObjCmdProc *)vectorxy_method_dotproduct,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::rightof",(Tcl_ObjCmdProc *)vectorxy_method_rightof,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::rotate_and_size",(Tcl_ObjCmdProc *)vectorxy_method_rotate_and_size,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::scale",(Tcl_ObjCmdProc *)vectorxy_method_scale,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::subtract",(Tcl_ObjCmdProc *)vectorxy_method_subtract,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxy::translate_and_zoom",(Tcl_ObjCmdProc *)vectorxy_method_translate_and_zoom,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

  modPtr=Tcl_FindNamespace(interp,"vectorxyz",NULL,TCL_NAMESPACE_ONLY);
  if(!modPtr) {
    modPtr = Tcl_CreateNamespace(interp, "vectorxyz", NULL, NULL);
  }
  
  Tcl_CreateObjCommand(interp,"::vectorxyz::cross_product",(Tcl_ObjCmdProc *)vectorxyz_method_cross_product,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxyz::dot_product",(Tcl_ObjCmdProc *)vectorxyz_method_dot_product,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxyz::length",(Tcl_ObjCmdProc *)vectorxyz_method_length,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxyz::normalize",(Tcl_ObjCmdProc *)vectorxyz_method_normalize,NULL,NULL);
  Tcl_CreateObjCommand(interp,"::vectorxyz::transform",(Tcl_ObjCmdProc *)vectorxyz_method_transform,NULL,NULL);

  Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
  Tcl_Export(interp, modPtr, "[a-z]*", 1);
  

    /* Register the package. */
    if (Tcl_PkgProvide(interp, "odielib", "1.0")) return TCL_ERROR;
  return TCL_OK;
}
