VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlayRenderer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
16 #include <vrvMath/DtMatrix4.h>
17 
19 
20 
21 namespace makVrv
22 {
23  class DtDe;
24  class DtDecalProjectorRenderer;
25  class DtDecalProjectorLineRenderer;
26  struct DtDecalProjectorRendererDrawSettings;
27  class DtQuadProxyInterface;
28  class DtTextProxyInterface;
29  class DtLineRenderer;
30  class DtQuadRenderer;
31  class DtTriangleRenderer;
32  class DtTextRenderer;
33  class DtOverlayResourceProvider;
34  struct DtObserverRenderData;
35  struct DtOverlayRenderData;
36 
37 
41  {
42  public:
45 
46  // Unimplemented Copy CTOR
48 
49  // Unimplemented Assignment Operator
50  DtOverlayRendererCreator& operator=(const DtOverlayRendererCreator& rhs) = delete;
51 
53  virtual ~DtOverlayRendererCreator();
54 
55  public:
56 
60 
61  };
62 
70  {
72 
73  public:
74 
76  virtual ~DtOverlayRenderer();
77 
79  DtOverlayRenderer() = delete;
80 
83  const DtOverlayRenderer &other) = delete;
84 
86  DtOverlayRenderer &operator=(
87  const DtOverlayRenderer &other) = delete;
88 
89  public:
90 
93  virtual bool render(const DtOverlayRenderData& overlayRenderData,
94  const DtObserverRenderData& channelRenderData,
95  const double* currentProjectionMatrix);
96 
98  virtual void releaseResources();
99 
100  virtual void setProjectCameraIs3D(bool is3D);
101  virtual bool projectCameraIs3D() const;
102 
103  virtual void setProjectCameraIsNormalized( bool isNormalize);
104  virtual bool projectCameraIsNormalized() const;
105 
106  virtual DtOverlayResourceProvider& resourceProvider();
107  virtual DtLineRenderer& lineRenderer() const;
108  virtual DtQuadRenderer& quadRenderer() const;
109  virtual DtTriangleRenderer& triangleRenderer() const;
110  virtual DtTextRenderer& textRenderer() const;
111 
112  virtual DtQuadProxyInterface* createQuadProxyInterface(DtQuadProxyInterface::FillType type = DtQuadProxyInterface::Fill_Solid) override;
113  virtual DtTextProxyInterface* createTextProxyInterface() override;
114  virtual DtLineSegmentInterface* createLineSegmentInterface() override;
115  virtual DtTexturedLineSegmentInterface* createTexturedLineSegmentInterface() override;
116  virtual DtDecalProjectorComponentInterface* createDecalProjectorComponentInterface(
118 
119 
121  virtual bool somethingToRender(
122  DtOverlayResourceRequirements& resourceRequirements) const;
123 
124  protected:
125 
128 
129  // Computes the draw settings required for decal projectors.
130  virtual void computeDecalProjectorDrawSetting(
131  const DtOverlayRenderData& overlayRenderData,
132  const DtObserverRenderData& channelRenderData,
133  DtDecalProjectorRendererDrawSettings& outDrawSettings);
134 
140  static void fillInNormalizedProjectionMatrix(const int viewport[4], double mat[16] );
141 
146  static void fillInTextProjectionMatrix(const int viewport[4], double mat[16] );
147 
148  protected:
149 
159  };
160 }
DtOverlayResourceProvider & myProvider
Definition: DtOverlayRenderer.h:150
A class responsible for rendering decal projectors for a camera context.
Definition: DtDecalProjectorRenderer.h:93
A class responsible for rendering line decal projectors for a camera context.
Definition: DtDecalProjectorLineRenderer.h:33
DtQuadRenderer * myQuadsRenderer
Definition: DtOverlayRenderer.h:152
bool myProjectCameraIsNormalized
Definition: DtOverlayRenderer.h:158
A structure to hold rendering requiresments for overlays. This is used to update overlay resource pro...
Definition: DtCommonRenderData.h:83
RenderingType
Enumeration for component renderer topology to use.
Definition: DtDecalProjectorComponentInterface.h:48
DtTextRenderer * myTextRenderer
Definition: DtOverlayRenderer.h:154
Definition: DtQuadProxyInterface.h:27
Interface for creating instances of the DtOverlayRendererCreator.
Definition: DtOverlayRenderer.h:40
A structure used to pass draw settings to the draw method. All matrix order is Row Major coming from ...
Definition: DtDecalProjectorRenderer.h:43
Contains the makVrv::DtOverlayRendererInterface class declaration.
A class which allocates and draws quads.
Definition: DtQuadRenderer.h:44
bool myProjectCameraIs3D
Definition: DtOverlayRenderer.h:157
A class which represents a component for a decal projector.
Definition: DtDecalProjectorComponentInterface.h:43
The triangle renderer.
Definition: DtTriangleRenderer.h:47
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
A class for rendering text object.
Definition: DtTextRenderer.h:58
The overlay resource provider class provides resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:28
friend DtOverlayRendererCreator
Definition: DtOverlayRenderer.h:71
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
An interface for a textured single line segment.
Definition: DtTexturedLineSegmentInterface.h:18
A class for controlling text owned by the TextRenderer.
Definition: DtTextProxyInterface.h:30
A single 2D quadrilateral.
Definition: DtQuadProxyInterface.h:21
DtLineRenderer * myLinesRenderer
Definition: DtOverlayRenderer.h:151
Abstract interface for creating instances of the DtOverlayRendererInterface.
Definition: DtOverlayRendererInterface.h:39
DtTriangleRenderer * myTrianglesRenderer
Definition: DtOverlayRenderer.h:153
A structure to hold rendering information for overlays. This is used to pass to various overlay rende...
Definition: DtCommonRenderData.h:42
FillType
Definition: DtQuadProxyInterface.h:25
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtDecalProjectorLineRenderer * myDecalProjectorLineRenderer
Definition: DtOverlayRenderer.h:156
Definition: DtCommonRenderData.h:32
A class responsible for rendering lines.
Definition: DtLineRenderer.h:49
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
4 dimensional matrix
DtDecalProjectorRenderer * myDecalProjectorTriangleRenderer
Definition: DtOverlayRenderer.h:155
The DtOverlayRenderer implements the overlay concept. An overlay is a 2D scene that is drawn on top o...
Definition: DtOverlayRenderer.h:69

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)