2016-09-01 15:46:37 +00:00
|
|
|
//============================================================================
|
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
2019-04-15 23:24:21 +00:00
|
|
|
//
|
2016-09-01 15:46:37 +00:00
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
|
|
|
//============================================================================
|
|
|
|
#ifndef vtkm_rendering_TextAnnotationBillboard_h
|
|
|
|
#define vtkm_rendering_TextAnnotationBillboard_h
|
|
|
|
|
|
|
|
#include <vtkm/rendering/TextAnnotation.h>
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
|
|
|
namespace rendering
|
|
|
|
{
|
2016-09-01 15:46:37 +00:00
|
|
|
|
2016-10-19 18:09:15 +00:00
|
|
|
class VTKM_RENDERING_EXPORT TextAnnotationBillboard : public TextAnnotation
|
2016-09-01 15:46:37 +00:00
|
|
|
{
|
|
|
|
protected:
|
2019-07-31 16:20:38 +00:00
|
|
|
vtkm::Vec3f_32 Position;
|
2016-09-01 15:46:37 +00:00
|
|
|
vtkm::Float32 Angle;
|
|
|
|
|
|
|
|
public:
|
2017-05-26 17:53:28 +00:00
|
|
|
TextAnnotationBillboard(const std::string& text,
|
|
|
|
const vtkm::rendering::Color& color,
|
|
|
|
vtkm::Float32 scalar,
|
2019-07-31 16:20:38 +00:00
|
|
|
const vtkm::Vec3f_32& position,
|
2016-09-01 15:46:37 +00:00
|
|
|
vtkm::Float32 angleDegrees = 0);
|
|
|
|
|
2019-07-31 16:20:38 +00:00
|
|
|
void SetPosition(const vtkm::Vec3f_32& position);
|
2016-09-01 15:46:37 +00:00
|
|
|
|
|
|
|
void SetPosition(vtkm::Float32 posx, vtkm::Float32 posy, vtkm::Float32 posz);
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
void Render(const vtkm::rendering::Camera& camera,
|
|
|
|
const vtkm::rendering::WorldAnnotator& worldAnnotator,
|
2017-11-02 12:36:05 +00:00
|
|
|
vtkm::rendering::Canvas& canvas) const override;
|
2016-09-01 15:46:37 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
} // namespace vtkm::rendering
|
|
|
|
|
|
|
|
#endif //vtkm_rendering_TextAnnotationBillboard_h
|