mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Add option to enable/disable world annotations.
This commit is contained in:
parent
e2027da0c3
commit
cabaf3e269
@ -83,6 +83,12 @@ public:
|
||||
VTKM_CONT
|
||||
void SetForegroundColor(const vtkm::rendering::Color& color);
|
||||
|
||||
VTKM_CONT
|
||||
bool GetWorldAnnotationsEnabled() const { return this->WorldAnnotationsEnabled; }
|
||||
|
||||
VTKM_CONT
|
||||
void SetWorldAnnotationsEnabled(bool val) { this->WorldAnnotationsEnabled = val; }
|
||||
|
||||
VTKM_DEPRECATED(1.6, "Initialize() does nothing.")
|
||||
virtual void Initialize();
|
||||
|
||||
@ -109,6 +115,7 @@ protected:
|
||||
void RenderAnnotations();
|
||||
|
||||
vtkm::rendering::Color AxisColor = vtkm::rendering::Color::white;
|
||||
bool WorldAnnotationsEnabled = true;
|
||||
|
||||
private:
|
||||
std::shared_ptr<InternalData> Internal;
|
||||
|
@ -44,7 +44,8 @@ void View2D::Paint()
|
||||
this->UpdateCameraProperties();
|
||||
this->SetupForWorldSpace();
|
||||
this->GetScene().Render(this->GetMapper(), this->GetCanvas(), this->GetCamera());
|
||||
this->RenderWorldAnnotations();
|
||||
if (this->WorldAnnotationsEnabled)
|
||||
this->RenderWorldAnnotations();
|
||||
this->SetupForScreenSpace();
|
||||
this->RenderScreenAnnotations();
|
||||
this->RenderAnnotations();
|
||||
|
@ -43,7 +43,8 @@ void View3D::Paint()
|
||||
this->GetCanvas().Clear();
|
||||
|
||||
this->SetupForWorldSpace();
|
||||
this->RenderWorldAnnotations();
|
||||
if (this->WorldAnnotationsEnabled)
|
||||
this->RenderWorldAnnotations();
|
||||
this->GetScene().Render(this->GetMapper(), this->GetCanvas(), this->GetCamera());
|
||||
|
||||
this->SetupForScreenSpace();
|
||||
|
Loading…
Reference in New Issue
Block a user