1 /********************************************************** 2 * Version $Id$ 3 *********************************************************/ 4 5 /////////////////////////////////////////////////////////// 6 // // 7 // SAGA // 8 // // 9 // System for Automated Geoscientific Analyses // 10 // // 11 // User Interface // 12 // // 13 // Program: SAGA // 14 // // 15 //-------------------------------------------------------// 16 // // 17 // WKSP_PointCloud.h // 18 // // 19 // Copyright (C) 2009 by Olaf Conrad // 20 // // 21 //-------------------------------------------------------// 22 // // 23 // This file is part of 'SAGA - System for Automated // 24 // Geoscientific Analyses'. SAGA is free software; you // 25 // can redistribute it and/or modify it under the terms // 26 // of the GNU General Public License as published by the // 27 // Free Software Foundation, either version 2 of the // 28 // License, or (at your option) any later version. // 29 // // 30 // SAGA is distributed in the hope that it will be // 31 // useful, but WITHOUT ANY WARRANTY; without even the // 32 // implied warranty of MERCHANTABILITY or FITNESS FOR A // 33 // PARTICULAR PURPOSE. See the GNU General Public // 34 // License for more details. // 35 // // 36 // You should have received a copy of the GNU General // 37 // Public License along with this program; if not, see // 38 // <http://www.gnu.org/licenses/>. // 39 // // 40 //-------------------------------------------------------// 41 // // 42 // contact: Olaf Conrad // 43 // Institute of Geography // 44 // University of Hamburg // 45 // Germany // 46 // // 47 // e-mail: oconrad@saga-gis.org // 48 // // 49 /////////////////////////////////////////////////////////// 50 51 //--------------------------------------------------------- 52 53 54 /////////////////////////////////////////////////////////// 55 // // 56 // // 57 // // 58 /////////////////////////////////////////////////////////// 59 60 //--------------------------------------------------------- 61 #ifndef _HEADER_INCLUDED__SAGA_GUI__WKSP_PointCloud_H 62 #define _HEADER_INCLUDED__SAGA_GUI__WKSP_PointCloud_H 63 64 65 /////////////////////////////////////////////////////////// 66 // // 67 // // 68 // // 69 /////////////////////////////////////////////////////////// 70 71 //--------------------------------------------------------- 72 #include "wksp_layer.h" 73 74 75 /////////////////////////////////////////////////////////// 76 // // 77 // // 78 // // 79 /////////////////////////////////////////////////////////// 80 81 //--------------------------------------------------------- 82 class CWKSP_PointCloud : public CWKSP_Layer 83 { 84 public: 85 CWKSP_PointCloud(CSG_PointCloud *pPointCloud); 86 virtual ~CWKSP_PointCloud(void); 87 Get_Type(void)88 virtual TWKSP_Item Get_Type (void) { return( WKSP_ITEM_PointCloud ); } 89 Get_PointCloud(void)90 CSG_PointCloud * Get_PointCloud (void) { return( (CSG_PointCloud *)m_pObject ); } Get_Table(void)91 class CWKSP_Table * Get_Table (void) { return( m_pTable ); } 92 93 virtual wxString Get_Description (void); 94 95 virtual wxMenu * Get_Menu (void); 96 97 virtual bool On_Command (int Cmd_ID); 98 virtual bool On_Command_UI (wxUpdateUIEvent &event); 99 100 virtual wxString Get_Value (CSG_Point ptWorld, double Epsilon); 101 virtual double Get_Value_Minimum (void); 102 virtual double Get_Value_Maximum (void); 103 virtual double Get_Value_Range (void); 104 virtual double Get_Value_Mean (void); 105 virtual double Get_Value_StdDev (void); 106 Get_Field_Value(void)107 int Get_Field_Value (void) { return( m_fValue ); } 108 109 bool asImage (CSG_Grid *pImage); 110 111 wxString Get_Name_Attribute (void); 112 113 virtual wxMenu * Edit_Get_Menu (void); 114 virtual TSG_Rect Edit_Get_Extent (void); 115 virtual bool Edit_On_Mouse_Up (CSG_Point Point, double ClientToWorld, int Key); 116 virtual bool Edit_Set_Index (int Index); 117 virtual bool Edit_Set_Attributes (void); 118 119 120 protected: 121 122 virtual void On_Create_Parameters (void); 123 virtual void On_DataObject_Changed (void); 124 virtual void On_Parameters_Changed (void); 125 virtual void On_Update_Views (void); 126 127 virtual int On_Parameter_Changed (CSG_Parameters *pParameters, CSG_Parameter *pParameter, int Flags); 128 129 virtual void On_Draw (CWKSP_Map_DC &dc_Map, int Flags); 130 131 132 private: 133 134 int m_fValue, m_PointSize, m_Aggregation; 135 136 wxColour m_Color_Pen; 137 138 CSG_Grid m_Z, m_N; 139 140 class CWKSP_Table *m_pTable; 141 142 143 void _LUT_Create (void); 144 145 void _Draw_Point (CWKSP_Map_DC &dc_Map, int x, int y, double z, int Color); 146 void _Draw_Point (CWKSP_Map_DC &dc_Map, int x, int y, double z, int Color, int Radius); 147 void _Draw_Points (CWKSP_Map_DC &dc_Map); 148 void _Draw_Thumbnail (CWKSP_Map_DC &dc_Map); 149 150 void _AttributeList_Set (CSG_Parameter *pFields, bool bAddNoField); 151 152 }; 153 154 155 /////////////////////////////////////////////////////////// 156 // // 157 // // 158 // // 159 /////////////////////////////////////////////////////////// 160 161 //--------------------------------------------------------- 162 #endif // #ifndef _HEADER_INCLUDED__SAGA_GUI__WKSP_PointCloud_H 163