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) 2024 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 
18 #include <matrix/vlVector.h>
19 
20 namespace makArchives
21 {
22  class DtMetadataPublisherRecord;
23 }
24 
25 namespace makVrv
26 {
27  class DtObserver;
28  class DtDe;
29  class DtVideoStream;
30  class DtSceneObject;
31  class DtChannel;
32  class DtIntersector;
33 
38  {
39  public:
42 
44  virtual ~DtMetadataPublisher();
45 
47  virtual void realize( const makArchives::DtMetadataPublisherRecord& metadataConfig );
48 
50  virtual void setObserverName( const DtUnicode& observerName );
51 
54  virtual bool isAttached();
55 
57  virtual void attachEntity( makVrv::DtUniqueID entity );
58 
61  virtual void detach();
62 
64  typedef std::vector<DtMetadataElement*> MetadataElementList;
65 
69  virtual void addMetadataElement( DtMetadataElement* element );
70 
72  virtual MetadataElementList& MetadataElement();
73 
75  virtual void tick( double dt );
76 
77  // Get the total number of bytes currently in the publisher's buffer
78  virtual int numBytes();
79 
81  virtual unsigned char* bytes();
82 
87  virtual const DtVideoStream& videoStream();
88 
95  virtual const DtSceneObject& attachedEntitySceneObject();
96 
104  virtual const DtObserver& observer();
105 
109  virtual bool haveValidTargetPoint() const;
110 
113  virtual DtVector targetPoint() const;
114 
119  virtual DtDe& de();
120 
122  virtual long long frameIndex(void) const;
123 
124  protected:
125 
127  DtMetadataPublisher( DtDe& de, const DtVideoStream& videoStream );
128 
130  virtual void slot_attachToChanged( makVrv::DtObserver* obs );
131 
133  virtual void slot_destroyObserver( makVrv::DtObserver* obs );
134 
137  virtual DtSceneObject* findSceneObjectFromElement( const DtElementID& id );
138 
141  virtual void updateTargetPoint();
142 
143  private:
144 
147 
150 
152  DtMetadataPublisher& operator=( const DtMetadataPublisher& rhs );
153 
154  protected:
160 
164 
165  unsigned char* myBuffer;
168  DtVector myTargetPoint;
170  std::vector<DtElementID> myIgnoreList;
171 
172  DtIntersector* myIntersector = nullptr;
173 
175  long long myFrameIndex = -1;
176  };
177 
179  {
180  public:
182  virtual ~DtMetadataPublisherCreator();
183 
184  virtual DtMetadataPublisher* create( DtDe& de, const DtVideoStream& videoStream ) = 0;
185  };
186 }
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:155
const DtVideoStream & myVideoStream
Definition: DtMetadataPublisher.h:156
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:25
DtMetadataPublisher defines the interface for all metadata publishers, as well as the implementation ...
Definition: DtMetadataPublisher.h:37
#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:165
MetadataElementList myElements
Definition: DtMetadataPublisher.h:157
DtVector myTargetPoint
Definition: DtMetadataPublisher.h:168
The abstract Channel Class.
Definition: DtChannel.h:35
bool myValidTargetPoint
Definition: DtMetadataPublisher.h:167
bool myIsAttached
Definition: DtMetadataPublisher.h:162
A facade for a DtObserverObject.
Definition: DtObserver.h:38
DtChannel * myChannel
Definition: DtMetadataPublisher.h:159
makVrv::DtUniqueID myAttachedEntity
Definition: DtMetadataPublisher.h:163
DtMetadataElement is an abstract class that defines the interface common to all metadata elements...
Definition: DtMetadataElement.h:22
DtSceneObject * myAttachedEntitySceneObject
Definition: DtMetadataPublisher.h:161
Definition: DtMetadataPublisher.h:178
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
int myBufferLength
Definition: DtMetadataPublisher.h:166
std::vector< DtMetadataElement * > MetadataElementList
Metadata Element list type.
Definition: DtMetadataPublisher.h:64
std::vector< DtElementID > myIgnoreList
ignore list for the intersection search (contain the current attach element ID)
Definition: DtMetadataPublisher.h:170
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:158
Contains the DtMetadataElement class declaration.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)