VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTexturedGlyphRenderer.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <tbb/tbb_allocator.h>
16 
17 #include <unordered_map>
18 #include <vector>
19 
20 namespace makVrv
21 {
22 
26  {
27  public:
28 
29  typedef std::vector<DtOffsetColoredTexturedVertex, tbb::tbb_allocator<DtOffsetColoredTexturedVertex> > QuadVertexList;
30  typedef std::unordered_map<unsigned int, QuadVertexList > TextureLists;
31 
32  public:
33 
36 
38  virtual ~DtTexturedGlyphRenderer();
39 
41  void setProjectedStringPosition( const float pos[4] );
42 
44  void setProjectedStringRotation( float angle );
45 
47  void setGroup( unsigned int group );
48 
52  virtual void renderGlyphWithAdvance( DtPen& pen, DtGlyph& glyph, bool advance);
53  virtual void renderGlyphWithRightToLeft( DtPen& pen, DtGlyph& glyph, bool rightToLeft);
54 
56  inline const TextureLists& perTextureLists() const
57  {
58  return myLists;
59  }
60 
63  {
64  return myLists;
65  }
66 
69  const size_t maxRenderDataSizeInBytes() const;
70 
72  static const size_t dataSizeInBytesForQuadCount(const size_t count);
73 
74  protected:
75 
77  float myCurrentStringPos[4];
79  float myGroup;
80 
82  };
83 
84 }
std::vector< DtOffsetColoredTexturedVertex, tbb::tbb_allocator< DtOffsetColoredTexturedVertex > > QuadVertexList
Definition: DtTexturedGlyphRenderer.h:29
TextureLists & perTextureLists()
Get the per texture lists.
Definition: DtTexturedGlyphRenderer.h:62
TextureLists myLists
Definition: DtTexturedGlyphRenderer.h:76
float myGroup
Definition: DtTexturedGlyphRenderer.h:79
A glyph renderer which renders the texture associated with a glyph.
Definition: DtTexturedGlyphRenderer.h:25
Abstract class for handling glyph rendering.
Definition: DtGlyphRenderer.h:21
A class which represents a glyph instance. A font is made up of glyphs.
Definition: DtGlyph.h:21
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
float myCurrentStringRotation
Definition: DtTexturedGlyphRenderer.h:78
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Contains makVrv::DtGlyphRenderer class.
const TextureLists & perTextureLists() const
Get the per texture lists (const).
Definition: DtTexturedGlyphRenderer.h:56
A pen object with parameters on how to draw text.
Definition: DtBoundingBox.h:80
std::unordered_map< unsigned int, QuadVertexList > TextureLists
Definition: DtTexturedGlyphRenderer.h:30
Contains the makVrv::DtTextured2DRenderer class declaration.
QuadVertexList myScratchVertList
Definition: DtTexturedGlyphRenderer.h:81

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)