Bug Report and a solution: vtkLODProp3D::GetActors(vtkPropCollection *ac)
Jorrit Schaap
jorrit at lkeb.azl.nl
Thu May 25 13:16:23 EDT 2000
Hi,
I found a bug in the class vtkLODProp3D. If you ask for its actors with
the method GetActors(vtkPropCollection *ac) then it doesn't check its
props if they truely are an actor. So, IMHO the lines:
ac->AddItem(this->LODs[index].Prop3D);
should be replaced by:
if(this->LODs[index].Prop3D->IsA("vtkActor"))
ac->AddItem(this->LODs[index].Prop3D);
so the complete function will look like:
void vtkLODProp3D::GetActors(vtkPropCollection *ac)
{
vtkDebugMacro(<< "vtkLODProp3D::GetActors");
int index = 0;
if (this->AutomaticPickLODSelection)
{
if ( this->SelectedLODIndex < 0 ||
this->SelectedLODIndex >= this->NumberOfEntries )
{
index = this->GetAutomaticPickPropIndex();
}
else
{
index = this->SelectedLODIndex;
}
if(this->LODs[index].Prop3D->IsA("vtkActor"))
ac->AddItem(this->LODs[index].Prop3D);
}
else
{
if (this->PreviousPickProp)
{
this->PreviousPickProp->SetPickMethod(NULL, NULL);
}
index = this->ConvertIDToIndex(this->SelectedPickLODID);
if (index == VTK_INVALID_LOD_INDEX)
{
return;
}
if(this->LODs[index].Prop3D->IsA("vtkActor"))
ac->AddItem(this->LODs[index].Prop3D);
}
}
Maybe its even better to replace it by:
if( ! this->LODs[index].Prop3D->IsA("vtkVolume"))
ac->AddItem(this->LODs[index].Prop3D);
but that's up to the Kitware guys.
Kind regards, Jorrit Schaap.
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list