{
myMapper = vtkPolyDataMapper::New();
myAxis[ 0 ] = myAxis[ 1 ] = myAxis[ 2 ] = 0;
- myPresent = vtkActorCollection::New();
mySize = 100;
SetInfinitive( true );
myColor[ 0 ] = myColor[ 1 ] = myColor[ 1 ] = -1;
GEOM_VTKTrihedron::~GEOM_VTKTrihedron()
{
- myPresent->RemoveAllItems();
- myPresent->Delete();
for ( int i = 0; i < 3; i++ )
myAxis[i]->Delete();
void GEOM_VTKTrihedron::RemoveFromRender( vtkRenderer* theRenderer )
{
- myPresent->InitTraversal();
- while(vtkActor* anActor = myPresent->GetNextActor())
- theRenderer->RemoveActor(anActor);
+ for(int i = 0; i < 3; i++)
+ {
+ myAxis[i]->RemoveFromRender(theRenderer);
+ }
+
+ theRenderer->RemoveActor( this );
}
int GEOM_VTKTrihedron::GetVisibleActorCount(vtkRenderer* theRenderer)
virtual bool hasHighlight() { return false; }
protected:
- vtkActorCollection* myPresent;
VTKViewer_Axis* myAxis[3];
vtkPolyDataMapper* myMapper;
float mySize;