VR-Forces 5.0.1 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) 2020 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::Vec3& cullViewOffset() const;
43 
45  virtual void setCullViewOffset(const osg::Vec3& 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::Vec3& viewOffset(unsigned int index) const;
55 
57  virtual void setViewOffset(const osg::Vec3& offset, unsigned int index);
58 
60  virtual osg::Camera* parentView();
61 
63  virtual void setParentView(osg::Camera* parent);
64 
65  protected:
67  osg::Vec3 myCullViewOffset;
68 
70  std::vector<osg::Matrix> myProjections;
71 
73  std::vector<osg::Vec3> myViewOffsets;
74 
76  osg::Camera* myParentCamera;
77  };
78 }
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::vector< osg::Vec3 > myViewOffsets
offsets from the main camera for each view
Definition: DtMultiViewData.h:73
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
osg::Vec3 myCullViewOffset
view space offset for the camera when culling so the main camera frustum encapsulates the multiview f...
Definition: DtMultiViewData.h:67
simple class to encapsulate the different views in a multiview vr setup
Definition: DtMultiViewData.h:23
Contains DLL export macros.
voidpf uLong offset
Definition: ioapi.h:42

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)