Viskores  1.0
TextRendererBatcher.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 
19 #ifndef viskores_rendering_TextRendererBatcher_h
20 #define viskores_rendering_TextRendererBatcher_h
21 
22 #include <string>
23 #include <vector>
24 
29 
30 namespace viskores
31 {
32 namespace rendering
33 {
34 
35 class VISKORES_RENDERING_EXPORT TextRendererBatcher
36 {
37 public:
46 
47  /*
48  VISKORES_CONT
49  TextRendererBatcher();
50  */
51 
54 
56  void BatchText(const ScreenCoordsArrayHandle& screenCoords,
57  const TextureCoordsArrayHandle& textureCoords,
58  const viskores::rendering::Color& color,
59  const viskores::Float32& depth);
60 
61  void Render(const viskores::rendering::Canvas* canvas) const;
62 
63 private:
65  std::vector<ScreenCoordsType> ScreenCoords;
66  std::vector<TextureCoordsType> TextureCoords;
67  std::vector<ColorType> Colors;
68  std::vector<viskores::Float32> Depths;
69 };
70 }
71 } // namespace viskores::rendering
72 
73 #endif // viskores_rendering_TextRendererBatcher_h
viskores::rendering::Canvas::FontTextureType
viskores::rendering::Texture2D< 1 > FontTextureType
Definition: Canvas.h:48
viskores::rendering::TextRendererBatcher::Colors
std::vector< ColorType > Colors
Definition: TextRendererBatcher.h:67
viskores::rendering::TextRendererBatcher::Depths
std::vector< viskores::Float32 > Depths
Definition: TextRendererBatcher.h:68
viskores::rendering::TextRendererBatcher::TextureCoords
std::vector< TextureCoordsType > TextureCoords
Definition: TextRendererBatcher.h:66
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::rendering::TextRendererBatcher::FontTexture
viskores::rendering::Canvas::FontTextureType FontTexture
Definition: TextRendererBatcher.h:64
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::Float32
float Float32
Base type to use for 32-bit floating-point numbers.
Definition: Types.h:165
viskores::Vec4f_32
viskores::Vec< viskores::Float32, 4 > Vec4f_32
Vec4f_32 corresponds to a 4-dimensional vector of 32-bit floating point values.
Definition: Types.h:1186
viskores::rendering::Texture2D< 1 >
viskores::Id4
viskores::Vec< viskores::Id, 4 > Id4
Id4 corresponds to a 4-dimensional index.
Definition: Types.h:1169
BitmapFont.h
viskores::rendering::TextRendererBatcher::ScreenCoords
std::vector< ScreenCoordsType > ScreenCoords
Definition: TextRendererBatcher.h:65
viskores::rendering::TextRendererBatcher
Definition: TextRendererBatcher.h:35
Color.h
viskores_rendering_export.h
Canvas.h
viskores::Vec
A short fixed-length array.
Definition: Types.h:365
viskores::rendering::Canvas
Represents the image space that is the target of rendering.
Definition: Canvas.h:43
viskores::rendering::Color
Representation of a color.
Definition: Color.h:37