Viskores  1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
viskores::rendering::View Class Referenceabstract

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

#include <View.h>

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

Public Member Functions

 View (const viskores::rendering::Scene &scene, const viskores::rendering::Mapper &mapper, const viskores::rendering::Canvas &canvas, const viskores::rendering::Color &backgroundColor=viskores::rendering::Color(0, 0, 0, 1), const viskores::rendering::Color &foregroundColor=viskores::rendering::Color(1, 1, 1, 1))
 
 View (const viskores::rendering::Scene &scene, const viskores::rendering::Mapper &mapper, const viskores::rendering::Canvas &canvas, const viskores::rendering::Camera &camera, const viskores::rendering::Color &backgroundColor=viskores::rendering::Color(0, 0, 0, 1), const viskores::rendering::Color &foregroundColor=viskores::rendering::Color(1, 1, 1, 1))
 
virtual ~View ()
 
const viskores::rendering::SceneGetScene () const
 Specify the scene object holding the objects to render. More...
 
viskores::rendering::SceneGetScene ()
 Specify the scene object holding the objects to render. More...
 
void SetScene (const viskores::rendering::Scene &scene)
 Specify the scene object holding the objects to render. More...
 
const viskores::rendering::MapperGetMapper () const
 Specify the mapper object determining how objects are rendered. More...
 
viskores::rendering::MapperGetMapper ()
 Specify the mapper object determining how objects are rendered. More...
 
const viskores::rendering::CanvasGetCanvas () const
 Specify the canvas object that holds the buffer to render into. More...
 
viskores::rendering::CanvasGetCanvas ()
 Specify the canvas object that holds the buffer to render into. More...
 
const viskores::rendering::WorldAnnotatorGetWorldAnnotator () const
 
const viskores::rendering::CameraGetCamera () const
 Specify the perspective from which to render a scene. More...
 
viskores::rendering::CameraGetCamera ()
 Specify the perspective from which to render a scene. More...
 
void SetCamera (const viskores::rendering::Camera &camera)
 Specify the perspective from which to render a scene. More...
 
const viskores::rendering::ColorGetBackgroundColor () const
 Specify the color used where nothing is rendered. More...
 
void SetBackgroundColor (const viskores::rendering::Color &color)
 Specify the color used where nothing is rendered. More...
 
void SetForegroundColor (const viskores::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 (viskores::rendering::Color c)
 
void ClearTextAnnotations ()
 
void AddTextAnnotation (std::unique_ptr< viskores::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

viskores::rendering::Color AxisColor = viskores::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]

viskores::rendering::View::View ( const viskores::rendering::Scene scene,
const viskores::rendering::Mapper mapper,
const viskores::rendering::Canvas canvas,
const viskores::rendering::Color backgroundColor = viskores::rendering::Color(0, 0, 0, 1),
const viskores::rendering::Color foregroundColor = viskores::rendering::Color(1, 1, 1, 1) 
)

◆ View() [2/2]

viskores::rendering::View::View ( const viskores::rendering::Scene scene,
const viskores::rendering::Mapper mapper,
const viskores::rendering::Canvas canvas,
const viskores::rendering::Camera camera,
const viskores::rendering::Color backgroundColor = viskores::rendering::Color(0, 0, 0, 1),
const viskores::rendering::Color foregroundColor = viskores::rendering::Color(1, 1, 1, 1) 
)

◆ ~View()

virtual viskores::rendering::View::~View ( )
virtual

Member Function Documentation

◆ AddAdditionalAnnotation()

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

◆ AddTextAnnotation()

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

◆ ClearAdditionalAnnotations()

void viskores::rendering::View::ClearAdditionalAnnotations ( )

◆ ClearTextAnnotations()

void viskores::rendering::View::ClearTextAnnotations ( )

◆ GetBackgroundColor()

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

Specify the color used where nothing is rendered.

◆ GetCamera() [1/2]

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

Specify the perspective from which to render a scene.

◆ GetCamera() [2/2]

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

Specify the perspective from which to render a scene.

◆ GetCanvas() [1/2]

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

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

◆ GetCanvas() [2/2]

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

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

◆ GetMapper() [1/2]

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

Specify the mapper object determining how objects are rendered.

◆ GetMapper() [2/2]

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

Specify the mapper object determining how objects are rendered.

◆ GetRenderAnnotationsEnabled()

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

◆ GetScene() [1/2]

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

Specify the scene object holding the objects to render.

◆ GetScene() [2/2]

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

Specify the scene object holding the objects to render.

◆ GetWorldAnnotationsEnabled()

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

◆ GetWorldAnnotator()

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

◆ Paint()

virtual void viskores::rendering::View::Paint ( )
pure virtual

Render a scene and store the result in the canvas' buffers.

Implemented in viskores::rendering::View2D, viskores::rendering::View1D, and viskores::rendering::View3D.

◆ RenderAnnotations()

void viskores::rendering::View::RenderAnnotations ( )

◆ RenderScreenAnnotations()

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

◆ RenderWorldAnnotations()

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

◆ SaveAs()

void viskores::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 viskores::rendering::View::SetAxisColor ( viskores::rendering::Color  c)

◆ SetBackgroundColor()

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

Specify the color used where nothing is rendered.

◆ SetCamera()

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

Specify the perspective from which to render a scene.

◆ SetForegroundColor()

void viskores::rendering::View::SetForegroundColor ( const viskores::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 viskores::rendering::View::SetRenderAnnotationsEnabled ( bool  val)
inline

◆ SetScene()

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

Specify the scene object holding the objects to render.

◆ SetupForScreenSpace()

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

◆ SetupForWorldSpace()

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

◆ SetWorldAnnotationsEnabled()

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

Member Data Documentation

◆ AxisColor

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

◆ Internal

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

◆ RenderAnnotationsEnabled

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

◆ WorldAnnotationsEnabled

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

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