int
main(int, char *[])
{
typedef float PixelType;
typedef MeshSourceType::IdentifierArrayType IdentifierArrayType;
MeshSourceType::Pointer meshSource;
meshSource = MeshSourceType::New();
meshSource->AddTetrahedron(
meshSource->AddPoint( -1, -1, -1 ),
meshSource->AddPoint( 1, 1, -1 ),
meshSource->AddPoint( 1, -1, 1 ),
meshSource->AddPoint( -1, 1, 1 )
);
PointType p;
IdentifierArrayType idArray( 4 );
p[ 0 ] = -2;
p[ 1 ] = -2;
p[ 2 ] = -2;
idArray[ 0 ] = meshSource->AddPoint( p );
p[ 0 ] = 2;
p[ 1 ] = 2;
p[ 2 ] = -2;
idArray[ 1 ] = meshSource->AddPoint( p );
p[ 0 ] = 2;
p[ 1 ] = -2;
p[ 2 ] = 2;
idArray[ 2 ] = meshSource->AddPoint( p );
p[ 0 ] = -2;
p[ 1 ] = 2;
p[ 2 ] = 2;
idArray[ 3 ] = meshSource->AddPoint( p );
meshSource->AddTriangle( idArray[0], idArray[1], idArray[2] );
meshSource->AddTriangle( idArray[1], idArray[2], idArray[3] );
meshSource->AddTriangle( idArray[2], idArray[3], idArray[0] );
meshSource->AddTriangle( idArray[3], idArray[0], idArray[1] );
MeshType::Pointer mesh = meshSource->GetOutput();
std::cout << mesh << std::endl;
return EXIT_SUCCESS;
}