Skip to content
Snippets Groups Projects
Commit 890c60e2 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri :speech_balloon: Committed by Cory Quammen
Browse files

Support ray-traced rendering of light widget/representation

parent f60d1dc2
No related branches found
No related tags found
No related merge requests found
...@@ -332,6 +332,21 @@ int vtkLightRepresentation::RenderTranslucentPolygonalGeometry(vtkViewport* v) ...@@ -332,6 +332,21 @@ int vtkLightRepresentation::RenderTranslucentPolygonalGeometry(vtkViewport* v)
return count; return count;
} }
//------------------------------------------------------------------------------
void vtkLightRepresentation::GetActors(vtkPropCollection* pc)
{
if (pc != nullptr && this->GetVisibility())
{
pc->AddItem(this->SphereActor);
pc->AddItem(this->LineActor);
if (this->Positional)
{
pc->AddItem(this->ConeActor);
}
}
this->Superclass::GetActors(pc);
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void vtkLightRepresentation::PrintSelf(ostream& os, vtkIndent indent) void vtkLightRepresentation::PrintSelf(ostream& os, vtkIndent indent)
{ {
......
...@@ -134,6 +134,13 @@ public: ...@@ -134,6 +134,13 @@ public:
int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override; int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
///@} ///@}
/**
* These methods are necessary to make this representation behave as
* a vtkProp (i.e., support rendering).
* GetActors adds all the internal props used by this representation to the supplied collection.
*/
void GetActors(vtkPropCollection*) override;
protected: protected:
vtkLightRepresentation(); vtkLightRepresentation();
~vtkLightRepresentation() override; ~vtkLightRepresentation() override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment