VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMetadataPublisher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvCore/DtUniqueID.h>
15 
16 #include <vrvUtil/DtUnicode.h>
17 #include <vrvUtil/signalslib.h>
18 
19 #include <matrix/vlVector.h>
20 
21 namespace makArchives
22 {
23  class DtMetadataPublisherRecord;
24 }
25 
26 namespace makVrv
27 {
28  class DtObserver;
29  class DtDe;
30  class DtVideoStream;
31  class DtSceneObject;
32  class DtChannel;
33  class DtIntersector;
34 
39  {
40  public:
43 
45  virtual ~DtMetadataPublisher();
46 
48  virtual void realize( const makArchives::DtMetadataPublisherRecord& metadataConfig );
49 
51  virtual void setObserverName( const DtUnicode& observerName );
52 
55  virtual bool isAttached();
56 
58  virtual void attachEntity( makVrv::DtUniqueID entity );
59 
62  virtual void detach();
63 
65  typedef std::vector<DtMetadataElement*> MetadataElementList;
66 
70  virtual void addMetadataElement( DtMetadataElement* element );
71 
73  virtual MetadataElementList& MetadataElement();
74 
76  virtual void tick( double dt );
77 
78  // Get the total number of bytes currently in the publisher's buffer
79  virtual int numBytes();
80 
82  virtual unsigned char* bytes();
83 
88  virtual const DtVideoStream& videoStream();
89 
96  virtual const DtSceneObject& attachedEntitySceneObject();
97 
105  virtual const DtObserver& observer();
106 
110  virtual bool haveValidTargetPoint() const;
111 
114  virtual DtVector targetPoint() const;
115 
120  virtual DtDe& de();
121 
123  virtual long long frameIndex(void) const;
124 
125  protected:
126 
128  DtMetadataPublisher( DtDe& de, const DtVideoStream& videoStream );
129 
131  virtual void slot_attachToChanged( makVrv::DtObserver* obs );
132 
134  virtual void slot_destroyObserver( makVrv::DtObserver* obs );
135 
138  virtual DtSceneObject* findSceneObjectFromElement( const DtElementID& id );
139 
142  virtual void updateTargetPoint();
143 
144  private:
145 
148 
151 
153  DtMetadataPublisher& operator=( const DtMetadataPublisher& rhs );
154 
155  protected:
161 
165 
166  unsigned char* myBuffer;
169  DtVector myTargetPoint;
171  std::vector<DtElementID> myIgnoreList;
172 
173  DtIntersector* myIntersector = nullptr;
174 
176  long long myFrameIndex = -1;
177 
180  boost::signalslib::scoped_connection myAttachedToChangedConn;
181  boost::signalslib::scoped_connection myObserverAboutToBeDestroyedConn;
182  };
183 
185  {
186  public:
188  virtual ~DtMetadataPublisherCreator();
189 
190  virtual DtMetadataPublisher* create( DtDe& de, const DtVideoStream& videoStream ) = 0;
191  };
192 }
A DtVideoStream instance will create a single streaming video pipeline on the channel indicated by wi...
Definition: DtVideoStream.h:35
DtDe & myDe
Definition: DtMetadataPublisher.h:156
boost::signalslib::scoped_connection myAttachedToChangedConn
Explicit connections; disconnected by logic in slot_destroyObserver and auto-released on destruction ...
Definition: DtMetadataPublisher.h:180
const DtVideoStream & myVideoStream
Definition: DtMetadataPublisher.h:157
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
DtIntersector is an abstract class that provides the interface for requesting intersections with the ...
Definition: DtIntersector.h:26
DtMetadataPublisher defines the interface for all metadata publishers, as well as the implementation ...
Definition: DtMetadataPublisher.h:38
#define DT_DLL_VRVVIDEOSTREAM
Definition: vrvVideoStream.h:20
Record for a metadata publisher Defines both the type and parameters.
Definition: DtMetadataPublisherRecord.h:21
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
unsigned char * myBuffer
Definition: DtMetadataPublisher.h:166
MetadataElementList myElements
Definition: DtMetadataPublisher.h:158
DtVector myTargetPoint
Definition: DtMetadataPublisher.h:169
The abstract Channel Class.
Definition: DtChannel.h:35
bool myValidTargetPoint
Definition: DtMetadataPublisher.h:168
bool myIsAttached
Definition: DtMetadataPublisher.h:163
boost::signalslib::scoped_connection myObserverAboutToBeDestroyedConn
Definition: DtMetadataPublisher.h:181
A facade for a DtObserverObject.
Definition: DtObserver.h:38
DtChannel * myChannel
Definition: DtMetadataPublisher.h:160
makVrv::DtUniqueID myAttachedEntity
Definition: DtMetadataPublisher.h:164
DtMetadataElement is an abstract class that defines the interface common to all metadata elements...
Definition: DtMetadataElement.h:22
DtSceneObject * myAttachedEntitySceneObject
Definition: DtMetadataPublisher.h:162
Definition: DtMetadataPublisher.h:184
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
int myBufferLength
Definition: DtMetadataPublisher.h:167
std::vector< DtMetadataElement * > MetadataElementList
Metadata Element list type.
Definition: DtMetadataPublisher.h:65
std::vector< DtElementID > myIgnoreList
ignore list for the intersection search (contain the current attach element ID)
Definition: DtMetadataPublisher.h:171
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:44
Contains makVrv::DtUniqueID type.
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:76
DtObserver * myObserver
Definition: DtMetadataPublisher.h:159
Contains the DtMetadataElement class declaration.

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)