#include <WorldBuilderView.h>
Inherits WbView.
Public Member Functions | |
| virtual BOOL | PreCreateWindow (CREATESTRUCT &cs) |
| virtual | ~CWorldBuilderView () |
| Int | getCellSize (void) |
| Get the current draw size in pixels in the 2d window of one height map cell. | |
| void | setCellSize (Int cellSize) |
| Sets the current draw size. | |
| Bool | getShowContours (void) |
| Set whether contours are drawn. | |
| void | setShowContours (Bool show) |
| Set whether contours are drawn. | |
| void | updateCenterFromMapPoint (Real x, Real y) |
| Update the center to match a center point from the 3d view. | |
| virtual Bool | viewToDocCoords (CPoint curPt, Coord3D *newPt, Bool constrain) |
| virtual Bool | docToViewCoords (Coord3D curPt, CPoint *newPt) |
| virtual void | setCenterInView (Real x, Real y) |
| Set the center for display. | |
| virtual void | adjustDocSize () |
| the doc has changed size; readjust view as necessary. | |
| virtual void | invalObjectInView (MapObject *pObj) |
| Invalidates an object. Pass NULL to inval all objects. | |
| virtual void | invalidateCellInView (int xIndex, int yIndex) |
| Invalidates the area of one height map cell in the 2d view. | |
| virtual void | scrollInView (Real x, Real y, Bool end) |
| Scrolls the window by this amount (doc coords). | |
Public Member Functions inherited from WbView | |
| void | doRectFeedback (Bool doFeedback, RECT &rect) |
| void | doRulerFeedback (int doRulerFeedback) |
| void | rulerFeedbackInfo (Coord3D &point1, Coord3D &point2, Real dist) |
| void | doLightFeedback (Bool doFeedback, Coord3D direction, Int lightIndex) |
| virtual Bool | viewToDocCoordZ (CPoint curPt, Coord3D *newPt, Real Z) |
| virtual void | updateHeightMapInView (WorldHeightMap *htMap, Bool partial, const IRegion2D &partialRange) |
| Update the height map in the 3d window. | |
| virtual void | setDefaultCamera () |
| virtual void | rotateCamera (Real delta) |
| virtual void | pitchCamera (Real delta) |
| virtual Int | getPickPixels (void) |
| virtual EditorSortingType | GetPickConstraint (void) |
| CWorldBuilderDoc * | WbDoc () |
| void | snapPoint (Coord3D *thePt) |
| virtual TPickedStatus | picked (MapObject *pObj, Coord3D docPt) |
| virtual MapObject * | picked3dObjectInView (CPoint viewPt) |
| virtual BuildListInfo * | pickedBuildObjectInView (CPoint viewPt) |
| Bool | isPolygonTriggerVisible (void) |
| Bool | isWaypointVisible (void) |
| Bool | isNamesVisible (void) |
| void | setShowModels (Bool show) |
| Bool | getShowModels (void) |
| Bool | getShowTerrain (void) |
| void | setShowGarrisoned (Bool show) |
| Bool | getShowGarrisoned (void) |
| virtual Bool | isDoingPitch (void) |
Protected Member Functions | |
| CWorldBuilderView () | |
| virtual BOOL | OnPreparePrinting (CPrintInfo *pInfo) |
| virtual void | OnBeginPrinting (CDC *pDC, CPrintInfo *pInfo) |
| virtual void | OnEndPrinting (CDC *pDC, CPrintInfo *pInfo) |
| virtual void | OnDraw (CDC *pDC) |
| void | drawMyTexture (CDC *pDc, CRect *pRect, Int width, UnsignedByte *rgbData) |
| Draw a texture bitmap in a rectangle in the dc. | |
| DWORD | getColorForHeight (UnsignedByte ht) |
| Get a color for a height value. | |
| void | drawContours (CDC *pDc, CRgn *pRgn, Int minX, Int maxX, Int minY, Int maxY) |
| Draw the contours for the height map in the dc. | |
| void | interpolate (CPoint *pt, Int ht, CPoint pt1, Int ht1, CPoint pt2, Int ht2) |
| Interpolate the point at a given height between 2 points. | |
| void | drawObjectInView (CDC *pDc, MapObject *pMapObj) |
| Draw the object's icon in the dc at a given point. | |
| afx_msg void | OnPaint () |
| afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
| afx_msg void | OnSize (UINT nType, int cx, int cy) |
| afx_msg void | OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) |
| afx_msg void | OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) |
| afx_msg void | OnShowGrid () |
| afx_msg void | OnUpdateShowGrid (CCmdUI *pCmdUI) |
| afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
| afx_msg void | OnViewShowtexture () |
| afx_msg void | OnUpdateViewShowtexture (CCmdUI *pCmdUI) |
Protected Member Functions inherited from WbView | |
| WbView () | |
| void | mouseDown (TTrackingMode m, CPoint viewPt) |
| void | mouseMove (TTrackingMode m, CPoint viewPt) |
| void | mouseUp (TTrackingMode m, CPoint viewPt) |
| void | constrainCenterPt () |
| WorldHeightMapEdit * | getTrackingHeightMap () |
| virtual | ~WbView () |
| afx_msg void | OnRButtonUp (UINT nFlags, CPoint point) |
| afx_msg void | OnRButtonDown (UINT nFlags, CPoint point) |
| afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
| afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
| afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
| afx_msg void | OnMButtonUp (UINT nFlags, CPoint point) |
| afx_msg void | OnMButtonDown (UINT nFlags, CPoint point) |
| afx_msg BOOL | OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message) |
| afx_msg void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
| afx_msg void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) |
| afx_msg void | OnEditDelete () |
| afx_msg void | OnEditCopy () |
| afx_msg void | OnUpdateEditCopy (CCmdUI *pCmdUI) |
| afx_msg void | OnEditCut () |
| afx_msg void | OnUpdateEditCut (CCmdUI *pCmdUI) |
| afx_msg void | OnEditPaste () |
| afx_msg void | OnUpdateEditPaste (CCmdUI *pCmdUI) |
| afx_msg void | OnViewSnaptogrid () |
| afx_msg void | OnUpdateViewSnaptogrid (CCmdUI *pCmdUI) |
| afx_msg void | OnViewShowObjects () |
| afx_msg void | OnUpdateViewShowObjects (CCmdUI *pCmdUI) |
| afx_msg void | OnEditSelectdup () |
| afx_msg void | OnEditSelectsimilar () |
| afx_msg void | OnEditSelectinvalidteam () |
| afx_msg void | OnEditReplace () |
| afx_msg void | OnObjectpropertiesReflectsinmirror () |
| afx_msg void | OnLockHorizontal () |
| afx_msg void | OnUpdateLockHorizontal (CCmdUI *pCmdUI) |
| afx_msg void | OnLockVertical () |
| afx_msg void | OnUpdateLockVertical (CCmdUI *pCmdUI) |
| afx_msg void | OnEditGloballightoptions () |
| afx_msg void | OnViewShowwaypoints () |
| afx_msg void | OnUpdateViewShowwaypoints (CCmdUI *pCmdUI) |
| afx_msg void | OnViewShowpolygontriggers () |
| afx_msg void | OnUpdateViewShowpolygontriggers (CCmdUI *pCmdUI) |
| afx_msg void | OnEditPlayerlist () |
| afx_msg void | OnEditWorldinfo () |
| afx_msg void | OnEditTeamlist () |
| afx_msg void | OnUpdateObjectpropertiesReflectsinmirror (CCmdUI *pCmdUI) |
| afx_msg void | OnPickStructures () |
| afx_msg void | OnUpdatePickStructures (CCmdUI *pCmdUI) |
| afx_msg void | OnPickInfantry () |
| afx_msg void | OnUpdatePickInfantry (CCmdUI *pCmdUI) |
| afx_msg void | OnPickVehicles () |
| afx_msg void | OnUpdatePickVehicles (CCmdUI *pCmdUI) |
| afx_msg void | OnPickShrubbery () |
| afx_msg void | OnUpdatePickShrubbery (CCmdUI *pCmdUI) |
| afx_msg void | OnPickManMade () |
| afx_msg void | OnUpdatePickManMade (CCmdUI *pCmdUI) |
| afx_msg void | OnPickNatural () |
| afx_msg void | OnUpdatePickNatural (CCmdUI *pCmdUI) |
| afx_msg void | OnPickDebris () |
| afx_msg void | OnUpdatePickDebris (CCmdUI *pCmdUI) |
| afx_msg void | OnPickAnything () |
| afx_msg void | OnUpdatePickAnything (CCmdUI *pCmdUI) |
| afx_msg void | OnPickWaypoints () |
| afx_msg void | OnUpdatePickWaypoints (CCmdUI *pCmdUI) |
| afx_msg void | OnPickRoads () |
| afx_msg void | OnUpdatePickRoads (CCmdUI *pCmdUI) |
| afx_msg void | OnPickSounds () |
| afx_msg void | OnUpdatePickSounds (CCmdUI *pCmdUI) |
| afx_msg void | OnShowNames () |
| afx_msg void | OnUpdateShowNames (CCmdUI *pCmdUI) |
| afx_msg void | OnValidationFixTeams () |
| afx_msg void | OnShowTerrain () |
| afx_msg void | OnUpdateShowTerrain (CCmdUI *pCmdUI) |
| afx_msg int | OnCreate (LPCREATESTRUCT lpcs) |
Static Protected Member Functions | |
| static Bool | isBetween (Int cur, Int first, Int second) |
| Compound boolean expression. | |
Protected Attributes | |
| Int | m_cellSize |
| Size of a height map cell in pixels when drawn in the 2d view. | |
| Bool | m_showContours |
| Flag whether contours are drawn in the 2d view. | |
| Bool | m_showTexture |
| Flag whether textures are drawn in the 2d view. | |
| Bool | mShowGrid |
| Flag whether the gray grid is drawn in the 2d view. | |
| Int | mXScrollOffset |
| The x offset to the upper left corner of the screen. | |
| Int | mYScrollOffset |
| The y offset to the upper left corner of the screen. | |
| CPoint | m_scrollMin |
| The minimum scrollbar positions. | |
| CPoint | m_scrollMax |
| The maximum scroll bar positions. | |
Protected Attributes inherited from WbView | |
| TTrackingMode | m_trackingMode |
| Vector3 | m_centerPt |
| Bool | m_showObjects |
| Flag whether object icons are drawn in the 2d and 3d view. | |
| Bool | m_showModels |
| Flag whether models are drawn in the 2d and 3d view. | |
| Bool | m_showNames |
| Flag whether names are drawn in the 2d and 3d view. | |
| Bool | m_showGarrisoned |
| Bool | m_showWaypoints |
| Bool | m_showPolygonTriggers |
| Bool | m_showTerrain |
| Flag whether terrain is rendered or not. (Useful for debugging) | |
| Real | m_hysteresis |
| Bool | m_lockAngle |
| Reflects the ui button. | |
| Bool | m_doLockAngle |
| True if we are currently locking. | |
| CPoint | m_mouseDownPoint |
| Coord3D | m_mouseDownDocPoint |
| RECT | m_feedbackBox |
| Bool | m_doRectFeedback |
| int | m_doRulerFeedback |
| Coord3D | m_rulerPoints [2] |
| Real | m_rulerLength |
| Coord3D | m_lightDirection [3] |
| Bool | m_doLightFeedback |
| EditorSortingType | m_pickConstraint |
Additional Inherited Members | |
Static Protected Attributes inherited from WbView | |
| static Bool | m_snapToGrid = false |
Definition at line 40 of file WorldBuilderView.h.
|
protected |
Definition at line 74 of file WorldBuilderView.cpp.
|
virtual |
Definition at line 97 of file WorldBuilderView.cpp.
|
virtual |
the doc has changed size; readjust view as necessary.
Reimplemented from WbView.
Definition at line 807 of file WorldBuilderView.cpp.
Reimplemented from WbView.
Definition at line 1070 of file WorldBuilderView.cpp.
|
protected |
Draw the contours for the height map in the dc.
Draws the height contours on the map. Called by OnPaint.
Definition at line 543 of file WorldBuilderView.cpp.
|
protected |
Draw a texture bitmap in a rectangle in the dc.
Draws the tile data rgbData at pRect. The tile data is square 4 byte data, width pixels wide and tall.
Definition at line 759 of file WorldBuilderView.cpp.
|
protected |
Draw the object's icon in the dc at a given point.
Draws the icon for an object at a given location. Called by OnPaint.
Definition at line 452 of file WorldBuilderView.cpp.
|
inline |
Get the current draw size in pixels in the 2d window of one height map cell.
Definition at line 108 of file WorldBuilderView.h.
|
protected |
Get a color for a height value.
Gets the color for a given height in the height map. Used when we are not displaying terrain, and for the contour lines.
Definition at line 189 of file WorldBuilderView.cpp.
|
inline |
Set whether contours are drawn.
Definition at line 114 of file WorldBuilderView.h.
|
protected |
Interpolate the point at a given height between 2 points.
Given 2 points, pt1 and pt2, with different height valus ht1 and ht2, determines where the height ht occurs along the line.
Definition at line 736 of file WorldBuilderView.cpp.
|
virtual |
Invalidates the area of one height map cell in the 2d view.
Invalidates the pixel area for the height map call at a particular location.
Reimplemented from WbView.
Definition at line 785 of file WorldBuilderView.cpp.
|
virtual |
Invalidates an object. Pass NULL to inval all objects.
Causes the bounds of an object to be invalidated.
Reimplemented from WbView.
Definition at line 417 of file WorldBuilderView.cpp.
Compound boolean expression.
Definition at line 93 of file WorldBuilderView.h.
|
protectedvirtual |
Definition at line 129 of file WorldBuilderView.cpp.
|
protected |
Definition at line 106 of file WorldBuilderView.cpp.
|
protectedvirtual |
Reimplemented from WbView.
Definition at line 114 of file WorldBuilderView.cpp.
|
protectedvirtual |
Definition at line 133 of file WorldBuilderView.cpp.
Standard window handler method for when the horizontal scroll bar is used.
Definition at line 889 of file WorldBuilderView.cpp.
|
protected |
|
protected |
This draws the window.
Definition at line 262 of file WorldBuilderView.cpp.
|
protectedvirtual |
Definition at line 123 of file WorldBuilderView.cpp.
|
protected |
Toggles the show grid flag and invals the window.
Definition at line 953 of file WorldBuilderView.cpp.
|
protected |
Standard window handler method for when the window size changes.
Definition at line 855 of file WorldBuilderView.cpp.
|
protected |
Sets the check in the menu to match the show grid flag.
Definition at line 961 of file WorldBuilderView.cpp.
|
protected |
Sets the check in the menu to match the show texture flag.
Definition at line 997 of file WorldBuilderView.cpp.
|
protected |
Toggles the show texture flag and invals the window.
Definition at line 989 of file WorldBuilderView.cpp.
Standard window handler method for when the vertical scroll bar is used.
Definition at line 868 of file WorldBuilderView.cpp.
|
virtual |
Definition at line 101 of file WorldBuilderView.cpp.
Scrolls the window by this amount (doc coords).
Scrolls the window.
Reimplemented from WbView.
Definition at line 910 of file WorldBuilderView.cpp.
| void CWorldBuilderView::setCellSize | ( | Int | cellSize | ) |
Sets the current draw size.
Set the cell size, and invalidate.
Definition at line 154 of file WorldBuilderView.cpp.
Set the center for display.
Reimplemented from WbView.
Definition at line 163 of file WorldBuilderView.cpp.
| void CWorldBuilderView::setShowContours | ( | Bool | show | ) |
Set whether contours are drawn.
Set the show contours flag, and invalidate.
Definition at line 174 of file WorldBuilderView.cpp.
Update the center to match a center point from the 3d view.
Reimplemented from WbView.
Definition at line 1030 of file WorldBuilderView.cpp.
|
protected |
Size of a height map cell in pixels when drawn in the 2d view.
Definition at line 70 of file WorldBuilderView.h.
|
protected |
The maximum scroll bar positions.
Definition at line 79 of file WorldBuilderView.h.
|
protected |
The minimum scrollbar positions.
Definition at line 78 of file WorldBuilderView.h.
|
protected |
Flag whether contours are drawn in the 2d view.
Definition at line 71 of file WorldBuilderView.h.
|
protected |
Flag whether textures are drawn in the 2d view.
Definition at line 73 of file WorldBuilderView.h.
|
protected |
Flag whether the gray grid is drawn in the 2d view.
Definition at line 74 of file WorldBuilderView.h.
|
protected |
The x offset to the upper left corner of the screen.
Definition at line 76 of file WorldBuilderView.h.
|
protected |
The y offset to the upper left corner of the screen.
Definition at line 77 of file WorldBuilderView.h.