1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
void location_of_virus(vector<Virus>&virus,double& times,int& iv,ofstream& data_file,vector<Direction>& direction_v,vector<Virus>&virus_engulf,circle&cell_c,circle&nuclei_c, vector<Virus>&replicate, int step)
{
int a;
int b;
//int nc,cc,cmc,nci;
float dis_c, dis_n;
int virus_size= virus.size();
//type = "virus";
for(int i =0; i<virus_size; i++)
{
a = virus[i].getx();
b = virus[i].gety();
//to check where the virus is in location to the environment
dis_c = cell_c.distance(a,b);
dis_n = nuclei_c.distance(a,b);
if(dis_n < 5)
{
location =" Inside Nucleus";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<"\n";
replication(virus,a,b,times,iv,data_file,i,direction_v,replicate,step);
}
else if(dis_n ==5)
{
location = "Nucleus";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<"\n";
nucleus(virus,a,b,times,iv,data_file,i,direction_v,step);
}
else if(dis_c <25 && dis_n>5)
{
location = "Cytoplasm";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<"\n";
cytoplasm(virus,a,b,times,iv,data_file,p,direction_v,step);
}
else if(dis_c ==25)
{
location = "Cell Membrane";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<"\n";
endocytosis(virus,a,b,times,iv, data_file,i,direction_v,virus_engulf,cell_c,nuclei_c);
}
else if (((a ==0 || a == 50 || a>0 || a<50)&& (b ==0 || b == 50 || b>0 || b<50)) && dis_c>15)
{
location ="Extracellular Matrix";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<direction_v[i]<<"\t"<<location<<"\n";
}
else
{
location ="Left the System";
cout<<i+1<<"\t"<<virus[i]<<"\t"<<location<<endl;
data_file<<i+1<<"\t"<<virus[i]<<"\t"<<location<<"\n";
}
}
}
|