VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMixedRealityMask.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
10 
11 #pragma once
12 
15 
16 #include <vrvCore/DtDe.h>
17 #include <vrvCore/DtSceneObject.h>
18 
20 
21 #include <osg/MatrixTransform>
22 
23 namespace makVrv
24 {
25 
26  // Struct for storing per-marker data.
28  {
29  osg::Matrixd pose; // Marker pose matrix
30  osg::Vec3 size; // Marker size
31  int id; // Marker id
32  };
33 
39  {
40  private:
43 
45  DtMixedRealityMask& operator=(const DtMixedRealityMask& other);
46 
47  public:
50 
52  virtual ~DtMixedRealityMask();
53 
56  virtual void initalizeMaskingObect(osg::Group* mountTo, const osg::Vec3& offset,
57  bool followObserver, std::string modelFile);
58 
60  virtual void startMasking();
61 
63  virtual void stopMasking();
64 
66  virtual bool maskingActive();
67 
69  virtual void setOffset(const osg::Vec3& offset);
70 
72  virtual float nearDepthRange() const;
73 
75  virtual void nearDepthRange(float nearDepth);
76 
78  virtual float farDepthRange() const;
79 
81  virtual void farDepthRange(float farDepth);
82 
84  virtual bool chromaKeyActive() const;
85 
87  virtual void chromaKeyActive(bool active);
88 
90  virtual osg::Vec3 chromaKeyHsvColor() const;
91 
93  virtual void chromaKeyHsvColor(osg::Vec3 hsv);
94 
96  virtual osg::Vec3 chromaKeyHsvTolerance() const;
97 
99  virtual void chromaKeyHsvTolerance(osg::Vec3 tol);
100 
102  virtual osg::Vec3 chromaKeyHsvFalloff() const;
103 
105  virtual void chromaKeyHsvFalloff(osg::Vec3 falloff);
106 
108  virtual void slot_onPostUpdate();
109 
110  protected:
111 
115  virtual void initalizeMaskingObectImplementation(std::string modelFile) = 0;
116 
118  DtSceneObject* findSceneObjectFromElement(const DtElementID& id, int modelSet);
119 
120  protected:
124 
127  osg::Vec3 myMaskNodeOffset;
130 
133 
135  osg::Vec3 myChromaHsvColor;
138 
141  };
142 
143 }
Contains DLL export macros.
bool myChromaKeyActive
Definition: DtMixedRealityMask.h:134
osg::Vec3 myChromaHsvFalloff
Definition: DtMixedRealityMask.h:137
osg::Vec3 size
Definition: DtMixedRealityMask.h:30
bool myShouldFollowObserver
Definition: DtMixedRealityMask.h:128
osg::Vec3 myChromaHsvTolerance
Definition: DtMixedRealityMask.h:136
Contains makVrv::DtDe class.
float myFarDepthRange
Definition: DtMixedRealityMask.h:132
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:52
bool myMaskingActive
Definition: DtMixedRealityMask.h:125
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
A driver that manages virtual reality HMD and input devices.
osg::ref_ptr< osg::MatrixTransform > myMixedRealityMaskNode
Definition: DtMixedRealityMask.h:140
osg::Vec3 myMaskNodeOffset
Definition: DtMixedRealityMask.h:127
osg::Vec3 myChromaHsvColor
Definition: DtMixedRealityMask.h:135
bool myUseAttachmentPosition
Definition: DtMixedRealityMask.h:129
osg::Matrixd pose
Definition: DtMixedRealityMask.h:29
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Object to handle rendering a mixed reality mask object into the scene. Typically the it renders an ob...
Definition: DtMixedRealityMask.h:38
int id
Definition: DtMixedRealityMask.h:31
float myNearDpethRange
Definition: DtMixedRealityMask.h:131
DtDe & myDe
Definition: DtMixedRealityMask.h:121
Base class to provide boost signal/slot management.
DtSignalConnectionManager myConnections
Definition: DtMixedRealityMask.h:123
Definition: DtMixedRealityMask.h:27
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:42
DtVirtualRealityDriver * myDriverHandle
Definition: DtMixedRealityMask.h:122
osg::ref_ptr< osg::MatrixTransform > myOffsetTransform
Definition: DtMixedRealityMask.h:139
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:70
osg::ref_ptr< osg::Group > myMountNode
Definition: DtMixedRealityMask.h:126
voidpf uLong offset
Definition: ioapi.h:42
Contains makVrv::DtSceneObject class.

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)