int main( int , char *[] )
{
typedef SurfaceType::Pointer SurfacePointer;
SurfacePointer Surface = SurfaceType::New();
SurfaceType::PointListType list;
for( unsigned int i=0; i<3; i++)
{
SurfacePointType p;
p.SetPosition(i,i+1,i+2);
p.SetColor(1,0,0,1);
VectorType normal;
for(unsigned int j=0;j<3;j++)
{
normal[j]=j;
}
p.SetNormal(normal);
list.push_back(p);
}
Surface->GetProperty()->SetName("Surface1");
Surface->SetId(1);
Surface->SetPoints(list);
SurfaceType::PointListType pointList = Surface->GetPoints();
std::cout << "Number of points representing the surface: ";
std::cout << pointList.size() << std::endl;
SurfaceType::PointListType::const_iterator it
= Surface->GetPoints().begin();
while(it != Surface->GetPoints().end())
{
std::cout << "Position = " << (*it).GetPosition() << std::endl;
std::cout << "Normal = " << (*it).GetNormal() << std::endl;
std::cout << "Color = " << (*it).GetColor() << std::endl;
std::cout << std::endl;
it++;
}
return EXIT_SUCCESS;
}