Skip to content
Snippets Groups Projects
Commit e714b8b2 authored by Vladimír Ulman's avatar Vladimír Ulman
Browse files

Rendering can distinguish triangles.

parent 077f5e72
No related branches found
No related tags found
No related merge requests found
......@@ -650,7 +650,7 @@ int ActiveMesh::ImportVTK_Ftree(const char *filename,bool resetMesh)
}
void ActiveMesh::RenderMask(i3d::Image3d<i3d::GRAY16>& mask)
void ActiveMesh::RenderMask(i3d::Image3d<i3d::GRAY16>& mask,const bool showTriangles)
{
//time savers: resolution
const float xRes=mask.GetResolution().GetX();
......@@ -687,7 +687,8 @@ void ActiveMesh::RenderMask(i3d::Image3d<i3d::GRAY16>& mask)
const int y=(int)roundf( (v.y-yOff) *yRes);
const int z=(int)roundf( (v.z-zOff) *zRes);
if (mask.Include(x,y,z)) mask.SetVoxel(x,y,z,short(i));
short val=(showTriangles)? short(i%5 *30 +100) : 200;
if (mask.Include(x,y,z)) mask.SetVoxel(x,y,z,val);
}
}
}
......
......@@ -107,7 +107,7 @@ class ActiveMesh
std::vector<float> segToRadius;
size_t PointsFirstOffset;
void RenderMask(i3d::Image3d<i3d::GRAY16>& mask);
void RenderMask(i3d::Image3d<i3d::GRAY16>& mask,const bool showTriangles=false);
void RenderMaskB(i3d::Image3d<i3d::GRAY16>& mask);
void CenterMesh(const Vector3F& newCentre);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment