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/position.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) 2002 Reed Hedges
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     Reed Hedges <reed@zerohour.net>
00025 */
00026 
00027 #ifndef _POSITIONTRK_HH_
00028 #define _POSITIONTRK_HH_
00029 
00030 #include "tracker.hh"
00031 
00032 
00033 /** This class provides an interface for position information */
00034 class Position : public Tracker
00035 {   
00036 protected:
00037     double xScale;
00038     double yScale;
00039     double zScale;
00040     double xOffset;
00041     double yOffset;
00042     double zOffset;
00043 
00044 public:
00045     /** Constructor. */
00046     Position() : Tracker(), xScale(1), yScale(1), zScale(1), xOffset(0), yOffset(0), zOffset(0) {}
00047     
00048     /** Get position.  x and z are horizontal axes, y is vertical. Scale and
00049      * origin are (unfortunately) tracker-dependent. */
00050     virtual void getPosition(double* x, double* y, double* z) = 0;
00051 
00052     /** Set scaling */
00053     virtual void setScaling(double x, double y, double z) {
00054         xScale = x;
00055         yScale = y;
00056         zScale = z;
00057     }
00058 
00059     /** Set offset */
00060     virtual void setOffsets(double x, double y, double z) {
00061         xOffset = x;
00062         yOffset = y;
00063         zOffset = z;
00064     }
00065 };
00066 
00067 
00068 #endif

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