Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/corelibs/tracking/orientation.hh

Go to the documentation of this file.
00001 /*
00002     This file is part of the Virtual Object System of
00003     the Interreality project (http://interreality.org).
00004 
00005     Copyright (C) 2001, 2002 Peter Amstutz
00006 
00007     This software was written at the University of Massachusetts with
00008     support from NSF grant #EIA 9703217
00009 
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Lesser General Public
00012     License as published by the Free Software Foundation; either
00013     version 2 of the License, or (at your option) any later version.
00014 
00015     This library is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018     Lesser General Public License for more details.
00019 
00020     You should have received a copy of the GNU Lesser General Public
00021     License along with this library; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023 
00024     Peter Amstutz <tetron@interreality.org>
00025 */
00026 
00027 #ifndef _ORIENTATION_HH_
00028 #define _ORIENTATION_HH_
00029 
00030 #include "tracker.hh"
00031 
00032 
00033 /** This class provides an interface for orientation information */
00034 class Orientation : public Tracker
00035 {   
00036 protected:
00037     double eulerYawOffset;
00038     double eulerPitchOffset;
00039     double eulerRollOffset;
00040     
00041 public:
00042     /** Constructor */
00043     Orientation() : Tracker(), eulerYawOffset(0), eulerPitchOffset(0), eulerRollOffset(0) {}
00044 
00045     /** Get an orientaiton matrix [x1 x2 x3][y1 y2 y3][z1 z2 z3] */
00046     virtual void getOrientationMatrix(double mat[3][3]) = 0;
00047 
00048     /** Get yaw, pitch and roll Euler angles */
00049     virtual void getEulerAngles(double* yaw, double* pitch, double* roll) = 0;
00050 
00051     /** Set euler offsets */
00052     virtual void setOffsets(double yaw, double pitch, double roll) {
00053         eulerYawOffset = yaw;
00054         eulerPitchOffset = pitch;
00055         eulerRollOffset = roll;
00056     }
00057         
00058         
00059 };
00060 
00061 
00062 #endif

Generated on Tue Aug 12 03:55:38 2003 for Interreality Project - VOS by doxygen 1.3.2