CObjectView Class Reference

#include <srObject.h>

List of all members.

Public Member Functions

void WriteLayout ()
CDocGetDocument ()
virtual void OnInitialUpdate ()

Protected Member Functions

virtual void OnDraw (CDC *pDC)
virtual void OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
virtual void OnActivateView (BOOL bActivate, CView *pActivateView, CView *pDeactiveView)
afx_msg void OnUpdateDist (CCmdUI *pCmdUI)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void OnDist ()
afx_msg void OnZoom ()
afx_msg void OnSelectSurfaceStyle ()
afx_msg void OnUpdateSurfaceStyle (CCmdUI *pCmdUI)
afx_msg void OnShowSensors ()
afx_msg void OnUpdateShowSensors (CCmdUI *pCmdUI)
afx_msg void OnEditCopy ()
afx_msg void OnUpdateEditCopy (CCmdUI *pCmdUI)
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnDestroy ()
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void OnTimer (UINT nIDEvent)
afx_msg void OnPlaneXY ()
afx_msg void OnUpdatePlaneXY (CCmdUI *pCmdUI)
afx_msg void OnPlaneXZ ()
afx_msg void OnUpdatePlaneXZ (CCmdUI *pCmdUI)
afx_msg void OnPlaneYZ ()
afx_msg void OnUpdatePlaneYZ (CCmdUI *pCmdUI)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)

Private Member Functions

void DoDraw (const CRect &rect)
bool RestoreLayout ()
void computeZoom (ZoomFitType zoomFitType)

Private Attributes

CMenu m_menuPopup
CString m_sObject
HDC m_hDC
HGLRC m_hGLContext
int m_nDL
bool m_bValid
bool m_bDrag
InteractiveSelectionType interactiveSelection
SimObjectselectedObject
bool showSensors
double zoomDistance
DragAndDropPlane m_plane
VisualizationParameterSet visualizationParameters
int verticalOpeningAngleIdx


Detailed Description

Definition at line 7 of file srObject.h.


Member Function Documentation

void CObjectView::computeZoom ( ZoomFitType  zoomFitType  )  [private]

Definition at line 61 of file srObject.cpp.

References GetDocument(), Simulation::getOptimalZoomForObject(), CDoc::GetSimulation(), m_sObject, verticalOpeningAngleIdx, and zoomDistance.

Referenced by OnInitialUpdate(), OnZoom(), and RestoreLayout().

void CObjectView::DoDraw ( const CRect &  rect  )  [private]

Definition at line 127 of file srObject.cpp.

Referenced by OnDraw(), and OnEditCopy().

CDoc * CObjectView::GetDocument (  )  [inline]

Definition at line 94 of file srObject.h.

Referenced by computeZoom(), OnInitialUpdate(), OnLButtonDblClk(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnRButtonDown(), OnRButtonUp(), OnUpdate(), CObjectFrame::OnUpdateViewTurn(), CObjectFrame::OnViewTurn(), CObjectFrame::RestoreLayout(), RestoreLayout(), and CObjectFrame::WriteLayout().

void CObjectView::OnActivateView ( BOOL  bActivate,
CView *  pActivateView,
CView *  pDeactiveView 
) [protected, virtual]

Definition at line 298 of file srObject.cpp.

int CObjectView::OnCreate ( LPCREATESTRUCT  lpCreateStruct  )  [protected]

Definition at line 428 of file srObject.cpp.

References m_hDC, and m_hGLContext.

void CObjectView::OnDestroy (  )  [protected]

Definition at line 412 of file srObject.cpp.

References m_hGLContext.

void CObjectView::OnDist (  )  [protected]

Definition at line 226 of file srObject.cpp.

References ID_DIST0, M_PI, m_sObject, verticalOpeningAngleIdx, and zoomDistance.

void CObjectView::OnDraw ( CDC *  pDC  )  [protected, virtual]

Definition at line 139 of file srObject.cpp.

References DoDraw(), m_bValid, m_hDC, and m_hGLContext.

void CObjectView::OnEditCopy (  )  [protected]

Definition at line 246 of file srObject.cpp.

References DoDraw(), OffscreenRenderer::finishRendering(), image, m_sObject, and OffscreenRenderer::prepareRendering().

BOOL CObjectView::OnEraseBkgnd ( CDC *  pDC  )  [protected]

Definition at line 293 of file srObject.cpp.

void CObjectView::OnInitialUpdate (  )  [virtual]

Definition at line 178 of file srObject.cpp.

References computeZoom(), GetDocument(), CDoc::GetSelectedObject(), IDP_OBJECT, m_bValid, m_menuPopup, m_nDL, m_plane, m_sObject, RestoreLayout(), CObjectFrame::SetObject(), showSensors, VisualizationParameterSet::SMOOTH_SHADING, VisualizationParameterSet::surfaceStyle, verticalOpeningAngleIdx, visualizationParameters, XY_PLANE, and ZOOM_FIT.

void CObjectView::OnLButtonDblClk ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 362 of file srObject.cpp.

References GetDocument(), interactiveSelection, NO_SELECTION, CDoc::OnSelected(), and selectedObject.

void CObjectView::OnLButtonDown ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 304 of file srObject.cpp.

References GetDocument(), Simulation::getSelectedObject(), CDoc::GetSimulation(), interactiveSelection, m_bDrag, m_plane, m_sObject, NO_SELECTION, OBJECT_SELECTION, selectedObject, Simulation::selectObject(), UPDATE_OBJECTS, verticalOpeningAngleIdx, and zoomDistance.

void CObjectView::OnLButtonUp ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 344 of file srObject.cpp.

References GetDocument(), CDoc::GetSimulation(), interactiveSelection, m_bDrag, m_sObject, OBJECT_SELECTION, Simulation::translateObject(), Simulation::unselectObject(), UPDATE_OBJECTS, and verticalOpeningAngleIdx.

void CObjectView::OnMouseMove ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 326 of file srObject.cpp.

References GetDocument(), CDoc::GetSimulation(), interactiveSelection, m_bDrag, OBJECT_SELECTION, Simulation::rotateObject(), Simulation::translateObject(), UPDATE_OBJECTS, and verticalOpeningAngleIdx.

void CObjectView::OnPlaneXY (  )  [protected]

Definition at line 529 of file srObject.cpp.

References m_plane, m_sObject, and XY_PLANE.

void CObjectView::OnPlaneXZ (  )  [protected]

Definition at line 541 of file srObject.cpp.

References m_plane, m_sObject, and XZ_PLANE.

void CObjectView::OnPlaneYZ (  )  [protected]

Definition at line 553 of file srObject.cpp.

References m_plane, m_sObject, and YZ_PLANE.

void CObjectView::OnRButtonDown ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 368 of file srObject.cpp.

References GetDocument(), CDoc::GetSimulation(), interactiveSelection, m_bDrag, m_plane, m_sObject, NO_SELECTION, Simulation::selectObject(), UPDATE_OBJECTS, verticalOpeningAngleIdx, and zoomDistance.

void CObjectView::OnRButtonUp ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 389 of file srObject.cpp.

References GetDocument(), CDoc::GetSimulation(), m_bDrag, m_menuPopup, m_sObject, Simulation::rotateObject(), Simulation::unselectObject(), UPDATE_OBJECTS, and verticalOpeningAngleIdx.

void CObjectView::OnSelectSurfaceStyle (  )  [protected]

Definition at line 495 of file srObject.cpp.

References ID_SURFACE_WIRE, m_sObject, VisualizationParameterSet::surfaceStyle, and visualizationParameters.

void CObjectView::OnShowSensors (  )  [protected]

Definition at line 514 of file srObject.cpp.

References m_sObject, and showSensors.

void CObjectView::OnTimer ( UINT  nIDEvent  )  [protected]

Definition at line 487 of file srObject.cpp.

void CObjectView::OnUpdate ( CView *  pSender,
LPARAM  lHint,
CObject *  pHint 
) [protected, virtual]

Definition at line 198 of file srObject.cpp.

References GetDocument(), CDoc::GetType(), m_bValid, m_sObject, OBJECT_TYPE_OBJECT, UPDATE_ACTORS, and UPDATE_SENSORS.

void CObjectView::OnUpdateDist ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 240 of file srObject.cpp.

References ID_DIST0, m_sObject, and verticalOpeningAngleIdx.

void CObjectView::OnUpdateEditCopy ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 288 of file srObject.cpp.

References m_sObject.

void CObjectView::OnUpdatePlaneXY ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 535 of file srObject.cpp.

References m_plane, m_sObject, and XY_PLANE.

void CObjectView::OnUpdatePlaneXZ ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 547 of file srObject.cpp.

References m_plane, m_sObject, and XZ_PLANE.

void CObjectView::OnUpdatePlaneYZ ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 559 of file srObject.cpp.

References m_plane, m_sObject, and YZ_PLANE.

void CObjectView::OnUpdateShowSensors ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 523 of file srObject.cpp.

References m_sObject, and showSensors.

void CObjectView::OnUpdateSurfaceStyle ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 506 of file srObject.cpp.

References ID_SURFACE_WIRE, m_sObject, VisualizationParameterSet::surfaceStyle, and visualizationParameters.

void CObjectView::OnZoom (  )  [protected]

Definition at line 208 of file srObject.cpp.

References computeZoom(), ID_ZOOM_IN, m_sObject, and zoomDistance.

bool CObjectView::RestoreLayout (  )  [private]

Definition at line 39 of file srObject.cpp.

References computeZoom(), GetDocument(), CDoc::IsRestoringLayout(), m_nDL, m_plane, m_sObject, CDoc::NewSection(), CDoc::ReadDouble(), CDoc::ReadInt(), CDoc::ReadString(), showSensors, VisualizationParameterSet::surfaceStyle, verticalOpeningAngleIdx, visualizationParameters, ZOOM_FIT, and zoomDistance.

Referenced by OnInitialUpdate().

void CObjectView::WriteLayout (  ) 

Definition at line 26 of file srObject.cpp.

References CDoc::NewSection(), CDoc::WriteDouble(), CDoc::WriteInt(), and CDoc::WriteString().


Member Data Documentation

InteractiveSelectionType CObjectView::interactiveSelection [private]

Definition at line 17 of file srObject.h.

Referenced by OnLButtonDblClk(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), and OnRButtonDown().

bool CObjectView::m_bDrag [private]

Definition at line 15 of file srObject.h.

Referenced by OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnRButtonDown(), and OnRButtonUp().

bool CObjectView::m_bValid [private]

Definition at line 15 of file srObject.h.

Referenced by OnDraw(), OnInitialUpdate(), and OnUpdate().

HDC CObjectView::m_hDC [private]

Definition at line 12 of file srObject.h.

Referenced by OnCreate(), and OnDraw().

HGLRC CObjectView::m_hGLContext [private]

Definition at line 13 of file srObject.h.

Referenced by OnCreate(), OnDestroy(), and OnDraw().

CMenu CObjectView::m_menuPopup [private]

Definition at line 10 of file srObject.h.

Referenced by OnInitialUpdate(), and OnRButtonUp().

int CObjectView::m_nDL [private]

Definition at line 14 of file srObject.h.

Referenced by OnInitialUpdate(), and RestoreLayout().

DragAndDropPlane CObjectView::m_plane [private]

Definition at line 21 of file srObject.h.

Referenced by OnInitialUpdate(), OnLButtonDown(), OnPlaneXY(), OnPlaneXZ(), OnPlaneYZ(), OnRButtonDown(), OnUpdatePlaneXY(), OnUpdatePlaneXZ(), OnUpdatePlaneYZ(), and RestoreLayout().

CString CObjectView::m_sObject [private]

Definition at line 11 of file srObject.h.

Referenced by computeZoom(), OnDist(), OnEditCopy(), OnInitialUpdate(), OnLButtonDown(), OnLButtonUp(), OnPlaneXY(), OnPlaneXZ(), OnPlaneYZ(), OnRButtonDown(), OnRButtonUp(), OnSelectSurfaceStyle(), OnShowSensors(), OnUpdate(), OnUpdateDist(), OnUpdateEditCopy(), OnUpdatePlaneXY(), OnUpdatePlaneXZ(), OnUpdatePlaneYZ(), OnUpdateShowSensors(), OnUpdateSurfaceStyle(), OnZoom(), and RestoreLayout().

SimObject* CObjectView::selectedObject [private]

Definition at line 18 of file srObject.h.

Referenced by OnLButtonDblClk(), and OnLButtonDown().

bool CObjectView::showSensors [private]

Definition at line 19 of file srObject.h.

Referenced by OnInitialUpdate(), OnShowSensors(), OnUpdateShowSensors(), and RestoreLayout().

int CObjectView::verticalOpeningAngleIdx [private]

Definition at line 23 of file srObject.h.

Referenced by computeZoom(), OnDist(), OnInitialUpdate(), OnLButtonDown(), OnLButtonUp(), OnMouseMove(), OnRButtonDown(), OnRButtonUp(), OnUpdateDist(), and RestoreLayout().

VisualizationParameterSet CObjectView::visualizationParameters [private]

Definition at line 22 of file srObject.h.

Referenced by OnInitialUpdate(), OnSelectSurfaceStyle(), OnUpdateSurfaceStyle(), and RestoreLayout().

double CObjectView::zoomDistance [private]

Definition at line 20 of file srObject.h.

Referenced by computeZoom(), OnDist(), OnLButtonDown(), OnRButtonDown(), OnZoom(), and RestoreLayout().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:22:48 2006 for DT2005.panorama by  doxygen 1.4.7