Advertisement
mantielero

Untitled

Nov 5th, 2022
1,406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.71 KB | None | 0 0
  1. /* Generated by Nim Compiler v1.6.6 */
  2. /* Compiled for: Linux, amd64, gcc */
  3. /* Command for C compiler:
  4.    g++ -c -std=gnu++14 -funsigned-char  -w -fmax-errors=3 -fpermissive -I/usr/include/opencascade/ -O3 -fno-strict-aliasing -fno-ident   -I/home/jose/.choosenim/toolchains/nim-1.6.6/lib -I/home/jose/src/nimlang/occt.nim/examples -o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer02.nim.cpp.o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer02.nim.cpp */
  5. #define NIM_INTBITS 64
  6.  
  7. #include "nimbase.h"
  8. #include "Standard_Handle.hxx"
  9. #include "Aspect_DisplayConnection.hxx"
  10. #include "Standard_Transient.hxx"
  11. #include "OpenGl_GraphicDriver.hxx"
  12. #include "Graphic3d_GraphicDriver.hxx"
  13. #include "OpenGl_Caps.hxx"
  14. #include "Xw_Window.hxx"
  15. #include "Aspect_Window.hxx"
  16. #include "V3d_Viewer.hxx"
  17. #include "V3d_View.hxx"
  18. #include "V3d_TypeOfView.hxx"
  19. #include "Graphic3d_TypeOfShadingModel.hxx"
  20. #include "Quantity_Color.hxx"
  21. #include "Quantity_NameOfColor.hxx"
  22. #include "Graphic3d_Camera.hxx"
  23. #include "Aspect_TypeOfTriedronPosition.hxx"
  24. #include "V3d_TypeOfVisualization.hxx"
  25. #undef LANGUAGE_C
  26. #undef MIPSEB
  27. #undef MIPSEL
  28. #undef PPC
  29. #undef R3000
  30. #undef R4000
  31. #undef i386
  32. #undef linux
  33. #undef mips
  34. #undef near
  35. #undef far
  36. #undef powerpc
  37. #undef unix
  38. #define nimfr_(x, y)
  39. #define nimln_(x, y)
  40. typedef opencascade::handle<Aspect_DisplayConnection> TY__keu8dJZTmN1bTjmh2YTMeA;
  41. typedef opencascade::handle<OpenGl_GraphicDriver> TY__FZHdszn6vruH9aCoz9aCktYQ;
  42. typedef opencascade::handle<Xw_Window> TY__LyS0CtE7Da8V9c3SncboSbA;
  43. typedef opencascade::handle<Graphic3d_GraphicDriver> TY__WzQHB9c9cwo6CTGferBwI78g;
  44. typedef opencascade::handle<V3d_Viewer> TY__47tV2K1aaSZXiNrxUNujaw;
  45. typedef opencascade::handle<V3d_View> TY__icTQkUhVkd9cEc0gJ9c2VwPg;
  46. typedef opencascade::handle<Aspect_Window> TY__yB86VfuSyzthqado7ziZgg;
  47. static N_INLINE(void, initStackBottomWith)(void* locals);
  48. N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
  49. N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
  50. N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
  51. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
  52. N_LIB_PRIVATE TY__keu8dJZTmN1bTjmh2YTMeA aDisplay__viewer4850_8;
  53. N_LIB_PRIVATE TY__FZHdszn6vruH9aCoz9aCktYQ aGlDriver__viewer4850_16;
  54. N_LIB_PRIVATE TY__LyS0CtE7Da8V9c3SncboSbA aWindow__viewer4850_26;
  55. N_LIB_PRIVATE TY__WzQHB9c9cwo6CTGferBwI78g theDriver__viewer4850_28;
  56. N_LIB_PRIVATE TY__47tV2K1aaSZXiNrxUNujaw aViewer__viewer4850_36;
  57. N_LIB_PRIVATE TY__icTQkUhVkd9cEc0gJ9c2VwPg aView__viewer4850_44;
  58. N_LIB_PRIVATE NIM_BOOL tmp__viewer4850_48;
  59. N_LIB_PRIVATE TY__yB86VfuSyzthqado7ziZgg theWindow__viewer4850_53;
  60. static N_INLINE(void, initStackBottomWith)(void* locals) {
  61.     nimGC_setStackBottom(locals);
  62. }
  63.  
  64. N_LIB_PRIVATE void PreMainInner(void) {
  65. }
  66.  
  67. N_LIB_PRIVATE int cmdCount;
  68. N_LIB_PRIVATE char** cmdLine;
  69. N_LIB_PRIVATE char** gEnv;
  70. N_LIB_PRIVATE void PreMain(void) {
  71.     void (*volatile inner)(void);
  72.     inner = PreMainInner;
  73.     systemDatInit000();
  74.     initStackBottomWith((void *)&inner);
  75.     systemInit000();
  76.     (*inner)();
  77. }
  78.  
  79. N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
  80.     NimMainModule();
  81. }
  82.  
  83. N_CDECL(void, NimMain)(void) {
  84.     void (*volatile inner)(void);
  85.     PreMain();
  86.     inner = NimMainInner;
  87.     initStackBottomWith((void *)&inner);
  88.     (*inner)();
  89. }
  90.  
  91. int main(int argc, char** args, char** env) {
  92.     cmdLine = args;
  93.     cmdCount = argc;
  94.     gEnv = env;
  95.     NimMain();
  96.     return nim_program_result;
  97. }
  98.  
  99. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
  100. {
  101.     aDisplay__viewer4850_8 = opencascade::handle<Aspect_DisplayConnection>((new Aspect_DisplayConnection()));
  102.     aGlDriver__viewer4850_16 = opencascade::handle<OpenGl_GraphicDriver>((new OpenGl_GraphicDriver(aDisplay__viewer4850_8, NIM_TRUE)));
  103.     (* aGlDriver__viewer4850_16).ChangeOptions().swapInterval = ((int) 1);
  104.     aWindow__viewer4850_26 = opencascade::handle<Xw_Window>((new Xw_Window(aDisplay__viewer4850_8, "Window Title", ((int) 0), ((int) 0), ((int) 640), ((int) 480))));
  105.     aViewer__viewer4850_36 = opencascade::handle<V3d_Viewer>((new V3d_Viewer(theDriver__viewer4850_28)));
  106.     aView__viewer4850_44 = opencascade::handle<V3d_View>((new V3d_View(aViewer__viewer4850_36, ((V3d_TypeOfView) 0))));
  107.     tmp__viewer4850_48 = (* aView__viewer4850_44).SetImmediateUpdate(NIM_FALSE);
  108.     (* aView__viewer4850_44).SetShadingModel(((Graphic3d_TypeOfShadingModel) 3));
  109.     (* aView__viewer4850_44).SetWindow(theWindow__viewer4850_53, NIM_NIL);
  110.     (* aView__viewer4850_44).SetBackgroundColor(Quantity_Color(((Quantity_NameOfColor) 182)));
  111.     (* (* aView__viewer4850_44).Camera()).SetProjectionType(((Graphic3d_Camera::Projection) 0));
  112.     (* aView__viewer4850_44).TriedronDisplay(((Aspect_TypeOfTriedronPosition) 0), Quantity_Color(((Quantity_NameOfColor) 508)), 0.02f, ((V3d_TypeOfVisualization) 0));
  113. }
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement