Graphics-VTK
view release on metacpan or search on metacpan
examples/old_examples/graphics/Decimate.pl view on Meta::CPAN
StartProgress($connect,"Connectivity...");
}
);
$connect->SetProgressMethod(
sub
{
ShowProgress($connect,"Connectivity...");
}
);
$connect->SetEndMethod(
sub
{
EndProgress();
}
);
$tri = Graphics::VTK::TriangleFilter->new;
$tri->SetStartMethod(
sub
{
StartProgress($tri,"Triangulating...");
}
);
$tri->SetProgressMethod(
sub
{
ShowProgress($tri,"Triangulating...");
}
);
$tri->SetEndMethod(
sub
{
EndProgress();
}
);
$normals = Graphics::VTK::PolyDataNormals->new;
$normals->SetStartMethod(
sub
{
StartProgress($normals,"Generating Normals...");
}
);
$normals->SetProgressMethod(
sub
{
ShowProgress($normals,"Generating Normals...");
}
);
$normals->SetEndMethod(
sub
{
EndProgress();
}
);
#
######################################## Create top-level GUI
#
$MW->title("vtk Decimator v1.0");
$MW->{'.mbar'} = $MW->Frame('-relief','raised','-bd',2);
$MW->{'.mbar'}->pack('-side','top','-fill','x');
#
$MW->{'.mbar.file'} = $MW->{'.mbar'}->Menubutton('-text','File');
$MW->{'.mbar.edit'} = $MW->{'.mbar'}->Menubutton('-text','Edit');
$MW->{'.mbar.view'} = $MW->{'.mbar'}->Menubutton('-text','View');
$MW->{'.mbar.options'} = $MW->{'.mbar'}->Menubutton('-text','Options');
$MW->{'.mbar.help'} = $MW->{'.mbar'}->Menubutton('-text','Help');
foreach $_ (($MW->{'.mbar.file'},$MW->{'.mbar.edit'},$MW->{'.mbar.view'},$MW->{'.mbar.options'}))
{
$_->pack('-side','left');
}
$MW->{'.mbar.help'}->pack('-side','right');
#
# menu .mbar.file.menu
$MW->{'.mbar.file'}->command('-label','Open','-command',
sub
{
OpenFile();
}
);
$MW->{'.mbar.file'}->command('-label','Save','-state','disabled','-command',
sub
{
SaveFile();
}
);
$MW->{'.mbar.file'}->command('-label','Exit','-command',
sub
{
exit();
}
);
#
# menu .mbar.edit.menu
$MW->{'.mbar.edit'}->command('-label','Clean','-state','disabled','-command',
sub
{
Clean();
}
);
$MW->{'.mbar.edit'}->command('-label','Connectivity','-state','disabled','-command',
sub
{
Connect();
}
);
$MW->{'.mbar.edit'}->command('-label','Decimate','-state','disabled','-command',
sub
{
Decimate();
}
);
$MW->{'.mbar.edit'}->command('-label','Normals','-state','disabled','-command',
sub
{
Normals();
}
);
$MW->{'.mbar.edit'}->command('-label','Smooth','-state','disabled','-command',
sub
{
Smooth();
}
);
$MW->{'.mbar.edit'}->command('-label','Triangulate','-state','disabled','-command',
sub
{
( run in 0.804 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )