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

P_PrintTool.C

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: P_PrintTool.C,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.13 $       $Date: 2019/01/17 21:21:01 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *  Very simple tool that prints tracker position and orientation data
00019  *
00020  ***************************************************************************/
00021 
00022 #include "P_PrintTool.h"
00023 #include "utilities.h"
00024 #include "Matrix4.h"
00025 #include "Inform.h"
00026 
00027 PrintTool::PrintTool(int id, VMDApp *vmdapp, Displayable *disp) 
00028 : Tool(id, vmdapp, disp) {
00029   targetting=0;
00030 }
00031 
00032 void PrintTool::do_event() {
00033   float p[3];
00034   Matrix4 o;
00035 
00036   if(!position()) return;
00037   vec_copy(p, position());
00038   o = *orientation();
00039 
00040   msgInfo << "Tool[" << id() << "] pos: " 
00041           << p[0] << ", " << p[1] << ", " << p[2] << sendmsg;  
00042 
00043   msgInfo << "Tool[" << id() << "] orientation: " 
00044           << o.mat[ 0] << o.mat[ 1] << o.mat[ 2] << o.mat[ 3] 
00045           << o.mat[ 4] << o.mat[ 5] << o.mat[ 6] << o.mat[ 7] 
00046           << o.mat[ 8] << o.mat[ 9] << o.mat[10] << o.mat[11] 
00047           << o.mat[12] << o.mat[13] << o.mat[14] << o.mat[15] 
00048           << sendmsg;  
00049 }
00050 

Generated on Fri Oct 4 02:44:46 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002