Exemplo n.º 1
0
//**********************************************************************************************
bool writePOVSphere(ofstream &ofil,int nt,
                    solreal xx,solreal yy,solreal zz, solreal rr)
{
   int indlev=nt;
   string thetabs=indTabsStr(indlev);
   ofil << thetabs << "sphere { " << endl;
   indlev++; thetabs=indTabsStr(indlev);
   ofil << thetabs;
   ofil << scientific << setprecision(8);
   writePoVVector(ofil,xx,yy,zz);
   ofil << ", " << rr << endl;
   indlev--; thetabs=indTabsStr(indlev);
   ofil << thetabs << "}" << endl;
   ofil.unsetf(ios::scientific);
   return true;
}
Exemplo n.º 2
0
//**********************************************************************************************
bool writePOVCylinder(ofstream &ofil,int nt, 
                      solreal xa, solreal ya, solreal za, 
                      solreal xb, solreal yb, solreal zb, solreal rr)
{
   int indlev=nt;
   string thetabs=indTabsStr(indlev);
   ofil << thetabs << "cylinder { " << endl;
   indlev++; thetabs=indTabsStr(indlev);
   ofil << thetabs;
   ofil << scientific << setprecision(8);
   writePoVVector(ofil,xa,ya,za);
   ofil << "," << endl << thetabs;
   writePoVVector(ofil,xb,yb,zb);
   ofil << ", " << rr << endl;
   indlev--; thetabs=indTabsStr(indlev);
   ofil << thetabs << "}" << endl;
   ofil.unsetf(ios::scientific);
   return true;
}
Exemplo n.º 3
0
//**********************************************************************************************
bool writePOVTransparentSphere(ofstream &ofil,int nt,
                    solreal xx,solreal yy,solreal zz, solreal rr,
                    solreal cr,solreal cg, solreal cb,solreal trc)
{
   int indlev=nt;
   string thetabs=indTabsStr(indlev);
   ofil << thetabs << "sphere { " << endl;
   indlev++; thetabs=indTabsStr(indlev);
   ofil << thetabs;
   ofil << scientific << setprecision(8);
   writePoVVector(ofil,xx,yy,zz);
   ofil << ", " << rr << endl;
   ofil << thetabs << "pigment { rgb ";
   writePoVVector(ofil,cr,cg,cb);
   ofil << "transmit "  << trc << "}" << endl;
   indlev--; thetabs=indTabsStr(indlev);
   ofil << thetabs << "}" << endl;
   ofil.unsetf(ios::scientific);
   return true;
}