VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProjected2DLineEffect.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 
12 #include <vrvGraphics/Dt2DEffect.h>
13 
14 namespace makVrv
15 {
20  {
21  public:
22 
24  DtProjected2DLineEffect(const std::string& dataPath, const std::string& defines);
25 
27  virtual ~DtProjected2DLineEffect();
28 
36  virtual void setCamera(bool geocentric, float geocentricAlpha,
37  const double position[3]
38  , const double positionMatrix[16]
39  , const double projectionMatrix[16]
40  , const int viewport[4]) override;
41 
42  //Set the number of groups.
43  virtual void setGroupCount(unsigned int count);
44 
45  virtual void setVertexAttribPointers(size_t stride
46  , const VertexAttribPtrInfo& positionAddress
47  , const VertexAttribPtrInfo& colorAddress
48  , const VertexAttribPtrInfo& offsetAddress
49  , const VertexAttribPtrInfo& directionAndLengthAddress
50  , const VertexAttribPtrInfo& scale);
51 
52  virtual void unsetVertexAttribPointers();
53  protected:
54 
55  virtual void updateUniformLocations();
56  virtual void updateUniforms();
57  virtual void initializeShaderSource();
58 
59  protected:
67 
68 
69  unsigned int myUnit;
70  unsigned int myGroupCount;
71  double myCameraPos[3];
72  double myMatrix[16];
73  double myProjectionMatrix[16];
76 
77  void updateOtherUniforms(void);
78  };
79 
80 
84  {
85  public:
86  virtual DtEffect* create(const std::string& dataPath, const std::string& strDefines, CreateParameters* params = 0)
87  {
88  return new DtProjected2DLineEffect(dataPath, strDefines);
89  }
90  };
91 }
92 
unsigned int myGroupCount
Definition: DtProjected2DLineEffect.h:70
Contains the makVrv::Dt2DEffect class declaration.
Abstract creator class for registering effects with a effects manager.
Definition: DtEffect.h:108
int myUniform_ProjectionMat
Definition: DtProjected2DLineEffect.h:62
float myGeocentricAlpha
Definition: DtProjected2DLineEffect.h:75
bool myGeocentricFlag
Definition: DtProjected2DLineEffect.h:74
A creator class for the Projected 2D line effect.
Definition: DtProjected2DLineEffect.h:83
virtual DtEffect * create(const std::string &dataPath, const std::string &strDefines, CreateParameters *params=0)
Definition: DtProjected2DLineEffect.h:86
int myUniform_Stipple
Definition: DtProjected2DLineEffect.h:66
int myUniform_CameraMat
Definition: DtProjected2DLineEffect.h:61
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
int myUniform_Sphere
Definition: DtProjected2DLineEffect.h:64
Definition: DtEffect.h:24
The base class for a programmable pipeline render effect.
Definition: DtEffect.h:20
An effect for rendering 2D projected lines Has support for direction and length information per verte...
Definition: DtProjected2DLineEffect.h:19
unsigned int myUnit
Definition: DtProjected2DLineEffect.h:69
The 2D effect is an abstract interface for effects used to render in 2D.
Definition: Dt2DEffect.h:19
int myUniform_OccludedAlpha
Definition: DtProjected2DLineEffect.h:65
int myUniform_CameraPos
Definition: DtProjected2DLineEffect.h:60
int myUniform_GroupCount
Definition: DtProjected2DLineEffect.h:63

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)