mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Refactor vtk-m symbol visibility macros to be on the classes.
Instead of labeling each method that needs to have visibility we can label entire classes, this reduces the amount of noise and potential for mistakes when writing classes.
This commit is contained in:
parent
b9b2774e1a
commit
7d295de8c9
@ -31,37 +31,29 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class Actor
|
||||
class VTKM_RENDERING_EXPORT Actor
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
Actor(const vtkm::cont::DynamicCellSet &cells,
|
||||
const vtkm::cont::CoordinateSystem &coordinates,
|
||||
const vtkm::cont::Field &scalarField,
|
||||
const vtkm::rendering::ColorTable &colorTable =
|
||||
vtkm::rendering::ColorTable("default"));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Render(vtkm::rendering::Mapper &mapper,
|
||||
vtkm::rendering::Canvas &canvas,
|
||||
const vtkm::rendering::Camera &camera) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::cont::DynamicCellSet &GetCells() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::cont::CoordinateSystem &GetCoordiantes() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::cont::Field &GetScalarField() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::rendering::ColorTable &GetColorTable() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::Range &GetScalarRange() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::Bounds &GetSpatialBounds() const;
|
||||
|
||||
private:
|
||||
|
@ -30,7 +30,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class AxisAnnotation
|
||||
class VTKM_RENDERING_EXPORT AxisAnnotation
|
||||
{
|
||||
protected:
|
||||
void CalculateTicks(const vtkm::Range &range,
|
||||
@ -40,13 +40,10 @@ protected:
|
||||
int modifyTickQuantity) const;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
AxisAnnotation();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~AxisAnnotation();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
||||
vtkm::rendering::Canvas &canvas) = 0;
|
||||
|
@ -34,7 +34,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class AxisAnnotation2D : public AxisAnnotation
|
||||
class VTKM_RENDERING_EXPORT AxisAnnotation2D : public AxisAnnotation
|
||||
{
|
||||
protected:
|
||||
vtkm::Float64 MajorTickSizeX, MajorTickSizeY, MajorTickOffset;
|
||||
@ -59,39 +59,32 @@ protected:
|
||||
|
||||
int MoreOrLessTickAdjustment;
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
AxisAnnotation2D();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~AxisAnnotation2D();
|
||||
|
||||
#if 0
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLogarithmic(bool l)
|
||||
{
|
||||
this->Logarithmic = l;
|
||||
}
|
||||
#endif
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetMoreOrLessTickAdjustment(int offset)
|
||||
{
|
||||
this->MoreOrLessTickAdjustment = offset;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetColor(vtkm::rendering::Color c)
|
||||
{
|
||||
this->Color = c;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLineWidth(vtkm::Float32 lw)
|
||||
{
|
||||
this->LineWidth = lw;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetMajorTickSize(vtkm::Float64 xlen, vtkm::Float64 ylen, vtkm::Float64 offset)
|
||||
{
|
||||
/// offset of 0 means the tick is inside the frame
|
||||
@ -102,7 +95,6 @@ public:
|
||||
this->MajorTickOffset = offset;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetMinorTickSize(vtkm::Float64 xlen, vtkm::Float64 ylen, vtkm::Float64 offset)
|
||||
{
|
||||
this->MinorTickSizeX=xlen;
|
||||
@ -111,7 +103,6 @@ public:
|
||||
}
|
||||
|
||||
///\todo: rename, since it might be screen OR world position?
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetScreenPosition(vtkm::Float64 x0, vtkm::Float64 y0,
|
||||
vtkm::Float64 x1, vtkm::Float64 y1)
|
||||
{
|
||||
@ -122,7 +113,6 @@ public:
|
||||
this->PosY1 = y1;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLabelAlignment(TextAnnotation::HorizontalAlignment h,
|
||||
TextAnnotation::VerticalAlignment v)
|
||||
{
|
||||
@ -130,7 +120,6 @@ public:
|
||||
this->AlignV = v;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLabelFontScale(vtkm::Float32 s)
|
||||
{
|
||||
this->FontScale = s;
|
||||
@ -138,23 +127,18 @@ public:
|
||||
this->Labels[i]->SetScale(s);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRangeForAutoTicks(const vtkm::Range &range);
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRangeForAutoTicks(vtkm::Float64 lower, vtkm::Float64 upper)
|
||||
{
|
||||
this->SetRangeForAutoTicks(vtkm::Range(lower, upper));
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetMajorTicks(const std::vector<vtkm::Float64> &positions,
|
||||
const std::vector<vtkm::Float64> &proportions);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetMinorTicks(const std::vector<vtkm::Float64> &positions,
|
||||
const std::vector<vtkm::Float64> &proportions);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
||||
vtkm::rendering::Canvas &canvas) VTKM_OVERRIDE;
|
||||
|
@ -40,7 +40,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class AxisAnnotation3D : public AxisAnnotation
|
||||
class VTKM_RENDERING_EXPORT AxisAnnotation3D : public AxisAnnotation
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
@ -58,10 +58,8 @@ protected:
|
||||
int MoreOrLessTickAdjustment;
|
||||
public:
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
AxisAnnotation3D();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~AxisAnnotation3D();
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -82,7 +80,6 @@ public:
|
||||
this->Axis = a;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetTickInvert(bool x, bool y, bool z);
|
||||
|
||||
/// offset of 0 means the tick is inside the frame
|
||||
@ -116,22 +113,18 @@ public:
|
||||
this->SetWorldPosition(vtkm::make_Vec(x0,y0,z0), vtkm::make_Vec(x1,y1,z1));
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLabelFontScale(vtkm::Float64 s);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetLabelFontOffset(vtkm::Float32 off)
|
||||
{
|
||||
this->FontOffset = off;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRange(const vtkm::Range &range)
|
||||
{
|
||||
this->Range = range;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRange(vtkm::Float64 lower, vtkm::Float64 upper)
|
||||
{
|
||||
this->SetRange(vtkm::Range(lower, upper));
|
||||
|
@ -32,7 +32,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class BitmapFont
|
||||
class VTKM_RENDERING_EXPORT BitmapFont
|
||||
{
|
||||
public:
|
||||
struct Character
|
||||
@ -83,10 +83,8 @@ public:
|
||||
std::vector<unsigned char> RawImageFileData;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
BitmapFont();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const Character &GetChar(char c) const;
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -95,7 +93,6 @@ public:
|
||||
return this->RawImageFileData;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Float32 GetTextWidth(const std::string &text) const;
|
||||
|
||||
void GetCharPolygon(char character, vtkm::Float32 &x, vtkm::Float32 &y,
|
||||
|
@ -27,10 +27,9 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class BitmapFontFactory
|
||||
class VTKM_RENDERING_EXPORT BitmapFontFactory
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
static vtkm::rendering::BitmapFont CreateLiberation2Sans();
|
||||
};
|
||||
|
||||
|
@ -28,17 +28,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class BoundingBoxAnnotation
|
||||
class VTKM_RENDERING_EXPORT BoundingBoxAnnotation
|
||||
{
|
||||
private:
|
||||
vtkm::rendering::Color Color;
|
||||
vtkm::Bounds Extents;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
BoundingBoxAnnotation();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~BoundingBoxAnnotation();
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -65,7 +63,6 @@ public:
|
||||
this->Color = c;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Render(const vtkm::rendering::Camera &,
|
||||
const WorldAnnotator &annotator);
|
||||
};
|
||||
|
@ -33,7 +33,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class Camera
|
||||
class VTKM_RENDERING_EXPORT Camera
|
||||
{
|
||||
struct Camera3DStruct
|
||||
{
|
||||
@ -49,11 +49,9 @@ class Camera
|
||||
Zoom(1.0f)
|
||||
{}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateViewMatrix() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateProjectionMatrix(vtkm::Id width,
|
||||
vtkm::Id height,
|
||||
@ -70,7 +68,7 @@ class Camera
|
||||
vtkm::Float32 Zoom;
|
||||
};
|
||||
|
||||
struct Camera2DStruct
|
||||
struct VTKM_RENDERING_EXPORT Camera2DStruct
|
||||
{
|
||||
public:
|
||||
VTKM_CONT_EXPORT
|
||||
@ -85,11 +83,9 @@ class Camera
|
||||
Zoom(1.0f)
|
||||
{}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateViewMatrix() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateProjectionMatrix(vtkm::Float32 size,
|
||||
vtkm::Float32 znear,
|
||||
@ -119,15 +115,12 @@ public:
|
||||
ViewportTop(1.0f)
|
||||
{}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateViewMatrix() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Matrix<vtkm::Float32,4,4>
|
||||
CreateProjectionMatrix(vtkm::Id screenWidth, vtkm::Id screenHeight) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void GetRealViewport(vtkm::Id screenWidth, vtkm::Id screenHeight,
|
||||
vtkm::Float32 &left, vtkm::Float32 &right,
|
||||
vtkm::Float32 &bottom, vtkm::Float32 &top) const;
|
||||
@ -360,7 +353,6 @@ public:
|
||||
|
||||
/// \brief Pans the camera
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Pan(vtkm::Float32 dx, vtkm::Float32 dy);
|
||||
|
||||
/// \brief Pans the camera
|
||||
@ -387,7 +379,6 @@ public:
|
||||
/// zoom makes the geometry look bigger or closer. Negative zoom has the
|
||||
/// opposite effect. A zoom of 0 has no effect.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Zoom(vtkm::Float32 zoom);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -406,7 +397,6 @@ public:
|
||||
///
|
||||
/// \c TrackballRotate changes the mode to 3D.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void TrackballRotate(vtkm::Float32 startX,
|
||||
vtkm::Float32 startY,
|
||||
vtkm::Float32 endX,
|
||||
@ -431,7 +421,6 @@ public:
|
||||
/// the camera so that it is looking at this region in space. The view
|
||||
/// direction is preserved.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void ResetToBounds(const vtkm::Bounds &dataBounds);
|
||||
|
||||
/// \brief Roll the camera
|
||||
@ -441,7 +430,6 @@ public:
|
||||
///
|
||||
/// Roll is currently only supported for 3D cameras.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Roll(vtkm::Float32 angleDegrees);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -459,7 +447,6 @@ public:
|
||||
/// Azimuth only makes sense for 3D cameras, so the camera mode will be set
|
||||
/// to 3D when this method is called.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Azimuth(vtkm::Float32 angleDegrees);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -478,7 +465,6 @@ public:
|
||||
/// Elevation only makes sense for 3D cameras, so the camera mode will be set
|
||||
/// to 3D when this method is called.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Elevation(vtkm::Float32 angleDegrees);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -497,7 +483,6 @@ public:
|
||||
/// Dolly only makes sense for 3D cameras, so the camera mode will be set to
|
||||
/// 3D when this method is called.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Dolly(vtkm::Float32 value);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
|
@ -31,29 +31,22 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class Canvas
|
||||
class VTKM_RENDERING_EXPORT Canvas
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
Canvas(vtkm::Id width=1024,
|
||||
vtkm::Id height=1024);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~Canvas();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Initialize() = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Activate() = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Clear() = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Finish() = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual vtkm::rendering::Canvas *NewCopy() const = 0;
|
||||
|
||||
typedef vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float32,4> > ColorBufferType;
|
||||
@ -111,22 +104,15 @@ public:
|
||||
|
||||
// If a subclass uses a system that renderers to different buffers, then
|
||||
// these should be overridden to copy the data to the buffers.
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RefreshColorBuffer() const { }
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RefreshDepthBuffer() const { }
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SetViewToWorldSpace(const vtkm::rendering::Camera &, bool) {}
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SetViewToScreenSpace(const vtkm::rendering::Camera &, bool) {}
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SetViewportClipping(const vtkm::rendering::Camera &, bool) {}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SaveAs(const std::string &fileName) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void AddLine(const vtkm::Vec<vtkm::Float64,2> &point0,
|
||||
const vtkm::Vec<vtkm::Float64,2> &point1,
|
||||
vtkm::Float32 linewidth,
|
||||
@ -144,7 +130,6 @@ public:
|
||||
color);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void AddColorBar(const vtkm::Bounds &bounds,
|
||||
const vtkm::rendering::ColorTable &colorTable,
|
||||
bool horizontal) const = 0;
|
||||
@ -162,7 +147,6 @@ public:
|
||||
horizontal);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void AddText(const vtkm::Vec<vtkm::Float32,2> &position,
|
||||
vtkm::Float32 scale,
|
||||
vtkm::Float32 angle,
|
||||
@ -196,7 +180,6 @@ public:
|
||||
/// deleted with delete later). A pointer to the created WorldAnnotator is
|
||||
/// returned.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual vtkm::rendering::WorldAnnotator *CreateWorldAnnotator() const;
|
||||
|
||||
private:
|
||||
|
@ -35,23 +35,18 @@ struct CanvasEGLInternals;
|
||||
|
||||
}
|
||||
|
||||
class CanvasEGL : public CanvasGL
|
||||
class VTKM_RENDERING_EXPORT CanvasEGL : public CanvasGL
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
CanvasEGL(vtkm::Id width=1024,
|
||||
vtkm::Id height=1024);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~CanvasEGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Initialize() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
|
||||
virtual void Activate() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -29,64 +29,47 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class CanvasGL : public Canvas
|
||||
class VTKM_RENDERING_EXPORT CanvasGL : public Canvas
|
||||
{
|
||||
public:
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
CanvasGL(vtkm::Id width=1024,
|
||||
vtkm::Id height=1024);
|
||||
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~CanvasGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Initialize() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Activate() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Clear() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Finish() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetViewToWorldSpace(const vtkm::rendering::Camera &camera,
|
||||
bool clip) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetViewToScreenSpace(const vtkm::rendering::Camera &camera,
|
||||
bool clip) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetViewportClipping(const vtkm::rendering::Camera &camera,
|
||||
bool clip) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RefreshColorBuffer() const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RefreshDepthBuffer() const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddLine(const vtkm::Vec<vtkm::Float64,2> &point0,
|
||||
const vtkm::Vec<vtkm::Float64,2> &point1,
|
||||
vtkm::Float32 linewidth,
|
||||
const vtkm::rendering::Color &color) const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddColorBar(const vtkm::Bounds &bounds,
|
||||
const vtkm::rendering::ColorTable &colorTable,
|
||||
bool horizontal) const VTKM_OVERRIDE;
|
||||
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddText(const vtkm::Vec<vtkm::Float32,2> &position,
|
||||
vtkm::Float32 scale,
|
||||
vtkm::Float32 angle,
|
||||
@ -96,14 +79,12 @@ public:
|
||||
const std::string &text) const VTKM_OVERRIDE;
|
||||
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::WorldAnnotator *CreateWorldAnnotator() const VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
vtkm::rendering::BitmapFont Font;
|
||||
vtkm::rendering::TextureGL FontTexture;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderText(vtkm::Float32 scale,
|
||||
const vtkm::Vec<vtkm::Float32,2> &anchor,
|
||||
const std::string &text) const;
|
||||
|
@ -35,29 +35,22 @@ struct CanvasOSMesaInternals;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
class CanvasOSMesa : public CanvasGL
|
||||
class VTKM_RENDERING_EXPORT CanvasOSMesa : public CanvasGL
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
CanvasOSMesa(vtkm::Id width=1024,
|
||||
vtkm::Id height=1024);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~CanvasOSMesa();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Initialize() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RefreshColorBuffer() const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Activate() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Finish() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -27,44 +27,34 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class CanvasRayTracer : public Canvas
|
||||
class VTKM_RENDERING_EXPORT CanvasRayTracer : public Canvas
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
CanvasRayTracer(vtkm::Id width=1024,
|
||||
vtkm::Id height=1024);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~CanvasRayTracer();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Initialize() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Activate() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Finish() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Clear() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Canvas *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddLine(const vtkm::Vec<vtkm::Float64,2> &point0,
|
||||
const vtkm::Vec<vtkm::Float64,2> &point1,
|
||||
vtkm::Float32 linewidth,
|
||||
const vtkm::rendering::Color &color) const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddColorBar(const vtkm::Bounds &bounds,
|
||||
const vtkm::rendering::ColorTable &colorTable,
|
||||
bool horizontal) const VTKM_OVERRIDE;
|
||||
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddText(const vtkm::Vec<vtkm::Float32,2> &position,
|
||||
vtkm::Float32 scale,
|
||||
vtkm::Float32 angle,
|
||||
|
@ -32,17 +32,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class ColorBarAnnotation
|
||||
class VTKM_RENDERING_EXPORT ColorBarAnnotation
|
||||
{
|
||||
protected:
|
||||
vtkm::rendering::ColorTable ColorTable;
|
||||
vtkm::rendering::AxisAnnotation2D Axis;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
ColorBarAnnotation();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~ColorBarAnnotation();
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -51,7 +49,6 @@ public:
|
||||
this->ColorTable = colorTable;
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRange(const vtkm::Range &range, vtkm::IdComponent numTicks);
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -60,7 +57,6 @@ public:
|
||||
this->SetRange(vtkm::Range(l,h), numTicks);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
||||
vtkm::rendering::Canvas &canvas);
|
||||
|
@ -42,51 +42,39 @@ struct ColorTableInternals;
|
||||
/// and Sean Ahern. This class uses seperate RGB and alpha control points and can
|
||||
/// be used as a transfer function.
|
||||
///
|
||||
class ColorTable
|
||||
class VTKM_RENDERING_EXPORT ColorTable
|
||||
{
|
||||
private:
|
||||
std::shared_ptr<detail::ColorTableInternals> Internals;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
ColorTable();
|
||||
|
||||
/// Constructs a \c ColorTable using the name of a pre-defined color set.
|
||||
VTKM_RENDERING_EXPORT
|
||||
ColorTable(const std::string &name);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const std::string &GetName() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
bool GetSmooth() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Sample(int numSamples,
|
||||
vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float32,4> > &colors) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Color MapRGB(vtkm::Float32 scalar) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Float32 MapAlpha(vtkm::Float32 scalar) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Clear();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Reverse();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddControlPoint(vtkm::Float32 position,
|
||||
const vtkm::rendering::Color &color);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddControlPoint(vtkm::Float32 position,
|
||||
const vtkm::rendering::Color &color,
|
||||
vtkm::Float32 alpha);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddAlphaControlPoint(vtkm::Float32 position, vtkm::Float32 alpha);
|
||||
};
|
||||
}}//namespace vtkm::rendering
|
||||
|
@ -26,18 +26,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class Mapper
|
||||
class VTKM_RENDERING_EXPORT Mapper
|
||||
{
|
||||
public:
|
||||
VTKM_CONT_EXPORT
|
||||
Mapper()
|
||||
{
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~Mapper();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
|
||||
virtual void RenderCells(const vtkm::cont::DynamicCellSet &cellset,
|
||||
const vtkm::cont::CoordinateSystem &coords,
|
||||
@ -46,17 +43,12 @@ public:
|
||||
const vtkm::rendering::Camera &camera,
|
||||
const vtkm::Range &scalarRange) = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SetActiveColorTable(const ColorTable &ct);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void StartScene() = 0;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void EndScene() = 0;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void SetCanvas(vtkm::rendering::Canvas *canvas) = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual vtkm::rendering::Mapper *NewCopy() const = 0;
|
||||
|
||||
protected:
|
||||
|
@ -30,16 +30,13 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class MapperGL : public Mapper
|
||||
class VTKM_RENDERING_EXPORT MapperGL : public Mapper
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
MapperGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~MapperGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderCells(const vtkm::cont::DynamicCellSet &cellset,
|
||||
const vtkm::cont::CoordinateSystem &coords,
|
||||
const vtkm::cont::Field &scalarField,
|
||||
@ -47,14 +44,10 @@ public:
|
||||
const vtkm::rendering::Camera &,
|
||||
const vtkm::Range &scalarRange) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void StartScene() VTKM_OVERRIDE;
|
||||
VTKM_RENDERING_EXPORT
|
||||
void EndScene() VTKM_OVERRIDE;
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
|
||||
|
@ -29,19 +29,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class MapperRayTracer : public Mapper
|
||||
class VTKM_RENDERING_EXPORT MapperRayTracer : public Mapper
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
MapperRayTracer();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~MapperRayTracer();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderCells(const vtkm::cont::DynamicCellSet &cellset,
|
||||
const vtkm::cont::CoordinateSystem &coords,
|
||||
const vtkm::cont::Field &scalarField,
|
||||
@ -49,12 +45,9 @@ public:
|
||||
const vtkm::rendering::Camera &camera,
|
||||
const vtkm::Range &scalarRange) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void StartScene() VTKM_OVERRIDE;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void EndScene() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -27,19 +27,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class MapperVolume : public Mapper
|
||||
class VTKM_RENDERING_EXPORT MapperVolume : public Mapper
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
MapperVolume();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~MapperVolume();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetCanvas(vtkm::rendering::Canvas *canvas) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RenderCells(const vtkm::cont::DynamicCellSet &cellset,
|
||||
const vtkm::cont::CoordinateSystem &coords,
|
||||
const vtkm::cont::Field &scalarField,
|
||||
@ -47,12 +43,9 @@ public:
|
||||
const vtkm::rendering::Camera &camera,
|
||||
const vtkm::Range &scalarRange) VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void StartScene() VTKM_OVERRIDE;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void EndScene() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::rendering::Mapper *NewCopy() const VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -32,27 +32,21 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class Scene
|
||||
class VTKM_RENDERING_EXPORT Scene
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
Scene();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddActor(const vtkm::rendering::Actor &actor);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const vtkm::rendering::Actor &GetActor(vtkm::IdComponent index) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::IdComponent GetNumberOfActors() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Render(vtkm::rendering::Mapper &mapper,
|
||||
vtkm::rendering::Canvas &canvas,
|
||||
const vtkm::rendering::Camera &camera) const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
vtkm::Bounds GetSpatialBounds() const;
|
||||
|
||||
private:
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class TextAnnotation
|
||||
class VTKM_RENDERING_EXPORT TextAnnotation
|
||||
{
|
||||
public:
|
||||
enum HorizontalAlignment
|
||||
@ -52,37 +52,28 @@ protected:
|
||||
vtkm::Vec<vtkm::Float32,2> Anchor;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
TextAnnotation(const std::string &text,
|
||||
const vtkm::rendering::Color &color,
|
||||
vtkm::Float32 scalar);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~TextAnnotation();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetText(const std::string &text);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
const std::string &GetText() const;
|
||||
|
||||
/// Set the anchor point relative to the box containing the text. The anchor
|
||||
/// is scaled in both directions to the range [-1,1] with -1 at the lower
|
||||
/// left and 1 at the upper right.
|
||||
///
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRawAnchor(const vtkm::Vec<vtkm::Float32,2> &anchor);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetRawAnchor(vtkm::Float32 h, vtkm::Float32 v);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetAlignment(HorizontalAlignment h, VerticalAlignment v);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetScale(vtkm::Float32 scale);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
||||
vtkm::rendering::Canvas &canvas) const = 0;
|
||||
|
@ -25,30 +25,25 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class TextAnnotationBillboard : public TextAnnotation
|
||||
class VTKM_RENDERING_EXPORT TextAnnotationBillboard : public TextAnnotation
|
||||
{
|
||||
protected:
|
||||
vtkm::Vec<vtkm::Float32,3> Position;
|
||||
vtkm::Float32 Angle;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
TextAnnotationBillboard(const std::string &text,
|
||||
const vtkm::rendering::Color &color,
|
||||
vtkm::Float32 scalar,
|
||||
const vtkm::Vec<vtkm::Float32,3> &position,
|
||||
vtkm::Float32 angleDegrees = 0);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~TextAnnotationBillboard();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetPosition(const vtkm::Vec<vtkm::Float32,3> &position);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetPosition(vtkm::Float32 posx, vtkm::Float32 posy, vtkm::Float32 posz);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &worldAnnotator,
|
||||
vtkm::rendering::Canvas &canvas) const VTKM_OVERRIDE;
|
||||
|
@ -25,30 +25,25 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class TextAnnotationScreen : public TextAnnotation
|
||||
class VTKM_RENDERING_EXPORT TextAnnotationScreen : public TextAnnotation
|
||||
{
|
||||
protected:
|
||||
vtkm::Vec<vtkm::Float32,2> Position;
|
||||
vtkm::Float32 Angle;
|
||||
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
TextAnnotationScreen(const std::string &text,
|
||||
const vtkm::rendering::Color &color,
|
||||
vtkm::Float32 scale,
|
||||
const vtkm::Vec<vtkm::Float32,2> &position,
|
||||
vtkm::Float32 angleDegrees = 0);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~TextAnnotationScreen();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetPosition(const vtkm::Vec<vtkm::Float32,2> &position);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetPosition(vtkm::Float32 posx, vtkm::Float32 posy);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Render(const vtkm::rendering::Camera &camera,
|
||||
const vtkm::rendering::WorldAnnotator &annotator,
|
||||
vtkm::rendering::Canvas &canvas) const VTKM_OVERRIDE;
|
||||
|
@ -32,25 +32,19 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class TextureGL
|
||||
class VTKM_RENDERING_EXPORT TextureGL
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
TextureGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~TextureGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
bool Valid() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Enable() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Disable() const;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void CreateAlphaFromRGBA(vtkm::Id width,
|
||||
vtkm::Id height,
|
||||
const std::vector<unsigned char> &rgba);
|
||||
|
@ -33,17 +33,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class View
|
||||
class VTKM_RENDERING_EXPORT View
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
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));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
View(const vtkm::rendering::Scene &scene,
|
||||
const vtkm::rendering::Mapper &mapper,
|
||||
const vtkm::rendering::Canvas &canvas,
|
||||
@ -51,7 +49,6 @@ public:
|
||||
const vtkm::rendering::Color &backgroundColor =
|
||||
vtkm::rendering::Color(0,0,0,1));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~View();
|
||||
|
||||
VTKM_CONT_EXPORT
|
||||
@ -117,24 +114,17 @@ public:
|
||||
this->CanvasPointer->SetBackgroundColor(color);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Initialize();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void Paint() = 0;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RenderScreenAnnotations() = 0;
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void RenderWorldAnnotations() = 0;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SaveAs(const std::string &fileName) const;
|
||||
|
||||
protected:
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetupForWorldSpace(bool viewportClip=true);
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void SetupForScreenSpace(bool viewportClip=false);
|
||||
|
||||
private:
|
||||
|
@ -28,17 +28,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class View2D : public vtkm::rendering::View
|
||||
class VTKM_RENDERING_EXPORT View2D : public vtkm::rendering::View
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
View2D(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));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
View2D(const vtkm::rendering::Scene &scene,
|
||||
const vtkm::rendering::Mapper &mapper,
|
||||
const vtkm::rendering::Canvas &canvas,
|
||||
@ -46,16 +44,12 @@ public:
|
||||
const vtkm::rendering::Color &backgroundColor =
|
||||
vtkm::rendering::Color(0,0,0,1));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~View2D();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Paint() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderScreenAnnotations() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderWorldAnnotations() VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -29,17 +29,15 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class View3D : public vtkm::rendering::View
|
||||
class VTKM_RENDERING_EXPORT View3D : public vtkm::rendering::View
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
View3D(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));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
View3D(const vtkm::rendering::Scene &scene,
|
||||
const vtkm::rendering::Mapper &mapper,
|
||||
const vtkm::rendering::Canvas &canvas,
|
||||
@ -47,16 +45,12 @@ public:
|
||||
const vtkm::rendering::Color &backgroundColor =
|
||||
vtkm::rendering::Color(0,0,0,1));
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
~View3D();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void Paint() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderScreenAnnotations() VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void RenderWorldAnnotations() VTKM_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
@ -28,13 +28,11 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class WorldAnnotator
|
||||
class VTKM_RENDERING_EXPORT WorldAnnotator
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual ~WorldAnnotator();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void AddLine(const vtkm::Vec<vtkm::Float64,3> &point0,
|
||||
const vtkm::Vec<vtkm::Float64,3> &point1,
|
||||
vtkm::Float32 lineWidth,
|
||||
@ -55,7 +53,6 @@ public:
|
||||
inFront);
|
||||
}
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
virtual void AddText(const vtkm::Vec<vtkm::Float32,3> &origin,
|
||||
const vtkm::Vec<vtkm::Float32,3> &right,
|
||||
const vtkm::Vec<vtkm::Float32,3> &up,
|
||||
|
@ -28,20 +28,17 @@
|
||||
namespace vtkm {
|
||||
namespace rendering {
|
||||
|
||||
class WorldAnnotatorGL : public WorldAnnotator
|
||||
class VTKM_RENDERING_EXPORT WorldAnnotatorGL : public WorldAnnotator
|
||||
{
|
||||
public:
|
||||
VTKM_RENDERING_EXPORT
|
||||
~WorldAnnotatorGL();
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddLine(const vtkm::Vec<vtkm::Float64,3> &point0,
|
||||
const vtkm::Vec<vtkm::Float64,3> &point1,
|
||||
vtkm::Float32 lineWidth,
|
||||
const vtkm::rendering::Color &color,
|
||||
bool inFront) const VTKM_OVERRIDE;
|
||||
|
||||
VTKM_RENDERING_EXPORT
|
||||
void AddText(const vtkm::Vec<vtkm::Float32,3> &origin,
|
||||
const vtkm::Vec<vtkm::Float32,3> &right,
|
||||
const vtkm::Vec<vtkm::Float32,3> &up,
|
||||
|
Loading…
Reference in New Issue
Block a user