VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMultiViewData.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 
12 #include <vrvOsg/vrvOsg.h>
13 
14 #include <vector>
15 
16 #include <osg/Matrix>
17 #include <osg/Vec3>
18 
19 namespace makVrv
20 {
24  {
25  public:
26  // ctor
27  DtMultiViewData(unsigned int numViews);
28 
29  virtual ~DtMultiViewData();
30  private:
32  DtMultiViewData() = delete;
33 
35  DtMultiViewData(const DtMultiViewData& rhs) = delete;
36 
38  DtMultiViewData& operator= (const DtMultiViewData& rhs) = delete;
39  public:
40 
42  virtual const osg::Matrix& cullViewOffset() const;
43 
45  virtual void setCullViewOffset(const osg::Matrix& offset);
46 
48  virtual const osg::Matrix& projection(unsigned int index) const;
49 
51  virtual void setProjection(const osg::Matrix& projection, unsigned int index);
52 
54  virtual const osg::Matrix& viewOffset(unsigned int index) const;
55 
57  virtual void setViewOffset(const osg::Matrix& offset, unsigned int index);
58 
60  virtual const osg::Camera* parentView() const;
61 
63  virtual void setParentView(osg::Camera* parent);
64 
65  protected:
67  osg::Matrix myCullViewOffset;
68 
70  std::vector<osg::Matrix> myProjections;
71 
73  std::vector<osg::Matrix> myViewOffsets;
74 
76  osg::Camera* myParentCamera;
77  };
78 }
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::vector< osg::Matrix > myProjections
projection matrix for each view
Definition: DtMultiViewData.h:70
osg::Camera * myParentCamera
varjo at the moment has two multiview channels, this variable represents the parent camera i...
Definition: DtMultiViewData.h:76
simple class to encapsulate the different views in a multiview vr setup
Definition: DtMultiViewData.h:23
std::vector< osg::Matrix > myViewOffsets
offsets from the main camera for each view
Definition: DtMultiViewData.h:73
Contains DLL export macros.
osg::Matrix myCullViewOffset
view space offset for the camera when culling so the main camera frustum encapsulates the multiview f...
Definition: DtMultiViewData.h:67
voidpf uLong offset
Definition: ioapi.h:42

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)