activecoordinateframe.h
Go to the documentation of this file.
00001 /****************************************************************************
00002  * MeshLab                                                           o o     *
00003  * A versatile mesh processing toolbox                             o     o   *
00004  *                                                                _   O  _   *
00005  * Copyright(C) 2008                                                \/)\/    *
00006  * Visual Computing Lab                                            /\/|      *
00007  * ISTI - Italian National Research Council                           |      *
00008  *                                                                    \      *
00009  * All rights reserved.                                                      *
00010  *                                                                           *
00011  * This program is free software; you can redistribute it and/or modify      *
00012  * it under the terms of the GNU General Public License as published by      *
00013  * the Free Software Foundation; either version 2 of the License, or         *
00014  * (at your option) any later version.                                       *
00015  *                                                                           *
00016  * This program is distributed in the hope that it will be useful,           *
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
00019  * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)          *
00020  * for more details.                                                         *
00021  *                                                                           *
00022  ****************************************************************************/
00023 /****************************************************************************
00024   History
00025 $Log: not supported by cvs2svn $
00026 Revision 1.1  2008/03/02 16:44:18  benedetti
00027 moved ActiveCoordinateFrame to its own files
00028 
00029 
00030 ****************************************************************************/
00031 #ifndef ACTIVECOORDINATEFRAME_H
00032 #define ACTIVECOORDINATEFRAME_H
00033 
00034 #include "coordinateframe.h"
00035 #include <wrap/gui/trackball.h>
00036 #include <QGLWidget>
00037 
00038 namespace vcg {
00039 
00045 class ActiveCoordinateFrame: public MovableCoordinateFrame
00046 {
00047 public:
00054   ActiveCoordinateFrame(float size);
00055 
00061   virtual ~ActiveCoordinateFrame();
00062 
00068   virtual void Render(QGLWidget* glw);
00069 
00076   virtual void Reset(bool reset_position,bool reset_alignment);
00082   virtual void SetPosition(const Point3f new_position);
00083 
00089   virtual void SetRotation(const Quaternionf rotation);
00090   
00105   virtual void AlignWith(const Point3f primary, const Point3f secondary, const char axis_1, const char axis_2);
00106 
00114   void MouseDown(int x, int y, int button);
00115 
00122   void MouseMove(int x, int y); 
00123 
00131   void MouseUp(int x, int y, int button);
00132 
00138   void ButtonUp(int button);
00139 
00145   void ButtonDown(int button);
00146   
00152   void SetSnap(float value);
00153 
00155   Trackball *manipulator;
00156   
00158   bool drawmoves;
00159   
00161   bool drawrotations;
00162 protected:
00163   // data:
00164   const int move_button,rotate_button;
00165   const int x_modifier,y_modifier,z_modifier;
00166   Point3f x_axis,y_axis,z_axis;
00167   float rot_snap_rad,mov_snap;
00168   // functions: 
00169   virtual void Move(const Similarityf);
00170   void Update();
00171 private:
00172   int movx,movy,movz,rotx,roty,rotz;
00173 };
00174 
00175 }//namespace
00176 #endif /*ACTIVECOORDINATEFRAME_H*/


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:28:51