div class="twikiTopBar">

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

ErrorPoseAbility.h

Go to the documentation of this file.
00001 /* ========================================================================
00002  * Copyright (C) 2000-2004  Technische Universitaet Muenchen
00003  * License: GPL v2 (or later)
00004  *
00005  * For further information please contact the DWARF team at
00006  * <dwarf-gnu@augmentedreality.de>
00007  *
00008  * ErrorPoseAbility.h
00009  * Daniel Pustka <pustka@in.tum.de> April 2004
00010  * Distributed Wearable Augmented Reality Framework - www.augmentedreality.de
00011  * For documentation and instructions, see the DWARF documentation website at
00012  * http://wwwbruegge.in.tum.de/projects/dwarf/doc/
00013  *
00014  * For further questions about DWARF, please contact us at
00015  * <dwarf@augmentedreality.de>
00016  * For questions about this particular service, contact
00017  * Daniel Pustka <pustka@in.tum.de>
00018  *
00019  * $Id: ErrorPoseAbility.h,v 1.4 2004/08/31 17:25:30 strassef Exp $
00020  */
00021 
00022 /**
00023  * @file ErrorPoseAbility.h
00024  * @brief Header file containing for the ErrorVisualizer service.
00025  *
00026  * @author Daniel Pustka <pustka@in.tum.de>
00027  * @ingroup ErrorVisualizer
00028  */
00029 
00030 #ifndef __ErrorPoseAbility_H_
00031 #define __ErrorPoseAbility_H_
00032 
00033 // autoconf generated file with configuration information
00034 #ifdef HAVE_CONFIG_H
00035 #include <config.h>
00036 #endif
00037 
00038 #include <tnt.h>
00039 #include <memory>
00040 
00041 // DWARF headers
00042 #include <DWARF/ViewerControl.h>
00043 #include <ubitrack/PoseSender.h>
00044 #include "CovarianceEllipsoid.h"
00045 
00046 namespace DWARF {
00047 
00048         /**
00049          * Does the main work of the service:
00050          *  - Creates an ability out of a PoseData
00051          *  - adds objects to the viewer
00052          *  - transforms poses to error poses
00053          * @ingroup ErrorVisualizer
00054          */
00055         class ErrorPoseAbility
00056                 {
00057                 protected:
00058                         std::auto_ptr<PoseSender> m_pSender;
00059                         std::string m_sAbilityTarget;
00060                         std::string m_sTarget;
00061                         ViewerControl_var m_pViewer;
00062 
00063                         CovarianceEllipsoid m_PosEllipsoid;
00064                         CovarianceEllipsoid m_OriEllipsoidX;
00065                         CovarianceEllipsoid m_OriEllipsoidY;
00066                         CovarianceEllipsoid m_OriEllipsoidZ;
00067 
00068                         TNT::Array2D<double> CreateCovRot( const double* pVec,
00069                                 const TNT::Array2D<double>& RotCov );
00070 
00071                         void UpdateViewerRot( CovarianceEllipsoid& E, const char* pszObjName );
00072 
00073                 public:
00074                         ErrorPoseAbility( const char* pszSource, const char* pszTarget,
00075                                 DWARF::ActiveServiceDescription_ptr pServiceDescription );
00076 
00077                         void SetViewer( ViewerControl_ptr pViewer );
00078 
00079                         void TransformAndSendEvent( const PoseData& Pose );
00080                 };
00081 
00082 }
00083 #endif //__ErrorPoseAbility_H_

ErrorPoseAbility.h Source File | generated on Sun Apr 29 02:00:59 2007 by Doxygen 1.4.1 for DWARF