VTK-m  2.1
Public Member Functions | List of all members
vtkm::rendering::CanvasRayTracer Class Reference

Represents the image space that is the target of rendering using the internal ray tracing code. More...

#include <CanvasRayTracer.h>

Inheritance diagram for vtkm::rendering::CanvasRayTracer:
vtkm::rendering::Canvas

Public Member Functions

 CanvasRayTracer (vtkm::Id width=1024, vtkm::Id height=1024)
 Construct a canvas of a given width and height. More...
 
 ~CanvasRayTracer ()
 
vtkm::rendering::CanvasNewCopy () const override
 Create a new Canvas object of the same subtype as this one. More...
 
void WriteToCanvas (const vtkm::rendering::raytracing::Ray< vtkm::Float32 > &rays, const vtkm::cont::ArrayHandle< vtkm::Float32 > &colors, const vtkm::rendering::Camera &camera)
 
void WriteToCanvas (const vtkm::rendering::raytracing::Ray< vtkm::Float64 > &rays, const vtkm::cont::ArrayHandle< vtkm::Float64 > &colors, const vtkm::rendering::Camera &camera)
 
- Public Member Functions inherited from vtkm::rendering::Canvas
 Canvas (vtkm::Id width=1024, vtkm::Id height=1024)
 Construct a canvas of a given width and height. More...
 
virtual ~Canvas ()
 
virtual void Clear ()
 Clear out the image buffers. More...
 
virtual void BlendBackground ()
 Blend the foreground data with the background color. More...
 
vtkm::Id GetWidth () const
 The width of the image. More...
 
vtkm::Id GetHeight () const
 The height of the image. More...
 
const ColorBufferTypeGetColorBuffer () const
 Get the color channels of the image. More...
 
ColorBufferTypeGetColorBuffer ()
 Get the color channels of the image. More...
 
const DepthBufferTypeGetDepthBuffer () const
 Get the depth channel of the image. More...
 
DepthBufferTypeGetDepthBuffer ()
 Get the depth channel of the image. More...
 
vtkm::cont::DataSet GetDataSet (const std::string &colorFieldName="color", const std::string &depthFieldName="depth") const
 Gets the image in this Canvas as a vtkm::cont::DataSet. More...
 
vtkm::cont::DataSet GetDataSet (const char *colorFieldName, const char *depthFieldName="depth") const
 Gets the image in this Canvas as a vtkm::cont::DataSet. More...
 
void ResizeBuffers (vtkm::Id width, vtkm::Id height)
 Change the size of the image. More...
 
const vtkm::rendering::ColorGetBackgroundColor () const
 Specify the background color. More...
 
void SetBackgroundColor (const vtkm::rendering::Color &color)
 Specify the background color. More...
 
const vtkm::rendering::ColorGetForegroundColor () const
 Specify the foreground color used for annotations. More...
 
void SetForegroundColor (const vtkm::rendering::Color &color)
 Specify the foreground color used for annotations. More...
 
vtkm::Id2 GetScreenPoint (vtkm::Float32 x, vtkm::Float32 y, vtkm::Float32 z, const vtkm::Matrix< vtkm::Float32, 4, 4 > &transfor) const
 
virtual void RefreshColorBuffer () const
 
virtual void RefreshDepthBuffer () const
 
virtual void SetViewToWorldSpace (const vtkm::rendering::Camera &camera, bool clip)
 
virtual void SetViewToScreenSpace (const vtkm::rendering::Camera &camera, bool clip)
 
virtual void SetViewportClipping (const vtkm::rendering::Camera &, bool)
 
virtual void SaveAs (const std::string &fileName) const
 Save the rendered image. More...
 
virtual vtkm::rendering::WorldAnnotatorCreateWorldAnnotator () const
 Creates a WorldAnnotator of a type that is paired with this Canvas. More...
 
virtual void AddColorSwatch (const vtkm::Vec2f_64 &point0, const vtkm::Vec2f_64 &point1, const vtkm::Vec2f_64 &point2, const vtkm::Vec2f_64 &point3, const vtkm::rendering::Color &color) const
 
void AddColorSwatch (const vtkm::Float64 x0, const vtkm::Float64 y0, const vtkm::Float64 x1, const vtkm::Float64 y1, const vtkm::Float64 x2, const vtkm::Float64 y2, const vtkm::Float64 x3, const vtkm::Float64 y3, const vtkm::rendering::Color &color) const
 
virtual void AddLine (const vtkm::Vec2f_64 &point0, const vtkm::Vec2f_64 &point1, vtkm::Float32 linewidth, const vtkm::rendering::Color &color) const
 
void AddLine (vtkm::Float64 x0, vtkm::Float64 y0, vtkm::Float64 x1, vtkm::Float64 y1, vtkm::Float32 linewidth, const vtkm::rendering::Color &color) const
 
virtual void AddColorBar (const vtkm::Bounds &bounds, const vtkm::cont::ColorTable &colorTable, bool horizontal) const
 
void AddColorBar (vtkm::Float32 x, vtkm::Float32 y, vtkm::Float32 width, vtkm::Float32 height, const vtkm::cont::ColorTable &colorTable, bool horizontal) const
 
virtual void AddText (const vtkm::Vec2f_32 &position, vtkm::Float32 scale, vtkm::Float32 angle, vtkm::Float32 windowAspect, const vtkm::Vec2f_32 &anchor, const vtkm::rendering::Color &color, const std::string &text) const
 
void AddText (vtkm::Float32 x, vtkm::Float32 y, vtkm::Float32 scale, vtkm::Float32 angle, vtkm::Float32 windowAspect, vtkm::Float32 anchorX, vtkm::Float32 anchorY, const vtkm::rendering::Color &color, const std::string &text) const
 
void AddText (const vtkm::Matrix< vtkm::Float32, 4, 4 > &transform, vtkm::Float32 scale, const vtkm::Vec2f_32 &anchor, const vtkm::rendering::Color &color, const std::string &text, const vtkm::Float32 &depth=0) const
 
void BeginTextRenderingBatch () const
 
void EndTextRenderingBatch () const
 

Additional Inherited Members

- Public Types inherited from vtkm::rendering::Canvas
using ColorBufferType = vtkm::cont::ArrayHandle< vtkm::Vec4f_32 >
 
using DepthBufferType = vtkm::cont::ArrayHandle< vtkm::Float32 >
 
using FontTextureType = vtkm::rendering::Texture2D< 1 >
 

Detailed Description

Represents the image space that is the target of rendering using the internal ray tracing code.

Constructor & Destructor Documentation

◆ CanvasRayTracer()

vtkm::rendering::CanvasRayTracer::CanvasRayTracer ( vtkm::Id  width = 1024,
vtkm::Id  height = 1024 
)

Construct a canvas of a given width and height.

◆ ~CanvasRayTracer()

vtkm::rendering::CanvasRayTracer::~CanvasRayTracer ( )

Member Function Documentation

◆ NewCopy()

vtkm::rendering::Canvas* vtkm::rendering::CanvasRayTracer::NewCopy ( ) const
overridevirtual

Create a new Canvas object of the same subtype as this one.

Reimplemented from vtkm::rendering::Canvas.

◆ WriteToCanvas() [1/2]

void vtkm::rendering::CanvasRayTracer::WriteToCanvas ( const vtkm::rendering::raytracing::Ray< vtkm::Float32 > &  rays,
const vtkm::cont::ArrayHandle< vtkm::Float32 > &  colors,
const vtkm::rendering::Camera camera 
)

◆ WriteToCanvas() [2/2]

void vtkm::rendering::CanvasRayTracer::WriteToCanvas ( const vtkm::rendering::raytracing::Ray< vtkm::Float64 > &  rays,
const vtkm::cont::ArrayHandle< vtkm::Float64 > &  colors,
const vtkm::rendering::Camera camera 
)

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