00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #ifndef _HOpNetwork_H 00011 #define _HOpNetwork_H 00012 00013 #ifdef H_PACK_8 00014 #pragma pack(push) 00015 #pragma pack(8) 00016 #endif 00017 00018 #include "HTools.h" 00019 #include "HBaseOperator.h" 00020 #include "HBaseView.h" 00021 00023 00034 class MVO_API HOpNetwork : public HBaseOperator 00035 { 00036 public: 00040 HOpNetwork(HBaseView * view); 00041 00042 virtual ~HOpNetwork(); 00043 00048 virtual int OnLButtonDown(HEventInfo &hevent); 00049 00054 virtual int OnLButtonDownAndMove(HEventInfo &hevent); 00055 00060 virtual int OnLButtonUp(HEventInfo &hevent); 00061 00062 00067 virtual int OnRButtonDown(HEventInfo &hevent); 00068 00073 virtual int OnRButtonDownAndMove(HEventInfo &hevent); 00074 00080 virtual int OnRButtonUp(HEventInfo &hevent); 00081 00082 00083 protected: 00084 00085 HC_KEY m_NetworkKey; //< The key to the network segment. 00086 HC_KEY m_NodesKey; //< The key to the node segment where all the nodes are inserted. 00087 HC_KEY m_SelectedNodeKey; //< The current selected node. 00088 HC_KEY m_SelectedLineKey; //< The current selected connection. 00089 00099 HC_KEY My_KInsert_Line(float x1, float y1, float z1, float x2, float y2, float z2); 00100 00111 void My_Line_Common(HC_KEY key, float x1, float y1, float z1, float x2, float y2, float z2); 00112 00122 void My_Edit_Line(HC_KEY key, float x1, float y1, float z1, float x2, float y2, float z2); 00123 00127 void My_Delete_Line(HC_KEY key); 00128 00135 HC_KEY My_KInsert_Node(float x, float y, float z); 00136 00143 void My_Edit_Node(HC_KEY key, float x, float y, float z); 00144 00151 void Show_Node_Position(HC_KEY key, float &x, float &y, float &z); 00152 00154 HC_KEY Get_Node_Key(HC_KEY key); 00155 00159 void My_Open_Node(HC_KEY key); 00160 00164 void My_Close_Node(); 00165 00170 HC_KEY My_Renumber_Key(HC_KEY key); 00171 00173 HC_KEY GetNextKey(); 00174 00175 }; 00176 00177 00178 #ifdef H_PACK_8 00179 #pragma pack(pop) 00180 #endif 00181 00182 #endif 00183 00184 00185 00186 00187 00188 00189