当前位置: 首页>>代码示例>>C++>>正文


C++ Paint::fullName方法代码示例

本文整理汇总了C++中Paint::fullName方法的典型用法代码示例。如果您正苦于以下问题:C++ Paint::fullName方法的具体用法?C++ Paint::fullName怎么用?C++ Paint::fullName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Paint的用法示例。


在下文中一共展示了Paint::fullName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fout

void StructuralReports::
saveMaterialBoundariesBeta_2(const GridDescription & grid,
    const VoxelizedPartition & vp)
{
	ObjFile objFile;
	int ii,jj,kk;
    
	ostringstream foutname;
	foutname << grid.name() << "_faces.obj";
	ofstream fout(foutname.str().c_str());
	
    const Map<Paint*, SetupUpdateEquationPtr> materials(vp.setupMaterials());
    map<Paint*, SetupUpdateEquationPtr>::const_iterator itr;
    
    const VoxelGrid & vg(vp.voxels());
	//const StructureGrid& grid = *mStructureGrid;
	
	// We'll write the materials one at a time.
	for (itr = materials.begin(); itr != materials.end(); itr++)
    if ( (*itr).first == (*itr).first->withoutModifications())
	{
		Paint* paint = (*itr).first;
		SetupUpdateEquationPtr mat = (*itr).second;
        string name = paint->fullName();
        Rect3i roi = grid.nonPMLHalfCells();
		Paint* lastMat;
        Paint* curMat;
		
		LOGF << "Considering material " << name << endl;
		
		//fout << name << endl;
		
		vector<OrientedRect3i> xFaces;
		vector<OrientedRect3i> yFaces;
		vector<OrientedRect3i> zFaces;
		
		// Do all the face determination stuff
		{
		// X-normal faces
		//	a.  Bottom layer
		ii = roi.p1[0];
		for (kk = roi.p1[2]; kk <= roi.p2[2]; kk++)
		for (jj = roi.p1[1]; jj <= roi.p2[1]; jj++)
		{
			curMat = vg(ii, jj, kk);
			if (curMat == paint)
			{
				xFaces.push_back( OrientedRect3i(
					Rect3i(ii,jj,kk,ii,jj+1,kk+1),
					Vector3i(-1, 0, 0)) );
			}
		} 
		//	b.  Top layer
		ii = roi.p2[0];
		for (kk = roi.p1[2]; kk <= roi.p2[2]; kk++)
		for (jj = roi.p1[1]; jj <= roi.p2[1]; jj++)
		{
			curMat = vg(ii, jj, kk);
			if (curMat == paint)
			{
				xFaces.push_back( OrientedRect3i(
					Rect3i(ii+1,jj,kk,ii+1,jj+1,kk+1),
					Vector3i(1,0,0) ));
			}
		}
		//	c.  Middle (careful about X direction for-loop limits)
		for (ii = roi.p1[0]+1; ii <= roi.p2[0]; ii++)
		for (kk = roi.p1[2]; kk <= roi.p2[2]; kk++)
		for (jj = roi.p1[1]; jj <= roi.p2[1]; jj++)
		{
			lastMat = vg(ii-1, jj, kk);
			curMat = vg(ii, jj, kk);
			
			if (lastMat == paint && curMat != paint)
			{
				xFaces.push_back( OrientedRect3i(
					Rect3i(ii,jj,kk,ii,jj+1,kk+1),
					Vector3i(1, 0, 0)) );
			}
			else if (lastMat != paint && curMat == paint)
			{
				xFaces.push_back( OrientedRect3i(
					Rect3i(ii,jj,kk,ii,jj+1,kk+1),
					Vector3i(-1,0,0) ));
			}
		}
		
		// Y-normal faces
		//	a.  Top layer
		jj = roi.p1[1];
		for (ii = roi.p1[0]; ii <= roi.p2[0]; ii++)
		for (kk = roi.p1[2]; kk <= roi.p2[2]; kk++)
		{
			curMat = vg(ii, jj, kk);
			if (curMat == paint)
			{
				yFaces.push_back( OrientedRect3i(
					Rect3i(ii,jj,kk,ii+1,jj,kk+1),
					Vector3i(0, -1, 0) ));
			}
//.........这里部分代码省略.........
开发者ID:plisdku,项目名称:trogdor,代码行数:101,代码来源:StructuralReports.cpp


注:本文中的Paint::fullName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。