VTK-m  2.1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
vtkm::rendering::View Class Referenceabstract

The abstract class representing the view of a rendering scene. More...

#include <View.h>

Inheritance diagram for vtkm::rendering::View:
vtkm::rendering::View1D vtkm::rendering::View2D vtkm::rendering::View3D

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::SceneGetScene () const
 Specify the scene object holding the objects to render. More...
 
vtkm::rendering::SceneGetScene ()
 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::MapperGetMapper () const
 Specify the mapper object determining how objects are rendered. More...
 
vtkm::rendering::MapperGetMapper ()
 Specify the mapper object determining how objects are rendered. More...
 
const vtkm::rendering::CanvasGetCanvas () const
 Specify the canvas object that holds the buffer to render into. More...
 
vtkm::rendering::CanvasGetCanvas ()
 Specify the canvas object that holds the buffer to render into. More...
 
const vtkm::rendering::WorldAnnotatorGetWorldAnnotator () const
 
const vtkm::rendering::CameraGetCamera () const
 Specify the perspective from which to render a scene. More...
 
vtkm::rendering::CameraGetCamera ()
 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::ColorGetBackgroundColor () 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
 

Detailed Description

The abstract class representing the view of a rendering scene.

Constructor & Destructor Documentation

◆ View() [1/2]

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) 
)

◆ View() [2/2]

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) 
)

◆ ~View()

virtual vtkm::rendering::View::~View ( )
virtual

Member Function Documentation

◆ AddAdditionalAnnotation()

void vtkm::rendering::View::AddAdditionalAnnotation ( std::function< void(void)>  ann)

◆ AddTextAnnotation()

void vtkm::rendering::View::AddTextAnnotation ( std::unique_ptr< vtkm::rendering::TextAnnotation ann)

◆ ClearAdditionalAnnotations()

void vtkm::rendering::View::ClearAdditionalAnnotations ( )

◆ ClearTextAnnotations()

void vtkm::rendering::View::ClearTextAnnotations ( )

◆ GetBackgroundColor()

const vtkm::rendering::Color& vtkm::rendering::View::GetBackgroundColor ( ) const

Specify the color used where nothing is rendered.

◆ GetCamera() [1/2]

vtkm::rendering::Camera& vtkm::rendering::View::GetCamera ( )

Specify the perspective from which to render a scene.

◆ GetCamera() [2/2]

const vtkm::rendering::Camera& vtkm::rendering::View::GetCamera ( ) const

Specify the perspective from which to render a scene.

◆ GetCanvas() [1/2]

vtkm::rendering::Canvas& vtkm::rendering::View::GetCanvas ( )

Specify the canvas object that holds the buffer to render into.

◆ GetCanvas() [2/2]

const vtkm::rendering::Canvas& vtkm::rendering::View::GetCanvas ( ) const

Specify the canvas object that holds the buffer to render into.

◆ GetMapper() [1/2]

vtkm::rendering::Mapper& vtkm::rendering::View::GetMapper ( )

Specify the mapper object determining how objects are rendered.

◆ GetMapper() [2/2]

const vtkm::rendering::Mapper& vtkm::rendering::View::GetMapper ( ) const

Specify the mapper object determining how objects are rendered.

◆ GetRenderAnnotationsEnabled()

bool vtkm::rendering::View::GetRenderAnnotationsEnabled ( ) const
inline

◆ GetScene() [1/2]

vtkm::rendering::Scene& vtkm::rendering::View::GetScene ( )

Specify the scene object holding the objects to render.

◆ GetScene() [2/2]

const vtkm::rendering::Scene& vtkm::rendering::View::GetScene ( ) const

Specify the scene object holding the objects to render.

◆ GetWorldAnnotationsEnabled()

bool vtkm::rendering::View::GetWorldAnnotationsEnabled ( ) const
inline

◆ GetWorldAnnotator()

const vtkm::rendering::WorldAnnotator& vtkm::rendering::View::GetWorldAnnotator ( ) const

◆ Paint()

virtual void vtkm::rendering::View::Paint ( )
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.

◆ RenderAnnotations()

void vtkm::rendering::View::RenderAnnotations ( )

◆ RenderScreenAnnotations()

virtual void vtkm::rendering::View::RenderScreenAnnotations ( )
pure virtual

◆ RenderWorldAnnotations()

virtual void vtkm::rendering::View::RenderWorldAnnotations ( )
pure virtual

◆ SaveAs()

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.

◆ SetAxisColor()

void vtkm::rendering::View::SetAxisColor ( vtkm::rendering::Color  c)

◆ SetBackgroundColor()

void vtkm::rendering::View::SetBackgroundColor ( const vtkm::rendering::Color color)

Specify the color used where nothing is rendered.

◆ SetCamera()

void vtkm::rendering::View::SetCamera ( const vtkm::rendering::Camera camera)

Specify the perspective from which to render a scene.

◆ SetForegroundColor()

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.

◆ SetRenderAnnotationsEnabled()

void vtkm::rendering::View::SetRenderAnnotationsEnabled ( bool  val)
inline

◆ SetScene()

void vtkm::rendering::View::SetScene ( const vtkm::rendering::Scene scene)

Specify the scene object holding the objects to render.

◆ SetupForScreenSpace()

void vtkm::rendering::View::SetupForScreenSpace ( bool  viewportClip = false)
protected

◆ SetupForWorldSpace()

void vtkm::rendering::View::SetupForWorldSpace ( bool  viewportClip = true)
protected

◆ SetWorldAnnotationsEnabled()

void vtkm::rendering::View::SetWorldAnnotationsEnabled ( bool  val)
inline

Member Data Documentation

◆ AxisColor

vtkm::rendering::Color vtkm::rendering::View::AxisColor = vtkm::rendering::Color::white
protected

◆ Internal

std::unique_ptr<InternalData> vtkm::rendering::View::Internal
private

◆ RenderAnnotationsEnabled

bool vtkm::rendering::View::RenderAnnotationsEnabled = true
protected

◆ WorldAnnotationsEnabled

bool vtkm::rendering::View::WorldAnnotationsEnabled = true
protected

The documentation for this class was generated from the following file: