VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtMetadataPublisher Class Reference

DtMetadataPublisher defines the interface for all metadata publishers, as well as the implementation of some standard methods.

Inheritance diagram for makVrv::DtMetadataPublisher:
Inheritance graph
[legend]

Public Types

typedef std::vector
< DtMetadataElement * > 
MetadataElementList
 

Public Member Functions

virtual ~DtMetadataPublisher ()
 
virtual void realize (const makArchives::DtMetadataPublisherRecord &metadataConfig)
 
virtual void setObserverName (const DtUnicode &observerName)
 
virtual bool isAttached ()
 
virtual void attachEntity (makVrv::DtUniqueID entity)
 
virtual void detach ()
 
virtual void addMetadataElement (DtMetadataElement *element)
 
virtual MetadataElementListMetadataElement ()
 
virtual void tick (double dt)
 
virtual int numBytes ()
 
virtual unsigned charbytes ()
 
virtual const DtVideoStreamvideoStream ()
 
virtual const DtSceneObjectattachedEntitySceneObject ()
 
virtual const DtObserverobserver ()
 
virtual bool haveValidTargetPoint () const
 
virtual DtVector targetPoint () const
 
virtual DtDede ()
 
virtual long long frameIndex (void) const
 

Protected Member Functions

 DtMetadataPublisher (DtDe &de, const DtVideoStream &videoStream)
 
virtual void slot_attachToChanged (makVrv::DtObserver *obs)
 
virtual void slot_destroyObserver (makVrv::DtObserver *obs)
 
virtual DtSceneObjectfindSceneObjectFromElement (const DtElementID &id)
 
virtual void updateTargetPoint ()
 

Protected Attributes

DtDemyDe
 
const DtVideoStreammyVideoStream
 
MetadataElementList myElements
 
DtObservermyObserver
 
DtChannelmyChannel
 
DtSceneObjectmyAttachedEntitySceneObject
 
bool myIsAttached
 
makVrv::DtUniqueID myAttachedEntity
 
unsigned charmyBuffer
 
int myBufferLength
 
bool myValidTargetPoint
 
DtVector myTargetPoint
 
std::vector< DtElementIDmyIgnoreList
 
DtIntersectormyIntersector = nullptr
 
long long myFrameIndex = -1
 

Private Member Functions

 DtMetadataPublisher ()
 
 DtMetadataPublisher (const DtMetadataPublisher &orig)
 
DtMetadataPublisheroperator= (const DtMetadataPublisher &rhs)
 

Friends

class DtMetadataPublisherCreator
 

Member Typedef Documentation

Metadata Element list type.

Constructor & Destructor Documentation

virtual makVrv::DtMetadataPublisher::~DtMetadataPublisher ( )
virtual

DTOR.

makVrv::DtMetadataPublisher::DtMetadataPublisher ( DtDe de,
const DtVideoStream videoStream 
)
protected

CTOR. Only called by creator.

makVrv::DtMetadataPublisher::DtMetadataPublisher ( )
private

Default CTOR (unimplemented)

makVrv::DtMetadataPublisher::DtMetadataPublisher ( const DtMetadataPublisher orig)
private

Copy CTOR (unimplemented)

Member Function Documentation

virtual void makVrv::DtMetadataPublisher::realize ( const makArchives::DtMetadataPublisherRecord metadataConfig)
virtual

Initialize a publisher from a DtMetadataPublisherRecord.

virtual void makVrv::DtMetadataPublisher::setObserverName ( const DtUnicode observerName)
virtual

Set the name of the observer that this publisher will track.

virtual bool makVrv::DtMetadataPublisher::isAttached ( )
virtual

Get whether the publisher is attached to an entity other than the observer.

virtual void makVrv::DtMetadataPublisher::attachEntity ( makVrv::DtUniqueID  entity)
virtual

Tell the publisher to attach to an entity.

virtual void makVrv::DtMetadataPublisher::detach ( )
virtual

Tell the publisher to detach from an entity (and re-attach to the named observer.

virtual void makVrv::DtMetadataPublisher::addMetadataElement ( DtMetadataElement element)
virtual

Add a metadata element. A directed graph of elements can be managed by a publisher. This publisher takes ownership; it is responsible for deleting the element.

virtual MetadataElementList& makVrv::DtMetadataPublisher::MetadataElement ( )
virtual

Return the list of metadata element.

virtual void makVrv::DtMetadataPublisher::tick ( double  dt)
virtual

Tick the publisher.

Reimplemented in makVrv::DtLocalMetadataPublisher, and makVrv::DtMmsMetadataPublisher.

virtual int makVrv::DtMetadataPublisher::numBytes ( )
virtual
virtual unsigned char* makVrv::DtMetadataPublisher::bytes ( )
virtual

Get the publisher's buffer of metadata.

virtual const DtVideoStream& makVrv::DtMetadataPublisher::videoStream ( )
virtual

Get the video stream that the metadata is being added to. Most metadata elements don't need this, but a few do; since all metadata elements have a reference to the publisher that created them. this provides a way to access it.

virtual const DtSceneObject& makVrv::DtMetadataPublisher::attachedEntitySceneObject ( )
virtual

Get the DtSceneObject that we are attached to, if attached to an entity rather than an observer (isAttached is true).

Exceptions
DtCorruptedStateif not attached. Most metadata elements don't need this, but a few do; since all metadata elements have a reference to the publisher that created them. this provides a way to access it.
virtual const DtObserver& makVrv::DtMetadataPublisher::observer ( )
virtual

Get the observer that we are attached to (or assigned to if currently attached to an entity).

Exceptions
DtCorruptedStateif the observer specified at initialization does not exist. Most metadata elements don't need this, but a few do; since all metadata elements have a reference to the publisher that created them. this provides a way to access it.
virtual bool makVrv::DtMetadataPublisher::haveValidTargetPoint ( ) const
virtual

The publisher calculates the point intersected by a ray shot from the center of the view. This will be false if there is no intersection (a sky shot).

virtual DtVector makVrv::DtMetadataPublisher::targetPoint ( ) const
virtual

If haveValidTargetPoint() is true, this returns it. Otherwise it is undefined.

virtual DtDe& makVrv::DtMetadataPublisher::de ( )
virtual

Get the local display engine object. Most metadata elements don't need this, but a few do; since all metadata elements have a reference to the publisher that created them. this provides a way to access it.

virtual long long makVrv::DtMetadataPublisher::frameIndex ( void  ) const
virtual

Get the frame index of the current tick.

virtual void makVrv::DtMetadataPublisher::slot_attachToChanged ( makVrv::DtObserver obs)
protectedvirtual

Method called when DtAttachManager::signal_attachToChanged is raised.

virtual void makVrv::DtMetadataPublisher::slot_destroyObserver ( makVrv::DtObserver obs)
protectedvirtual

Method called when DtObserver::~DtObserver() is called on the current observer.

virtual DtSceneObject* makVrv::DtMetadataPublisher::findSceneObjectFromElement ( const DtElementID id)
protectedvirtual

Look up the 3D scene object using the element ID of the entity attached to.

virtual void makVrv::DtMetadataPublisher::updateTargetPoint ( )
protectedvirtual

Find the intersection with the terrain of the ray shot from the center of our observer's view.

DtMetadataPublisher& makVrv::DtMetadataPublisher::operator= ( const DtMetadataPublisher rhs)
private

Assignment Operator (unimplemented)

Friends And Related Function Documentation

friend class DtMetadataPublisherCreator
friend

Member Data Documentation

DtDe& makVrv::DtMetadataPublisher::myDe
protected
const DtVideoStream& makVrv::DtMetadataPublisher::myVideoStream
protected
MetadataElementList makVrv::DtMetadataPublisher::myElements
protected
DtObserver* makVrv::DtMetadataPublisher::myObserver
protected
DtChannel* makVrv::DtMetadataPublisher::myChannel
protected
DtSceneObject* makVrv::DtMetadataPublisher::myAttachedEntitySceneObject
protected
bool makVrv::DtMetadataPublisher::myIsAttached
protected
makVrv::DtUniqueID makVrv::DtMetadataPublisher::myAttachedEntity
protected
unsigned char* makVrv::DtMetadataPublisher::myBuffer
protected
int makVrv::DtMetadataPublisher::myBufferLength
protected
bool makVrv::DtMetadataPublisher::myValidTargetPoint
protected
DtVector makVrv::DtMetadataPublisher::myTargetPoint
protected
std::vector<DtElementID> makVrv::DtMetadataPublisher::myIgnoreList
protected

ignore list for the intersection search (contain the current attach element ID)

DtIntersector* makVrv::DtMetadataPublisher::myIntersector = nullptr
protected
long long makVrv::DtMetadataPublisher::myFrameIndex = -1
protected

tick counter


The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)