FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_vis_subimage_composite_vr.c
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 FrontISTR Commons
3  * This software is released under the MIT License, see LICENSE.txt
4  *****************************************************************************/
5 
7 
8 void composite_subimage_vr(int pesize, int *pe_id, int pixn, double *n_subimage,
9  double *n_subopa, double *subimage) {
10  int i, j, pe_no;
11  double acc_opa, r, g, b;
12 
13  for (j = 0; j < pixn; j++) {
14  pe_no = pe_id[0];
15  subimage[j * 3 + 0] = n_subimage[pe_no * pixn * 3 + j * 3 + 0];
16  subimage[j * 3 + 1] = n_subimage[pe_no * pixn * 3 + j * 3 + 1];
17  subimage[j * 3 + 2] = n_subimage[pe_no * pixn * 3 + j * 3 + 2];
18  acc_opa = n_subopa[pe_no * pixn + j];
19  i = 0;
20  while ((acc_opa < 0.99) && (i < pesize - 1)) {
21  i++;
22  pe_no = pe_id[i];
23  r = n_subimage[pe_no * pixn * 3 + j * 3];
24  g = n_subimage[pe_no * pixn * 3 + j * 3 + 1];
25  b = n_subimage[pe_no * pixn * 3 + j * 3 + 2];
26  subimage[j * 3] += r * (1.0 - acc_opa);
27  subimage[j * 3 + 1] += g * (1.0 - acc_opa);
28  subimage[j * 3 + 2] += b * (1.0 - acc_opa);
29  acc_opa += n_subopa[pe_no * pixn + j] * (1.0 - acc_opa);
30  }
31  }
32  return;
33 }
composite_subimage_vr
void composite_subimage_vr(int pesize, int *pe_id, int pixn, double *n_subimage, double *n_subopa, double *subimage)
Definition: hecmw_vis_subimage_composite_vr.c:8
hecmw_vis_subimage_composite_vr.h