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@interreality.org> 00025 */ 00026 00027 00028 00029 #include "mock_position.hh" 00030 00031 00032 MockPosition::MockPosition() : xpos(0), ypos(0), zpos(0) 00033 { 00034 } 00035 00036 00037 void MockPosition::getPosition(double* x, double* y, double* z) 00038 { 00039 *x = xpos * xScale + xOffset; 00040 *y = ypos * yScale + yOffset; 00041 *z = zpos * zScale + zOffset; 00042 } 00043 00044 void MockPosition::setPosition(double x, double y, double z) { 00045 xpos = x; 00046 ypos = y; 00047 zpos = z; 00048 }