VR-Forces 4.10 Class Documentation
 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 
59  protected:
61  osg::Vec3 myCullViewOffset;
62 
64  std::vector<osg::Matrix> myProjections;
65 
67  std::vector<osg::Vec3> myViewOffsets;
68  };
69 }
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::vector< osg::Vec3 > myViewOffsets
offsets from the main camera for each view
Definition: DtMultiViewData.h:67
std::vector< osg::Matrix > myProjections
projection matrix for each view
Definition: DtMultiViewData.h:64
osg::Vec3 myCullViewOffset
view space offset for the camera when culling so the main camera frustum encapsulates the multiview f...
Definition: DtMultiViewData.h:61
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)