Changeset 3778 for trunk/packages/vizservers/vtkvis/GraphicsObject.h
- Timestamp:
- Jul 10, 2013, 9:41:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/GraphicsObject.h
r3683 r3778 14 14 #include <vtkSmartPointer.h> 15 15 #include <vtkProp.h> 16 #include <vtkActor2D.h> 16 17 #include <vtkProp3D.h> 17 18 #include <vtkProp3DCollection.h> 18 19 #include <vtkAssembly.h> 19 20 #include <vtkActor.h> 21 #include <vtkImageActor.h> 20 22 #include <vtkVolume.h> 21 23 #include <vtkProperty.h> 24 #include <vtkImageProperty.h> 22 25 #include <vtkVolumeProperty.h> 23 26 #include <vtkMath.h> … … 114 117 115 118 /** 119 * \brief Cast the vktProp to a vtkActor2D 120 * 121 * \return NULL or a vtkActor2D pointer 122 */ 123 inline vtkActor2D *getActor2D() 124 { 125 return vtkActor2D::SafeDownCast(_prop); 126 } 127 128 /** 116 129 * \brief Cast the vktProp to a vtkProp3D 117 130 * … … 131 144 { 132 145 return vtkActor::SafeDownCast(_prop); 146 } 147 148 /** 149 * \brief Cast the vktProp to a vtkImageActor 150 * 151 * \return NULL or a vtkImageActor pointer 152 */ 153 inline vtkImageActor *getImageActor() 154 { 155 return vtkImageActor::SafeDownCast(_prop); 133 156 } 134 157 … … 484 507 TRACE("Culling on"); 485 508 } 486 } 487 } 509 } else if (vtkImageActor::SafeDownCast(prop) != NULL) { 510 vtkImageActor::SafeDownCast(prop)->GetProperty()->SetOpacity(opacity); 511 } 512 } 513 } else if (getImageActor() != NULL) { 514 getImageActor()->GetProperty()->SetOpacity(_opacity); 488 515 } 489 516 } … … 504 531 if (getActor() != NULL) { 505 532 getActor()->GetProperty()->SetAmbient(ambient); 533 } else if (getImageActor() != NULL) { 534 getImageActor()->GetProperty()->SetAmbient(ambient); 506 535 } else if (getVolume() != NULL) { 507 536 getVolume()->GetProperty()->SetAmbient(ambient); … … 513 542 if (vtkActor::SafeDownCast(prop) != NULL) { 514 543 vtkActor::SafeDownCast(prop)->GetProperty()->SetAmbient(ambient); 544 } else if (vtkImageActor::SafeDownCast(prop) != NULL) { 545 vtkImageActor::SafeDownCast(prop)->GetProperty()->SetAmbient(ambient); 515 546 } else if (vtkVolume::SafeDownCast(prop) != NULL) { 516 547 vtkVolume::SafeDownCast(prop)->GetProperty()->SetAmbient(ambient); … … 527 558 if (getActor() != NULL) { 528 559 getActor()->GetProperty()->SetDiffuse(diffuse); 560 } else if (getImageActor() != NULL) { 561 getImageActor()->GetProperty()->SetDiffuse(diffuse); 529 562 } else if (getVolume() != NULL) { 530 563 getVolume()->GetProperty()->SetDiffuse(diffuse); … … 536 569 if (vtkActor::SafeDownCast(prop) != NULL) { 537 570 vtkActor::SafeDownCast(prop)->GetProperty()->SetDiffuse(diffuse); 571 } else if (vtkImageActor::SafeDownCast(prop) != NULL) { 572 vtkImageActor::SafeDownCast(prop)->GetProperty()->SetDiffuse(diffuse); 538 573 } else if (vtkVolume::SafeDownCast(prop) != NULL) { 539 574 vtkVolume::SafeDownCast(prop)->GetProperty()->SetDiffuse(diffuse); … … 581 616 property->SetSpecular(specular); 582 617 property->SetSpecularPower(specPower); 618 } else if (getImageActor() != NULL) { 619 vtkImageProperty *property = getImageActor()->GetProperty(); 620 property->SetAmbient(ambient); 621 property->SetDiffuse(diffuse); 583 622 } else if (getVolume() != NULL) { 584 623 vtkVolumeProperty *property = getVolume()->GetProperty(); … … 598 637 property->SetSpecular(specular); 599 638 property->SetSpecularPower(specPower); 639 } else if (vtkImageActor::SafeDownCast(prop) != NULL) { 640 vtkImageProperty *property = vtkImageActor::SafeDownCast(prop)->GetProperty(); 641 property->SetAmbient(ambient); 642 property->SetDiffuse(diffuse); 600 643 } else if (vtkVolume::SafeDownCast(prop) != NULL) { 601 644 vtkVolumeProperty *property = vtkVolume::SafeDownCast(prop)->GetProperty();
Note: See TracChangeset
for help on using the changeset viewer.