VR-Forces 4.1.1 Class Documentation
List of all members | 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. More...

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

Public Member Functions

virtual ~DtMetadataPublisher ()
 DTOR.
virtual void realize (const makArchives::DtMetadataPublisherRecord &metadataConfig)
 Initialize a publisher from a DtMetadataPublisherRecord.
virtual void setObserverName (const DtUnicode &observerName)
 Set the name of the observer that this publisher will track.
virtual bool isAttached ()
 Get whether the publisher is attached to an entity other than the observer.
virtual void attachEntity (makVrv::DtUniqueID entity)
 Tell the publisher to attach to an entity.
virtual void detach ()
 Tell the publisher to detach from an entity (and re-attach to the named observer.
virtual void addMetadataElement (DtMetadataElement *element)
 Add a metadata element.
virtual void tick (double dt)
 Tick the publisher.
virtual int numBytes ()
virtual unsigned char * getBytes ()
 Get the publisher's buffer of metadata.
virtual const DtVideoStreamvideoStream ()
 Get the video stream that the metadata is being added to.
virtual const DtSceneObjectattachedEntitySceneObject ()
 Get the DtSceneObject that we are attached to, if attached to an entity rather than an observer (isAttached is true).
virtual const DtObserverobserver ()
 Get the observer that we are attached to (or assigned to if currently attached to an entity).
virtual bool haveValidTargetPoint () const
 The publisher calculates the point intersected by a ray shot from the center of the view.
virtual DtVector targetPoint () const
 If haveValidTargetPoint() is true, this returns it.
virtual DtDede ()
 Get the local display engine object.

Protected Member Functions

 DtMetadataPublisher (DtDe &de, const DtVideoStream &videoStream)
 CTOR. Only called by creator.
virtual void slot_attachToChanged (makVrv::DtObserver *obs)
 Method called when DtAttachManager::signal_attachToChanged is raised.
virtual DtSceneObjectfindSceneObjectFromElement (const DtElementID &id)
 Look up the 3D scene object using the element ID of the entity attached to.
virtual void updateTargetPoint ()
 Find the intersection with the terrain of the ray shot from the center of our observer's view.

Protected Attributes

DtDemyDe
const DtVideoStreammyVideoStream
std::vector< DtMetadataElement * > myElements
DtObservermyObserver
DtSceneObjectmyAttachedEntitySceneObject
bool myIsAttached
makVrv::DtUniqueID myAttachedEntity
unsigned char * myBuffer
int myBufferLength
bool myValidTargetPoint
DtVector myTargetPoint

Private Member Functions

 DtMetadataPublisher ()
 Default CTOR (unimplemented)
 DtMetadataPublisher (const DtMetadataPublisher &orig)
 Copy CTOR (unimplemented)
DtMetadataPublisheroperator= (const DtMetadataPublisher &rhs)
 Assignment Operator (unimplemented)

Friends

class DtMetadataPublisherCreator
 Only a DtMetadataPublisherCreator may construct a DtMetadataPublisher.

Detailed Description

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

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 publihser takes ownership; it is responsible for deleting the 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::getBytes ( )
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 void makVrv::DtMetadataPublisher::slot_attachToChanged ( makVrv::DtObserver obs)
protectedvirtual

Method called when DtAttachManager::signal_attachToChanged is raised.

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
std::vector<DtMetadataElement*> makVrv::DtMetadataPublisher::myElements
protected
DtObserver* makVrv::DtMetadataPublisher::myObserver
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

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)