transformCommand.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00040 
00041 #ifndef TRANSFORM_COMMAND_H_
00042 #define TRANSFORM_COMMAND_H_
00043 
00044 #include <pcl/apps/point_cloud_editor/command.h>
00045 #include <pcl/apps/point_cloud_editor/localTypes.h>
00046 #include <pcl/apps/point_cloud_editor/cloud.h>
00047 
00048 
00049 class TransformCommand : public Command
00050 {
00051   public:
00057     TransformCommand (ConstSelectionPtr selection_ptr, CloudPtr cloud_ptr,
00058                       const float* matrix, float translate_x,
00059                       float translate_y, float translate_z);
00060   
00062     ~TransformCommand ()
00063     {
00064     }
00065 
00066   protected:
00067     // Transforms the coorindates of the selected points according to the transform
00068     // matrix.
00069     void
00070     execute ();
00071 
00072     // Restore the coordinates of the transformed points.
00073     void
00074     undo ();
00075 
00076   private:
00078     TransformCommand (const TransformCommand&)
00079     {
00080     }
00081 
00083     TransformCommand&
00084     operator= (const TransformCommand&)
00085     {
00086       assert(false); return (*this);
00087     }
00088 
00092     void
00093     applyTransform(ConstSelectionPtr sel_ptr);
00094 
00096     SelectionPtr internal_selection_ptr_;
00097 
00100     float transform_matrix_[MATRIX_SIZE];
00101 
00102     float translate_x_, translate_y_, translate_z_;
00103 
00105     ConstSelectionPtr selection_ptr_;
00106 
00108     CloudPtr cloud_ptr_;
00109 
00111     float cloud_matrix_[MATRIX_SIZE];
00113     float cloud_matrix_inv_[MATRIX_SIZE];
00114 
00116     float cloud_center_[XYZ_SIZE];
00117 };
00118 
00119 #endif // TRANSFORM_COMMAND_H_


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:37:05