Пример #1
0
void displayGizmo(PixelImage* image, Matrix4 m) {
    int w2 = image->getWidth()/2;
    int h2 = image->getHeight()/2;
    
    Vector3 ooo(0,0,0);
    Vector3 xxx(50,0,0);
    Vector3 yyy(0,50,0);
    Vector3 zzz(0,0,50);

    ooo *= m;
    xxx *= m;
    yyy *= m;
    zzz *= m;

    ooo.x += w2; ooo.y = h2-ooo.y;
    xxx.x += w2; xxx.y = h2-xxx.y;
    yyy.x += w2; yyy.y = h2-yyy.y;
    zzz.x += w2; zzz.y = h2-zzz.y;

    DoubleColor cx = {1, 0, 0, 1};
    DoubleColor cy = {0, 1, 0, 1};
    DoubleColor cz = {0, 0, 1, 1};

    d2d::Line lx; lx.beg = ooo.view(); lx.end = xxx.view(); lx.col = cx;
    d2d::Line ly; ly.beg = ooo.view(); ly.end = yyy.view(); ly.col = cy;
    d2d::Line lz; lz.beg = ooo.view(); lz.end = zzz.view(); lz.col = cz;

    d2d::lineDotsAdapt(image, &lx, 1.0);
    d2d::lineDotsAdapt(image, &ly, 1.0);
    d2d::lineDotsAdapt(image, &lz, 1.0);
}
Пример #2
0
void how()
{
 hhh(xnxt,ynxt,h,wh);
 ooo(xnxt,ynxt,h,wo);
 www(xnxt,ynxt,h,ww);
 xnxt+=s/2;
 ttt(xnxt,ynxt,h,wt);
 ooo(xnxt,ynxt,h,wo);
 xnxt+=s/2;
 ppp(xnxt,ynxt,h,wp);
 lll(xnxt,ynxt,h,wl);
 aaa(xnxt,ynxt,h,wa);
 yyy(xnxt,ynxt,h,wy);
}
Пример #3
0
fourth()
{
 n4(xnxt,ynxt,h,w4);
 fs(xnxt,ynxt);
xnxt+=s/2;
 ggg(xnxt,ynxt,h,wg);
 aaa(xnxt,ynxt,h,wa);
 mmm(xnxt,ynxt,h,wm);
 eee(xnxt,ynxt,h,we);
xnxt+=s/2;
 ooo(xnxt,ynxt,h,wo);
 vvv(xnxt,ynxt,h,wv);
 eee(xnxt,ynxt,h,we);
 rrr(xnxt,ynxt,h,wr);
xnxt+=s/2;
 iii(xnxt,ynxt,h,wi);
 fff(xnxt,ynxt,h,wf);
xnxt+=s/2;
 yyy(xnxt,ynxt,h,wy);
 ooo(xnxt,ynxt,h,wo);
 uuu(xnxt,ynxt,h,wu);
xnxt+=s/2;
 mmm(xnxt,ynxt,h,wm);
 iii(xnxt,ynxt,h,wi);
 sss(xnxt,ynxt,h,ws);
 sss(xnxt,ynxt,h,ws);
xnxt+=s/2;
 n5(xnxt,ynxt,h,w5);
xnxt+=s/2;
 bbb(xnxt,ynxt,h,wb);
 aaa(xnxt,ynxt,h,wa);
 lll(xnxt,ynxt,h,wl);
 lll(xnxt,ynxt,h,wl);
 ooo(xnxt,ynxt,h,wo);
 ooo(xnxt,ynxt,h,wo);
 nnn(xnxt,ynxt,h,wn);
 sss(xnxt,ynxt,h,ws);
  
}
Пример #4
0
int main()
{
  yyy (GeometryAddress (temp1));
  return 0;
}
Пример #5
0
void by()
{
 bbb(xnxt,ynxt,h,wb);
 yyy(xnxt,ynxt,h,wy);
}
Пример #6
0
int main(int argc, char *argv[])
{

#ifdef HAVE_MPI
  MPI_Init(&argc, &argv);
  // define an Epetra communicator
  Epetra_MpiComm Comm(MPI_COMM_WORLD);
#else
  Epetra_SerialComm Comm;
#endif

  // check number of processes
  if (Comm.NumProc() != 1) {
    if (Comm.MyPID() == 0)
      cerr << "*ERR* can be used only with one process" << endl;
#ifdef HAVE_MPI
    MPI_Finalize();
#endif
    exit(EXIT_SUCCESS);
  }

  // process 0 will read an HB matrix, and store it
  // in the MSR format given by the arrays bindx and val
  int N_global;
  int N_nonzeros;
  double * val = NULL;
  int * bindx = NULL;
  double * x = NULL, * b = NULL, * xexact = NULL;

  FILE* fp = fopen("../HBMatrices/fidap005.rua", "r");
  if (fp == 0)
  {
    cerr << "Matrix file not available" << endl;
#ifdef HAVE_MPI
    MPI_Finalize();
#endif
    exit(EXIT_SUCCESS);
  }
  fclose(fp);

  Trilinos_Util_read_hb("../HBMatrices/fidap005.rua", 0,
      &N_global, &N_nonzeros,
      &val, &bindx,
      &x, &b, &xexact);

  // assign all the elements to process 0
  // (this code can run ONLY with one process, extensions to more
  // processes will require functions to handle update of ghost nodes)
  Epetra_Map Map(N_global,0,Comm);

  MSRMatrix A(Map,bindx,val);

  // define two vectors
  Epetra_Vector xxx(Map);
  Epetra_Vector yyy(Map);

  xxx.Random();

  A.Apply(xxx,yyy);

  cout << yyy;

  double norm2;
  yyy.Norm2(&norm2);

  cout << norm2 << endl;

  // free memory allocated by Trilinos_Util_read_hb
  if (val != NULL) free((void*)val);
  if (bindx != NULL) free((void*)bindx);
  if (x != NULL) free((void*)x);
  if (b != NULL) free((void*)b);
  if (xexact != NULL) free((void*)xexact);;

#ifdef HAVE_MPI
  MPI_Finalize();
#endif

  return(EXIT_SUCCESS);

} /* main */
Пример #7
0
inline void foo_inlined()
{
    yyy(foo);
}
Пример #8
0
int main2 () {
  yyy();
  xxx();
}
Пример #9
0
void xxx  ( void ) { yyy(); }