WorldEditorView.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // WorldEditorView.h : interface of the CWorldEditorView class
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15. #ifndef WORLDEDITORVIEW_H
  16. #define WORLDEDITORVIEW_H 1
  17. extern BOOL MyChooseColor( COLORREF &clrNewColor, CWnd &wndOwner);
  18. #define WM_CHANGE_EDITING_MODE WM_USER
  19. #define GRID_DISCRETE_VALUES (theApp.m_bDecadicGrid ? 10:8)
  20. // mip modes (modes for setting or changing mip switch factors)
  21. #define MM_NONE 0 // not active
  22. #define MM_SETTING 1 // setting mip switch factor for current brush
  23. #define MM_MANUAL 2 // setting manual mip factor
  24. #define OVXF_CLOSEST (1L<<8)
  25. #define OVXF_SELECTED (1L<<9)
  26. enum InputAction {
  27. IA_NONE = 0,
  28. IA_DRAG_VERTEX_ON_PRIMITIVE,
  29. IA_DRAG_VERTEX_ON_PRIMITIVE_BASE,
  30. IA_SELECT_SINGLE_BRUSH_VERTEX,
  31. IA_SELECT_LASSO_BRUSH_VERTEX,
  32. IA_DRAG_BRUSH_VERTEX_IN_FLOOR_PLANE,
  33. IA_DRAG_BRUSH_VERTEX_IN_VIEW_PLANE,
  34. IA_ROTATE_BRUSH_VERTEX,
  35. IA_STRETCH_BRUSH_VERTEX,
  36. IA_STRETCHING_PRIMITIVE,
  37. IA_SHEARING_PRIMITIVE,
  38. IA_TERRAIN_EDITING_LMB,
  39. IA_TERRAIN_EDITING_CTRL_LMB,
  40. IA_MOVING_VIEWER_IN_FLOOR_PLANE,
  41. IA_MOVING_VIEWER_IN_VIEW_PLANE,
  42. IA_MOVING_SECOND_LAYER_IN_FLOOR_PLANE,
  43. IA_MOVING_SECOND_LAYER_IN_VIEW_PLANE,
  44. IA_MOVING_ENTITY_SELECTION_IN_FLOOR_PLANE,
  45. IA_MOVING_ENTITY_SELECTION_IN_VIEW_PLANE,
  46. IA_MOVING_POLYGON_MAPPING,
  47. IA_ROTATING_VIEWER,
  48. IA_ROTATING_ENTITY_SELECTION,
  49. IA_ROTATING_SECOND_LAYER,
  50. IA_ROTATING_POLYGON_MAPPING,
  51. IA_MEASURING,
  52. IA_CUT_MODE,
  53. IA_MOVING_CUT_LINE_START,
  54. IA_MOVING_CUT_LINE_END,
  55. IA_SIZING_SELECT_BY_VOLUME_BOX,
  56. IA_SELECTING_POLYGONS,
  57. IA_SELECTING_SECTORS,
  58. IA_SELECTING_ENTITIES,
  59. IA_SELECT_LASSO_ENTITY,
  60. IA_MIP_SETTING,
  61. IA_MANUAL_MIP_SWITCH_FACTOR_CHANGING,
  62. IA_CHANGING_RANGE_PROPERTY,
  63. IA_CHANGING_ANGLE3D_PROPERTY,
  64. };
  65. class CWorldEditorView : public CView
  66. {
  67. protected: // create from serialization only
  68. CWorldEditorView();
  69. DECLARE_DYNCREATE(CWorldEditorView)
  70. // Attributes
  71. public:
  72. InputAction m_iaInputAction;
  73. InputAction m_iaLastInputAction;
  74. BOOL m_bTestGameOn;
  75. CBrushMip *m_pbmToSetMipSwitch;
  76. COleDataSource m_DataSource; // to enable drag and drop
  77. CTimerValue m_tvLastTime; // last time view was refreshed
  78. CViewPrefs m_vpViewPrefs; // current rendering preferences
  79. CTextureObject m_toBcgPicture;// used for background texture
  80. CTString m_strMeasuring;
  81. CChangeableRT m_chViewChanged;// when view has been rendered
  82. BOOL m_bCutMode; // if we are in cut mode
  83. // type of view
  84. enum CSlaveViewer::ProjectionType m_ptProjectionType;
  85. BOOL m_bWeDeselectedFirstPolygon;
  86. BOOL m_bWeDeselectedFirstSector;
  87. CPoint m_ptMouseDown; // mouse position at mouse down time
  88. CStaticStackArray<PIX2D> m_avpixLaso; // coordinates for laso
  89. BOOL m_bRequestVtxClickSelect; // if vertex select test requested from renderer
  90. BOOL m_bRequestVtxLassoSelect; // if vertex laso select test requested from renderer
  91. BOOL m_bRequestEntityLassoSelect; // if vertex laso select test requested from renderer
  92. BOOL m_bOnSelectVertexAltDown; // if alt was down during vertex select start
  93. BOOL m_bOnSelectVertexShiftDown; // if shift was down during vertex select start
  94. BOOL m_bOnSelectEntityAltDown; // if alt was down during entity lasso select start
  95. BOOL m_bOnSelectEntityShiftDown; // if shift was down during entity lasso select start
  96. FLOAT3D m_vHitOnMouseDown;
  97. CPoint m_ptMouse; // current mouse position
  98. FLOAT m_fpixGridSteep; // steep in float pixels f of grid line
  99. FLOAT3D m_f3dRotationOrigin; // used as rotation origin while changing mapping coordinates
  100. FLOATplane3D m_plTranslationPlane; // plane used for polgon mapping translation
  101. CPlacement3D m_plMouseMove; // used for continous mouse editting
  102. CPlacement3D m_plMouseOffset; // used for offseted mouse editting
  103. CBrushPolygon *m_pbpoTranslationPlane;
  104. // current grid in meters
  105. FLOAT m_fGridInMeters;
  106. FLOAT m_fGridX;
  107. FLOAT m_fGridY;
  108. CTString m_strTest;
  109. BOOL m_bEntityHitedOnContext;
  110. CPlacement3D m_plEntityHitOnContext;
  111. CEntity *m_penEntityHitOnContext;
  112. CBrushPolygon *m_pbpoRightClickedPolygon;
  113. CTString m_strTerrainDataPaneText;
  114. // index of vertice on primitive base that user is currently dragging
  115. INDEX m_iDragVertice;
  116. INDEX m_iDragEdge;
  117. // index of size control vertice
  118. INDEX m_iSizeControlVertice;
  119. FLOAT3D m_vMouseDownSecondLayer;
  120. // position of vertice on primitive base before drag started
  121. DOUBLE3D m_vStartDragVertice;
  122. // position of edge center on primitive base before drag started
  123. DOUBLE3D m_vStartDragEdge;
  124. // position of vertice of object 3D before drag started
  125. DOUBLE3D m_vStartDragO3DVertice;
  126. // values for primitive are remembered here when LMB is pressed (for latere continous moving)
  127. CValuesForPrimitive m_VFPMouseDown;
  128. CDrawPort *m_pdpDrawPort;
  129. CViewPort *m_pvpViewPort;
  130. COleDropTarget m_DropTarget;
  131. CTFileName m_fnWinBcgTexture;
  132. COLORREF m_SelectionColor;
  133. COLORREF m_PaperColor;
  134. COLORREF m_InkColor;
  135. BOOL m_IsWinBcgTexture;
  136. // Operations
  137. public:
  138. // obtain draw port
  139. inline CDrawPort *GetDrawPort( void) {
  140. if( theApp.m_bChangeDisplayModeInProgress)
  141. return NULL;
  142. else
  143. return m_pdpDrawPort;
  144. };
  145. // obtain view port
  146. inline CViewPort *GetViewPort( void)
  147. {
  148. if( theApp.m_bChangeDisplayModeInProgress)
  149. return NULL;
  150. else
  151. return m_pvpViewPort;
  152. };
  153. void GetToolTipText( char *pToolTipText);
  154. // renders one picture
  155. void RenderView( CDrawPort *pDP);
  156. // obtain information about what was hit with mouse
  157. CCastRay GetMouseHitInformation( CPoint point, BOOL bHitPortals = FALSE,
  158. BOOL bHitModels = TRUE, BOOL bHitFields = TRUE, CEntity *penSourceEntity = NULL, BOOL bHitBrushes=TRUE);
  159. FLOAT3D GetMouseHitOnPlane( CPoint point, const FLOATplane3D &plPlane);
  160. // Start and stop functions that are called for start moving/rotating
  161. void ToggleHittedPolygon( CCastRay &crRayHit);
  162. void ToggleHittedSector( CCastRay &crRayHit);
  163. void StartMouseInput( CPoint point);
  164. void StopMouseInput( void);
  165. void MarkClosestVtxOnPrimitive( BOOL bToggleSelection);
  166. void MarkClosestVtxAndEdgeOnPrimitiveBase(CPoint point);
  167. void DragVerticesOnPrimitive(FLOAT fDX,FLOAT fDY,FLOAT fDZ, BOOL bAbsolute, BOOL bSnap=TRUE);
  168. void DragBrushVertex(FLOAT fDX,FLOAT fDY,FLOAT fDZ);
  169. void RotateOrStretchBrushVertex(FLOAT fDX, FLOAT fDY, BOOL bRotate);
  170. // Fills status line's editing data info pane
  171. void SetEditingDataPaneInfo(BOOL bImidiateRepainting);
  172. CWorldEditorDoc* GetDocument(void);
  173. /* gets pointer to MDIFrameWnd main frame of application */
  174. CMainFrame *GetMainFrame(void);
  175. /* set parameters for projection depending on current rendering preferences. */
  176. void SetProjection(CDrawPort *pDP);
  177. /* called by document at the beginning of CSG */
  178. void AtStartCSG(void);
  179. /* called by document at the end of CSG */
  180. void AtStopCSG(void);
  181. /* get pointer to the child frame of this view */
  182. CChildFrame *GetChildFrame(void);
  183. /* if delete entity operation is allowed returns true */
  184. BOOL IsDeleteEntityEnabled(void);
  185. // remove given entity from linked chain
  186. void RemoveFromLinkedChain(CEntity *pen);
  187. /* Returns curently active mip factor (auto or manual one) */
  188. FLOAT GetCurrentlyActiveMipFactor(void);
  189. /* obtain point in the world where mouse pointed last time it was moved */
  190. CPlacement3D GetMouseInWorldPlacement(void);
  191. void CreatePrimitiveCalledFromPopup();
  192. void RenderBackdropTexture(CDrawPort *pDP,FLOAT3D v0, FLOAT3D v1, FLOAT3D v2, FLOAT3D v3,
  193. CTextureObject &to);
  194. void OnAlignPrimitive(void);
  195. void CenterSelected(void);
  196. void AllignBox( FLOATaabbox3D bbox);
  197. void AllignPolygon( CBrushPolygon *pbpo);
  198. void EditCopy( BOOL bAlternative);
  199. void CopyMapping(CBrushPolygon *pbpo);
  200. void PasteMappingOnOnePolygon(CBrushPolygon *pbpo, BOOL bAsProjected);
  201. void PasteMapping(CBrushPolygon *pbpo, BOOL bAsProjected);
  202. void PasteOneLayerMapping(INDEX iLayer, CMappingDefinition &md,
  203. FLOATplane3D &pl, CBrushPolygon *pbpo, BOOL bAsProjected);
  204. void PasteTexture( CBrushPolygon *pbpoPolygon);
  205. void CopySectorAmbient( CBrushSector *pbscSector);
  206. void PasteSectorAmbient( CBrushSector *pbscSector);
  207. void StorePolygonSelection(CBrushPolygonSelection &selPolygons,
  208. CDynamicContainer<CBrushPolygon> &dcPolygons);
  209. void RestorePolygonSelection(CBrushPolygonSelection &selPolygons,
  210. CDynamicContainer<CBrushPolygon> &dcPolygons);
  211. void DiscardShadows( CEntity *penEntity);
  212. void DiscardShadows( CBrushSector *pbscSector);
  213. void DiscardShadows( CBrushPolygon *pbpoPolygon);
  214. void ApplyDefaultMapping(CBrushPolygon *pbpo, BOOL bRotation, BOOL bOffset, BOOL bStretch);
  215. // get current brush mip of current csg target brush
  216. CBrushMip *GetCurrentBrushMip(void);
  217. void SetMipBrushFactor(void);
  218. void OnAddMorePreciseMip(BOOL bClone);
  219. void OnAddRougherMipLevel(BOOL bClone);
  220. void OnNextPolygon(void);
  221. void OnPreviousPolygon(void);
  222. void Rotate( FLOAT fAngleLR, FLOAT fAngleUD, BOOL bSmooth=FALSE);
  223. void MultiplyMappingOnPolygon( FLOAT fFactor);
  224. void CallPopupMenu(CPoint point);
  225. void DrawArrowAndTypeText( CProjection3D &prProjection,
  226. const FLOAT3D &v0, const FLOAT3D &v1, COLOR colColor, CTString strText);
  227. void DrawAxis( const PIX2D &pixC, PIX len, COLOR colColor, COLOR colTextColor, CTString strU, CTString strV);
  228. void SnapVector(FLOAT3D &vToSnap);
  229. void SnapVector(DOUBLE3D &vToSnap);
  230. FLOAT3D ProjectVectorToWorldSpace(FLOAT fDX,FLOAT fDY,FLOAT fDZ);
  231. FLOAT3D Get3DCoordinateFrom2D( POINT &pt);
  232. POINT Get2DCoordinateFrom3D( FLOAT3D vPoint);
  233. BOOL IsCutEnabled(CTString &strError);
  234. void SelectAllTargetsOfEntity(CEntity *pen);
  235. void SelectAllTargetsOfSelectedEntities(void);
  236. BOOL IsSelectClonesOnContextEnabled( void);
  237. BOOL IsSelectOfSameClassOnContextEnabled( void);
  238. void ApplyFreeModeControls( CPlacement3D &pl, ANGLE3D &a, FLOAT &fSpeedMultiplier, BOOL bPrescan);
  239. void PumpWindowsMessagesInFreeMode(BOOL &bRunning, FLOAT &fSpeedMultiplier);
  240. void SelectWhoTargets( CDynamicContainer<CEntity> &dcTargetedEntities);
  241. void OnRemainSelectedByOrientation(BOOL bBothSides);
  242. void OnDropMarker(CPlacement3D plMarker);
  243. // functions for mapping fitting
  244. void AutoFitMapping(CBrushPolygon *pbpo, BOOL bInvert=FALSE, BOOL bFitBoth=FALSE);
  245. void AutoFitMappingOnPolygon(CBrushPolygon &bpo, BOOL bInvert=FALSE, BOOL bFitBoth=FALSE);
  246. void SetAsCsgTarget(CEntity *pen);
  247. void ShowLinkTree(CEntity *pen, BOOL bWhoTargets=FALSE, BOOL bPropertyNames=FALSE);
  248. BOOL SaveAutoTexture(FLOATaabbox3D boxBrush, CTFileName &fnTex);
  249. void AutoApplyTexture(FLOATaabbox3D boxBrush, CTFileName &fnTex);
  250. void AutoApplyTextureOntoPolygon(CBrushPolygon &bpo, FLOATaabbox3D boxBrush, CTFileName &fnTex);
  251. BOOL SetAutoTextureBoxParams(FLOATaabbox3D boxBrush, CTFileName &fnTex);
  252. void Align(BOOL bX,BOOL bY,BOOL bZ,BOOL bH,BOOL bP,BOOL bB);
  253. void PolygonsToBrush(CBrushPolygonSelection &selPolygons, BOOL bDeleteSectors, BOOL bZoning);
  254. void SnapSelectedVerticesToPlane(void);
  255. void RenderAndApplyTerrainEditBrush(FLOAT3D vHit);
  256. void InvokeSelectLayerCombo(void);
  257. void OnIdle(void);
  258. void UpdateCursor(void);
  259. // Overrides
  260. // ClassWizard generated virtual function overrides
  261. //{{AFX_VIRTUAL(CWorldEditorView)
  262. public:
  263. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  264. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  265. virtual void OnInitialUpdate();
  266. virtual BOOL PreTranslateMessage(MSG* pMsg);
  267. protected:
  268. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  269. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  270. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  271. //}}AFX_VIRTUAL
  272. // Implementation
  273. public:
  274. virtual ~CWorldEditorView();
  275. #ifdef _DEBUG
  276. virtual void AssertValid() const;
  277. virtual void Dump(CDumpContext& dc) const;
  278. #endif
  279. protected:
  280. // Generated message map functions
  281. protected:
  282. public:
  283. //{{AFX_MSG(CWorldEditorView)
  284. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  285. afx_msg void OnSize(UINT nType, int cx, int cy);
  286. afx_msg void OnKillFocus(CWnd* pNewWnd);
  287. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  288. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  289. afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
  290. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  291. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  292. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  293. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  294. afx_msg void OnDropFiles(HDROP hDropInfo);
  295. afx_msg void OnIsometricFront();
  296. afx_msg void OnIsometricBack();
  297. afx_msg void OnIsometricBottom();
  298. afx_msg void OnIsometricLeft();
  299. afx_msg void OnIsometricRight();
  300. afx_msg void OnIsometricTop();
  301. afx_msg void OnPerspective();
  302. afx_msg void OnZoomLess();
  303. afx_msg void OnZoomMore();
  304. afx_msg void OnMoveDown();
  305. afx_msg void OnMoveUp();
  306. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  307. afx_msg void OnMeasurementTape();
  308. afx_msg void OnUpdateMeasurementTape(CCmdUI* pCmdUI);
  309. afx_msg void OnCircleModes();
  310. afx_msg void OnUpdateCircleModes(CCmdUI* pCmdUI);
  311. afx_msg void OnDeselectAll();
  312. afx_msg void OnDeleteEntities();
  313. afx_msg void OnUpdateDeleteEntities(CCmdUI* pCmdUI);
  314. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  315. afx_msg void OnTakeSs();
  316. afx_msg void OnUpdateEntityMode(CCmdUI* pCmdUI);
  317. afx_msg void OnSectorMode();
  318. afx_msg void OnUpdateSectorMode(CCmdUI* pCmdUI);
  319. afx_msg void OnPolygonMode();
  320. afx_msg void OnUpdatePolygonMode(CCmdUI* pCmdUI);
  321. afx_msg void OnEditPaste();
  322. afx_msg void OnEditCopy();
  323. afx_msg void OnCloneCSG();
  324. afx_msg void OnUpdateCloneCsg(CCmdUI* pCmdUI);
  325. afx_msg void OnMeasureOn();
  326. afx_msg void OnUpdateMeasureOn(CCmdUI* pCmdUI);
  327. afx_msg void OnResetViewer();
  328. afx_msg void OnCopyTexture();
  329. afx_msg void OnPasteTexture();
  330. afx_msg void OnCenterEntity();
  331. afx_msg void OnFunction();
  332. afx_msg void OnUpdateCenterEntity(CCmdUI* pCmdUI);
  333. afx_msg void OnDropMarker();
  334. afx_msg void OnUpdateDropMarker(CCmdUI* pCmdUI);
  335. afx_msg void OnTestConnections();
  336. afx_msg void OnUpdateTestConnections(CCmdUI* pCmdUI);
  337. afx_msg void OnAlignVolume();
  338. afx_msg void OnUpdateAlignVolume(CCmdUI* pCmdUI);
  339. afx_msg void OnCurrentViewProperties();
  340. afx_msg void OnDeleteMip();
  341. afx_msg void OnUpdateDeleteMip(CCmdUI* pCmdUI);
  342. afx_msg void OnPreviousMipBrush();
  343. afx_msg void OnUpdatePreviousMipBrush(CCmdUI* pCmdUI);
  344. afx_msg void OnNextMipBrush();
  345. afx_msg void OnUpdateNextMipBrush(CCmdUI* pCmdUI);
  346. afx_msg void OnCrossroadForC();
  347. afx_msg void OnChooseColor();
  348. afx_msg void OnUpdateChooseColor(CCmdUI* pCmdUI);
  349. afx_msg void OnMenuCopyMapping();
  350. afx_msg void OnMenuPasteMapping();
  351. afx_msg void OnSetAsCsgTarget();
  352. afx_msg void OnKeyPaste();
  353. afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
  354. afx_msg void OnSelectByTextureAdjacent();
  355. afx_msg void OnSelectByTextureInSector();
  356. afx_msg void OnSelectByColorInSector();
  357. afx_msg void OnConusPrimitive();
  358. afx_msg void OnTorusPrimitive();
  359. afx_msg void OnTerrainPrimitive();
  360. afx_msg void OnSpherePrimitive();
  361. afx_msg void OnStaircasePrimitive();
  362. afx_msg void OnUpdateConusPrimitive(CCmdUI* pCmdUI);
  363. afx_msg void OnUpdateSpherePrimitive(CCmdUI* pCmdUI);
  364. afx_msg void OnUpdateTerrainPrimitive(CCmdUI* pCmdUI);
  365. afx_msg void OnUpdateTorusPrimitive(CCmdUI* pCmdUI);
  366. afx_msg void OnUpdateStaircasePrimitive(CCmdUI* pCmdUI);
  367. afx_msg void OnPopupConus();
  368. afx_msg void OnPopupSphere();
  369. afx_msg void OnPopupStairs();
  370. afx_msg void OnPopupTerrain();
  371. afx_msg void OnPopupTorus();
  372. afx_msg void OnUpdateMoveDown(CCmdUI* pCmdUI);
  373. afx_msg void OnUpdateMoveUp(CCmdUI* pCmdUI);
  374. afx_msg void OnSelectLights();
  375. afx_msg void OnDiscardShadows();
  376. afx_msg void OnCopySectorAmbient();
  377. afx_msg void OnPasteSectorAmbient();
  378. afx_msg void OnSelectAllPolygons();
  379. afx_msg void OnCopySectors();
  380. afx_msg void OnDeleteSectors();
  381. afx_msg void OnPasteSectors();
  382. afx_msg void OnCenterBcgViewer();
  383. afx_msg void OnMenuPasteAsProjectedMapping();
  384. afx_msg void OnKeyPasteAsProjected();
  385. afx_msg void OnSelectAllEntitiesInSectors();
  386. afx_msg void OnSelectAllSectors();
  387. afx_msg void OnLastPrimitive();
  388. afx_msg void OnUpdateLastPrimitive(CCmdUI* pCmdUI);
  389. afx_msg void OnCloneToMorePreciseMip();
  390. afx_msg void OnCloneToRougherMipLevel();
  391. afx_msg void OnCreateEmptyMorePreciseMip();
  392. afx_msg void OnCreateEmptyRougherMip();
  393. afx_msg void OnUpdateCloneToMorePreciseMip(CCmdUI* pCmdUI);
  394. afx_msg void OnUpdateCloneToRougherMipLevel(CCmdUI* pCmdUI);
  395. afx_msg void OnUpdateCreateEmptyMorePreciseMip(CCmdUI* pCmdUI);
  396. afx_msg void OnUpdateCreateEmptyRougherMip(CCmdUI* pCmdUI);
  397. afx_msg void OnEditPasteAlternative();
  398. afx_msg void OnSelectAllEntitiesInWorld();
  399. afx_msg void OnUpdateEditPasteAlternative(CCmdUI* pCmdUI);
  400. afx_msg void OnEntityMode();
  401. afx_msg void OnFindTexture();
  402. afx_msg void OnSelectSectorsWithSameName();
  403. afx_msg void OnSelectSectorsArroundEntity();
  404. afx_msg void OnSelectSectorsArroundEntityOnContext();
  405. afx_msg void OnInsertVertex();
  406. afx_msg void OnDeleteVertex();
  407. afx_msg void OnSavePicturesForEnvironment();
  408. afx_msg void OnUpdateSavePicturesForEnvironment(CCmdUI* pCmdUI);
  409. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  410. afx_msg void OnCsgSelectSector();
  411. afx_msg void OnMenuAlignMappingU();
  412. afx_msg void OnMenuAlignMappingV();
  413. afx_msg void OnDestroy();
  414. afx_msg void OnFallDown();
  415. afx_msg void OnPrevious();
  416. afx_msg void OnNext();
  417. afx_msg void OnUpdatePrevious(CCmdUI* pCmdUI);
  418. afx_msg void OnUpdateNext(CCmdUI* pCmdUI);
  419. afx_msg void OnRemoveUnusedTextures();
  420. afx_msg void OnRotate();
  421. afx_msg void OnRotateBack();
  422. afx_msg void OnSelectVisibleSectors();
  423. afx_msg void OnEditCopyAlternative();
  424. afx_msg void OnRotateLeft();
  425. afx_msg void OnRotateRight();
  426. afx_msg void OnRotateUp();
  427. afx_msg void OnRotateDown();
  428. afx_msg void OnSelectWhoTargets();
  429. afx_msg void OnSelectInvalidTris();
  430. afx_msg void OnTestConnectionsBack();
  431. afx_msg void OnUpdateTestConnectionsBack(CCmdUI* pCmdUI);
  432. afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  433. afx_msg void OnSelectSectorsOtherSide();
  434. afx_msg void OnSelectLinksToSector();
  435. afx_msg void OnRemainSelectedByOrientation();
  436. afx_msg void OnDeselectByOrientation();
  437. afx_msg void OnVertexMode();
  438. afx_msg void OnReoptimizeBrushes();
  439. afx_msg void OnMergeVertices();
  440. afx_msg void OnExportDisplaceMap();
  441. afx_msg void OnCutMode();
  442. afx_msg void OnUpdateCutMode(CCmdUI* pCmdUI);
  443. afx_msg void OnSelectAllTargets();
  444. afx_msg void OnSelectAllTargetsOnContext();
  445. afx_msg void OnSelectClones();
  446. afx_msg void OnSelectClonesOnContext();
  447. afx_msg void OnUpdateSelectClones(CCmdUI* pCmdUI);
  448. afx_msg void OnSelectAllVertices();
  449. afx_msg void OnSelectOfSameClass();
  450. afx_msg void OnSelectOfSameClassOnContext();
  451. afx_msg void OnAlternativeMovingMode();
  452. afx_msg void OnReTriple();
  453. afx_msg void OnSelectWhoTargetsOnContext();
  454. afx_msg void OnClearAllTargets();
  455. afx_msg void OnSelectCsgTarget();
  456. afx_msg void OnUpdateSelectCsgTarget(CCmdUI* pCmdUI);
  457. afx_msg void OnRemainSelectedbyOrientationSingle();
  458. afx_msg void OnUpdateReTriple(CCmdUI* pCmdUI);
  459. afx_msg void OnTriangularizePolygon();
  460. afx_msg void OnEntityContextHelp();
  461. afx_msg void OnPopupAutoFitMapping();
  462. afx_msg void OnTriangularizeSelection();
  463. afx_msg void OnUpdateTriangularizeSelection(CCmdUI* pCmdUI);
  464. afx_msg void OnPopupAutoFitMappingSmall();
  465. afx_msg void OnPopupAutoFitMappingBoth();
  466. afx_msg void OnResetMappingOffset();
  467. afx_msg void OnResetMappingRotation();
  468. afx_msg void OnResetMappingStretch();
  469. afx_msg void OnCrossroadForL();
  470. afx_msg void OnSelectUsingTargetTree();
  471. afx_msg void OnTargetTree();
  472. afx_msg void OnUpdateTargetTree(CCmdUI* pCmdUI);
  473. afx_msg void OnSwapLayers12();
  474. afx_msg void OnSwapLayers23();
  475. afx_msg void OnSelectDescendants();
  476. afx_msg void OnCrossroadForCtrlF();
  477. afx_msg void OnRotateToTargetCenter();
  478. afx_msg void OnRotateToTargetOrigin();
  479. afx_msg void OnCopyOrientation();
  480. afx_msg void OnCopyPlacement();
  481. afx_msg void OnCopyPosition();
  482. afx_msg void OnPasteOrientation();
  483. afx_msg void OnPastePlacement();
  484. afx_msg void OnPastePosition();
  485. afx_msg void OnAlignB();
  486. afx_msg void OnAlignH();
  487. afx_msg void OnAlignP();
  488. afx_msg void OnAlignX();
  489. afx_msg void OnAlignY();
  490. afx_msg void OnAlignZ();
  491. afx_msg void OnAutotexturizeMips();
  492. afx_msg void OnUpdateAutotexturizeMips(CCmdUI* pCmdUI);
  493. afx_msg void OnRandomOffsetU();
  494. afx_msg void OnRandomOffsetV();
  495. afx_msg void OnStretchRelativeOffset();
  496. afx_msg void OnDeselectHidden();
  497. afx_msg void OnSelectHidden();
  498. afx_msg void OnSectorsToBrush();
  499. afx_msg void OnPolygonsToBrush();
  500. afx_msg void OnClonePolygons();
  501. afx_msg void OnDeletePolygons();
  502. afx_msg void OnKeyU();
  503. afx_msg void OnKeyD();
  504. afx_msg void OnFlipPolygon();
  505. afx_msg void OnTerrainMode();
  506. afx_msg void OnUpdateTerrainMode(CCmdUI* pCmdUI);
  507. afx_msg void OnKeyM();
  508. afx_msg void OnKeyBackslash();
  509. afx_msg void OnSelectBrush();
  510. afx_msg void OnSelectTerrain();
  511. afx_msg void OnAltitudeEditMode();
  512. afx_msg void OnLayerTextureEditMode();
  513. afx_msg void OnTbrushAltitude();
  514. afx_msg void OnTbrushEquilaze();
  515. afx_msg void OnTbrushErase();
  516. afx_msg void OnTbrushNoise();
  517. afx_msg void OnTbrushSmooth();
  518. afx_msg void OnOptimizeTerrain();
  519. afx_msg void OnRecalculateTerrainShadows();
  520. afx_msg void OnViewHeightmap();
  521. afx_msg void OnImportHeightmap();
  522. afx_msg void OnExportHeightmap();
  523. afx_msg void OnImportHeightmap16();
  524. afx_msg void OnExportHeightmap16();
  525. afx_msg void OnSelectLayer();
  526. afx_msg void OnPickLayer();
  527. afx_msg void OnKeyO();
  528. afx_msg void OnUpdateKeyO(CCmdUI* pCmdUI);
  529. afx_msg void OnPosterize();
  530. afx_msg void OnFlatten();
  531. afx_msg void OnApplyFilter();
  532. afx_msg void OnTeSmooth();
  533. afx_msg void OnEditTerrainPrefs();
  534. afx_msg void OnUpdateEditTerrainPrefs(CCmdUI* pCmdUI);
  535. afx_msg void OnKeyCtrlShiftE();
  536. afx_msg void OnKeyCtrlShiftG();
  537. afx_msg void OnUpdateKeyCtrlShiftG(CCmdUI* pCmdUI);
  538. afx_msg void OnTerrainLayerOptions();
  539. afx_msg void OnUpdateTerrainLayerOptions(CCmdUI* pCmdUI);
  540. afx_msg void OnKeyCtrlShiftK();
  541. afx_msg void OnApplyContinousNoise();
  542. afx_msg void OnApplyMinimum();
  543. afx_msg void OnApplyMaximum();
  544. afx_msg void OnApplyFlatten();
  545. afx_msg void OnApplyPosterize();
  546. afx_msg void OnOptimizeLayers();
  547. afx_msg void OnTbrushContinousNoise();
  548. afx_msg void OnTbrushFilter();
  549. afx_msg void OnTbrushFlatten();
  550. afx_msg void OnTbrushMaximum();
  551. afx_msg void OnTbrushMinimum();
  552. afx_msg void OnTbrushPosterize();
  553. afx_msg void OnTerrainProperties();
  554. //}}AFX_MSG
  555. afx_msg void OnKeyBuffer(UINT nID);
  556. afx_msg void OnKeyEditBuffer(UINT nID);
  557. DECLARE_MESSAGE_MAP()
  558. };
  559. #ifndef _DEBUG // debug version in WorldEditorView.cpp
  560. inline CWorldEditorDoc* CWorldEditorView::GetDocument()
  561. { return (CWorldEditorDoc*)m_pDocument; }
  562. #endif
  563. /////////////////////////////////////////////////////////////////////////////
  564. #endif // WORLDEDITORVIEW_H