Advertisement

使用VTK遍历Render中的actor

阅读量:

对于各类Collection的遍历操作,均可采用以下途径实现

1、Actors角色分析

复制代码
  auto actors = renderer->GetActors();

    
 	vtkCollectionSimpleIterator it;
    
 	actors->InitTraversal(it);
    
 	vtkActor* actor;
    
 	while ((actor = actors->GetNextActor(it)) != NULL) {
    
 		std::cout << actor->GetClassName() << std::endl;
    
 	}
    
    
    
    

2、actors2D模型应用分析

复制代码
  auto actors = renderer->GetActors2D();

    
 	vtkCollectionSimpleIterator it;
    
 	actors->InitTraversal(it);
    
 	vtkActor2D* actor;
    
 	while ((actor = actors->GetNextActor2D(it)) != NULL) {
    
 		std::cout << actor->G

全部评论 (0)

还没有任何评论哟~