VTK-m
2.2
|
The abstract class representing the view of a rendering scene. More...
#include <View.h>
Public Member Functions | |
View (const vtkm::rendering::Scene &scene, const vtkm::rendering::Mapper &mapper, const vtkm::rendering::Canvas &canvas, const vtkm::rendering::Color &backgroundColor=vtkm::rendering::Color(0, 0, 0, 1), const vtkm::rendering::Color &foregroundColor=vtkm::rendering::Color(1, 1, 1, 1)) | |
View (const vtkm::rendering::Scene &scene, const vtkm::rendering::Mapper &mapper, const vtkm::rendering::Canvas &canvas, const vtkm::rendering::Camera &camera, const vtkm::rendering::Color &backgroundColor=vtkm::rendering::Color(0, 0, 0, 1), const vtkm::rendering::Color &foregroundColor=vtkm::rendering::Color(1, 1, 1, 1)) | |
virtual | ~View () |
const vtkm::rendering::Scene & | GetScene () const |
Specify the scene object holding the objects to render. More... | |
vtkm::rendering::Scene & | GetScene () |
Specify the scene object holding the objects to render. More... | |
void | SetScene (const vtkm::rendering::Scene &scene) |
Specify the scene object holding the objects to render. More... | |
const vtkm::rendering::Mapper & | GetMapper () const |
Specify the mapper object determining how objects are rendered. More... | |
vtkm::rendering::Mapper & | GetMapper () |
Specify the mapper object determining how objects are rendered. More... | |
const vtkm::rendering::Canvas & | GetCanvas () const |
Specify the canvas object that holds the buffer to render into. More... | |
vtkm::rendering::Canvas & | GetCanvas () |
Specify the canvas object that holds the buffer to render into. More... | |
const vtkm::rendering::WorldAnnotator & | GetWorldAnnotator () const |
const vtkm::rendering::Camera & | GetCamera () const |
Specify the perspective from which to render a scene. More... | |
vtkm::rendering::Camera & | GetCamera () |
Specify the perspective from which to render a scene. More... | |
void | SetCamera (const vtkm::rendering::Camera &camera) |
Specify the perspective from which to render a scene. More... | |
const vtkm::rendering::Color & | GetBackgroundColor () const |
Specify the color used where nothing is rendered. More... | |
void | SetBackgroundColor (const vtkm::rendering::Color &color) |
Specify the color used where nothing is rendered. More... | |
void | SetForegroundColor (const vtkm::rendering::Color &color) |
Specify the color of foreground elements. More... | |
bool | GetWorldAnnotationsEnabled () const |
void | SetWorldAnnotationsEnabled (bool val) |
void | SetRenderAnnotationsEnabled (bool val) |
bool | GetRenderAnnotationsEnabled () const |
virtual void | Paint ()=0 |
Render a scene and store the result in the canvas' buffers. More... | |
virtual void | RenderScreenAnnotations ()=0 |
virtual void | RenderWorldAnnotations ()=0 |
void | RenderAnnotations () |
void | SaveAs (const std::string &fileName) const |
Save the rendered image. More... | |
void | SetAxisColor (vtkm::rendering::Color c) |
void | ClearTextAnnotations () |
void | AddTextAnnotation (std::unique_ptr< vtkm::rendering::TextAnnotation > ann) |
void | ClearAdditionalAnnotations () |
void | AddAdditionalAnnotation (std::function< void(void)> ann) |
Protected Member Functions | |
void | SetupForWorldSpace (bool viewportClip=true) |
void | SetupForScreenSpace (bool viewportClip=false) |
Protected Attributes | |
vtkm::rendering::Color | AxisColor = vtkm::rendering::Color::white |
bool | WorldAnnotationsEnabled = true |
bool | RenderAnnotationsEnabled = true |
Private Attributes | |
std::unique_ptr< InternalData > | Internal |
The abstract class representing the view of a rendering scene.
vtkm::rendering::View::View | ( | const vtkm::rendering::Scene & | scene, |
const vtkm::rendering::Mapper & | mapper, | ||
const vtkm::rendering::Canvas & | canvas, | ||
const vtkm::rendering::Color & | backgroundColor = vtkm::rendering::Color(0, 0, 0, 1) , |
||
const vtkm::rendering::Color & | foregroundColor = vtkm::rendering::Color(1, 1, 1, 1) |
||
) |
vtkm::rendering::View::View | ( | const vtkm::rendering::Scene & | scene, |
const vtkm::rendering::Mapper & | mapper, | ||
const vtkm::rendering::Canvas & | canvas, | ||
const vtkm::rendering::Camera & | camera, | ||
const vtkm::rendering::Color & | backgroundColor = vtkm::rendering::Color(0, 0, 0, 1) , |
||
const vtkm::rendering::Color & | foregroundColor = vtkm::rendering::Color(1, 1, 1, 1) |
||
) |
|
virtual |
void vtkm::rendering::View::AddAdditionalAnnotation | ( | std::function< void(void)> | ann | ) |
void vtkm::rendering::View::AddTextAnnotation | ( | std::unique_ptr< vtkm::rendering::TextAnnotation > | ann | ) |
void vtkm::rendering::View::ClearAdditionalAnnotations | ( | ) |
void vtkm::rendering::View::ClearTextAnnotations | ( | ) |
const vtkm::rendering::Color& vtkm::rendering::View::GetBackgroundColor | ( | ) | const |
Specify the color used where nothing is rendered.
vtkm::rendering::Camera& vtkm::rendering::View::GetCamera | ( | ) |
Specify the perspective from which to render a scene.
const vtkm::rendering::Camera& vtkm::rendering::View::GetCamera | ( | ) | const |
Specify the perspective from which to render a scene.
vtkm::rendering::Canvas& vtkm::rendering::View::GetCanvas | ( | ) |
Specify the canvas object that holds the buffer to render into.
const vtkm::rendering::Canvas& vtkm::rendering::View::GetCanvas | ( | ) | const |
Specify the canvas object that holds the buffer to render into.
vtkm::rendering::Mapper& vtkm::rendering::View::GetMapper | ( | ) |
Specify the mapper object determining how objects are rendered.
const vtkm::rendering::Mapper& vtkm::rendering::View::GetMapper | ( | ) | const |
Specify the mapper object determining how objects are rendered.
|
inline |
vtkm::rendering::Scene& vtkm::rendering::View::GetScene | ( | ) |
Specify the scene object holding the objects to render.
const vtkm::rendering::Scene& vtkm::rendering::View::GetScene | ( | ) | const |
Specify the scene object holding the objects to render.
|
inline |
const vtkm::rendering::WorldAnnotator& vtkm::rendering::View::GetWorldAnnotator | ( | ) | const |
|
pure virtual |
Render a scene and store the result in the canvas' buffers.
Implemented in vtkm::rendering::View2D, vtkm::rendering::View1D, and vtkm::rendering::View3D.
void vtkm::rendering::View::RenderAnnotations | ( | ) |
|
pure virtual |
Implemented in vtkm::rendering::View2D, vtkm::rendering::View3D, and vtkm::rendering::View1D.
|
pure virtual |
Implemented in vtkm::rendering::View2D, vtkm::rendering::View3D, and vtkm::rendering::View1D.
void vtkm::rendering::View::SaveAs | ( | const std::string & | fileName | ) | const |
Save the rendered image.
If the filename ends with ".png", it will be saved in the portable network graphic format. Otherwise, the file will be saved in Netbpm portable pixmap format.
void vtkm::rendering::View::SetAxisColor | ( | vtkm::rendering::Color | c | ) |
void vtkm::rendering::View::SetBackgroundColor | ( | const vtkm::rendering::Color & | color | ) |
Specify the color used where nothing is rendered.
void vtkm::rendering::View::SetCamera | ( | const vtkm::rendering::Camera & | camera | ) |
Specify the perspective from which to render a scene.
void vtkm::rendering::View::SetForegroundColor | ( | const vtkm::rendering::Color & | color | ) |
Specify the color of foreground elements.
The foreground is typically used for annotation elements. The foreground should contrast well with the background.
|
inline |
void vtkm::rendering::View::SetScene | ( | const vtkm::rendering::Scene & | scene | ) |
Specify the scene object holding the objects to render.
|
protected |
|
protected |
|
inline |
|
protected |
|
private |
|
protected |
|
protected |