Difference between revisions of "VTK/Tutorials/TriangleGeometryOnly"

From KitwarePublic
< VTK‎ | Tutorials
Jump to navigationJump to search
(New page: void TestWritePointSquare(const string &OutputFile, const char FileType) { //setup points vector<Point> Points; Points.push_back(Point(-1, 1, 0)); Points.push_back(Point(1, 1, 0)); ...)
 
Line 1: Line 1:
 +
<source lang="cpp">
 
void TestWritePointSquare(const string &OutputFile, const char FileType)
 
void TestWritePointSquare(const string &OutputFile, const char FileType)
 
{
 
{
Line 20: Line 21:
  
 
}
 
}
 +
</source>

Revision as of 10:00, 8 April 2009

void TestWritePointSquare(const string &OutputFile, const char FileType)
{		
	//setup points
	vector<Point> Points;
	Points.push_back(Point(-1, 1, 0));
	Points.push_back(Point(1, 1, 0));
	Points.push_back(Point(1, -1, 0));
	Points.push_back(Point(-1, -1, 0));
	
	//setup model
	ModelClass Model;
	Model.Points = Points;
	
	//write model
	
	if(FileType == 'u')
		VtuWrite(Model, OutputFile);
	else if(FileType == 'p')
		VtpWrite(Model, OutputFile);

}