Viskores
1.0
|
The abstract class representing the view of a rendering scene. More...
#include <View.h>
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::Scene & | GetScene () const |
Specify the scene object holding the objects to render. More... | |
viskores::rendering::Scene & | GetScene () |
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::Mapper & | GetMapper () const |
Specify the mapper object determining how objects are rendered. More... | |
viskores::rendering::Mapper & | GetMapper () |
Specify the mapper object determining how objects are rendered. More... | |
const viskores::rendering::Canvas & | GetCanvas () const |
Specify the canvas object that holds the buffer to render into. More... | |
viskores::rendering::Canvas & | GetCanvas () |
Specify the canvas object that holds the buffer to render into. More... | |
const viskores::rendering::WorldAnnotator & | GetWorldAnnotator () const |
const viskores::rendering::Camera & | GetCamera () const |
Specify the perspective from which to render a scene. More... | |
viskores::rendering::Camera & | GetCamera () |
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::Color & | GetBackgroundColor () 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 |
The abstract class representing the view of a rendering scene.
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) |
||
) |
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) |
||
) |
|
virtual |
void viskores::rendering::View::AddAdditionalAnnotation | ( | std::function< void(void)> | ann | ) |
void viskores::rendering::View::AddTextAnnotation | ( | std::unique_ptr< viskores::rendering::TextAnnotation > | ann | ) |
void viskores::rendering::View::ClearAdditionalAnnotations | ( | ) |
void viskores::rendering::View::ClearTextAnnotations | ( | ) |
const viskores::rendering::Color& viskores::rendering::View::GetBackgroundColor | ( | ) | const |
Specify the color used where nothing is rendered.
viskores::rendering::Camera& viskores::rendering::View::GetCamera | ( | ) |
Specify the perspective from which to render a scene.
const viskores::rendering::Camera& viskores::rendering::View::GetCamera | ( | ) | const |
Specify the perspective from which to render a scene.
viskores::rendering::Canvas& viskores::rendering::View::GetCanvas | ( | ) |
Specify the canvas object that holds the buffer to render into.
const viskores::rendering::Canvas& viskores::rendering::View::GetCanvas | ( | ) | const |
Specify the canvas object that holds the buffer to render into.
viskores::rendering::Mapper& viskores::rendering::View::GetMapper | ( | ) |
Specify the mapper object determining how objects are rendered.
const viskores::rendering::Mapper& viskores::rendering::View::GetMapper | ( | ) | const |
Specify the mapper object determining how objects are rendered.
|
inline |
viskores::rendering::Scene& viskores::rendering::View::GetScene | ( | ) |
Specify the scene object holding the objects to render.
const viskores::rendering::Scene& viskores::rendering::View::GetScene | ( | ) | const |
Specify the scene object holding the objects to render.
|
inline |
const viskores::rendering::WorldAnnotator& viskores::rendering::View::GetWorldAnnotator | ( | ) | const |
|
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.
void viskores::rendering::View::RenderAnnotations | ( | ) |
|
pure virtual |
Implemented in viskores::rendering::View2D, viskores::rendering::View3D, and viskores::rendering::View1D.
|
pure virtual |
Implemented in viskores::rendering::View2D, viskores::rendering::View3D, and viskores::rendering::View1D.
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.
void viskores::rendering::View::SetAxisColor | ( | viskores::rendering::Color | c | ) |
void viskores::rendering::View::SetBackgroundColor | ( | const viskores::rendering::Color & | color | ) |
Specify the color used where nothing is rendered.
void viskores::rendering::View::SetCamera | ( | const viskores::rendering::Camera & | camera | ) |
Specify the perspective from which to render a scene.
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.
|
inline |
void viskores::rendering::View::SetScene | ( | const viskores::rendering::Scene & | scene | ) |
Specify the scene object holding the objects to render.
|
protected |
|
protected |
|
inline |
|
protected |
|
private |
|
protected |
|
protected |