CSensor Class Reference

#include <srSensor.h>

List of all members.

Public Member Functions

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

Protected Member Functions

 CSensor ()
virtual void OnDraw (CDC *pDC)
virtual void OnUpdate (CView *pSender, LPARAM lHint, CObject *pHint)
virtual ~CSensor ()
afx_msg void OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void OnViewLine ()
afx_msg void OnUpdateViewLine (CCmdUI *pCmdUI)
afx_msg void OnViewColumn ()
afx_msg void OnUpdateViewColumn (CCmdUI *pCmdUI)
afx_msg void OnViewMono ()
afx_msg void OnUpdateViewMono (CCmdUI *pCmdUI)
afx_msg void OnViewColor ()
afx_msg void OnUpdateViewColor (CCmdUI *pCmdUI)
afx_msg void OnViewStereo ()
afx_msg void OnUpdateViewStereo (CCmdUI *pCmdUI)
afx_msg void OnViewGrid ()
afx_msg void OnUpdateViewGrid (CCmdUI *pCmdUI)
afx_msg void OnBright ()
afx_msg void OnUpdateBright (CCmdUI *pCmdUI)
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnEditCopy ()
afx_msg void OnUpdateEditCopy (CCmdUI *pCmdUI)

Private Member Functions

void Repaint ()
void DrawBitmap (CDC &dc, CRect &rect)
void DrawMono ()
void DrawColor ()
void Constrains (unsigned char *pDepth, int *pConstrain, bool *pVisible, double xDepthStep)
void DrawStereo ()
void DrawMemDC (CDC &dc, CRect &rect)
POINT Project2D (int x, int y, double z)
void Grid3D (CDC &dc)
void DrawLine (CDC &dc)
void DrawColumn (CDC &dc)
void DrawDirect (CDC &dc)
void SetClipboardText ()
void SetClipboardGraphics ()
bool RestoreLayout ()
unsigned char ToChar (double value) const

Private Attributes

CMenu m_menuPopup
CString m_sSensor
int m_sp
int m_nView
int m_nBright
int m_nDim
int m_nDimSize [3]
int m_xSize
int m_ySize
int m_yAdd
int m_nBufSize
double m_minValue
double m_maxValue
bool m_bGrid
bool m_bRepaint
unsigned char m_data
unsigned char * m_pData
CRect m_rect
CBitmap * m_pBitmap
BITMAPINFOHEADER * m_pBuffer


Detailed Description

Definition at line 7 of file srSensor.h.


Constructor & Destructor Documentation

CSensor::CSensor (  )  [protected]

Definition at line 24 of file srSensor.cpp.

CSensor::~CSensor (  )  [protected, virtual]

Definition at line 28 of file srSensor.cpp.

References m_nBufSize, m_pBitmap, m_pBuffer, and m_pData.


Member Function Documentation

void CSensor::Constrains ( unsigned char *  pDepth,
int *  pConstrain,
bool *  pVisible,
double  xDepthStep 
) [private]

Definition at line 304 of file srSensor.cpp.

References int(), and m_xSize.

Referenced by DrawStereo().

void CSensor::DrawBitmap ( CDC &  dc,
CRect &  rect 
) [private]

Definition at line 187 of file srSensor.cpp.

References DrawColor(), DrawMono(), DrawStereo(), m_bRepaint, m_nDim, m_nDimSize, m_nView, m_pBuffer, m_rect, m_xSize, and m_ySize.

void CSensor::DrawColor (  )  [private]

Definition at line 279 of file srSensor.cpp.

References m_nBright, m_nDim, m_nDimSize, m_pBuffer, m_pData, m_xSize, and m_ySize.

Referenced by DrawBitmap().

void CSensor::DrawColumn ( CDC &  dc  )  [private]

Definition at line 531 of file srSensor.cpp.

References Grid3D(), int(), m_nDimSize, m_pData, m_xSize, m_yAdd, m_ySize, and Project2D().

Referenced by DrawMemDC(), and SetClipboardGraphics().

void CSensor::DrawDirect ( CDC &  dc  )  [private]

Definition at line 577 of file srSensor.cpp.

References GetDocument(), CDoc::GetSimulation(), Simulation::getView(), and m_sp.

Referenced by DrawMemDC(), and SetClipboardGraphics().

void CSensor::DrawLine ( CDC &  dc  )  [private]

Definition at line 502 of file srSensor.cpp.

References Grid3D(), int(), m_nDimSize, m_pData, m_xSize, m_yAdd, m_ySize, and Project2D().

Referenced by DrawMemDC(), and SetClipboardGraphics().

void CSensor::DrawMemDC ( CDC &  dc,
CRect &  rect 
) [private]

Definition at line 418 of file srSensor.cpp.

References DrawColumn(), DrawDirect(), DrawLine(), m_bRepaint, m_nView, m_pBitmap, and m_rect.

void CSensor::DrawMono (  )  [private]

Definition at line 256 of file srSensor.cpp.

References m_nBright, m_pBuffer, m_pData, m_xSize, and m_ySize.

Referenced by DrawBitmap().

void CSensor::DrawStereo (  )  [private]

Definition at line 375 of file srSensor.cpp.

References Constrains(), int(), m_nDim, m_nDimSize, m_pBuffer, m_pData, m_xSize, and m_ySize.

Referenced by DrawBitmap().

CDoc * CSensor::GetDocument (  )  [inline]

Definition at line 112 of file srSensor.h.

Referenced by DrawDirect(), OnInitialUpdate(), OnUpdate(), RestoreLayout(), SetClipboardText(), and WriteLayout().

void CSensor::Grid3D ( CDC &  dc  )  [private]

Definition at line 474 of file srSensor.cpp.

References m_bGrid, m_xSize, m_ySize, and Project2D().

Referenced by DrawColumn(), and DrawLine().

void CSensor::OnBright (  )  [protected]

Definition at line 954 of file srSensor.cpp.

References ID_BRIGHT0, m_nBright, m_nView, m_sp, and Repaint().

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

Definition at line 127 of file srSensor.cpp.

References boolSensor, cameraSensor, doubleFieldSensor, doubleSensor, Simulation::getSensorportType(), Simulation::getSensorportValue(), and intSensor.

void CSensor::OnEditCopy (  )  [protected]

Definition at line 974 of file srSensor.cpp.

References m_nDimSize, m_nView, m_sp, SetClipboardGraphics(), and SetClipboardText().

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

Definition at line 969 of file srSensor.cpp.

void CSensor::OnInitialUpdate (  )  [virtual]

Definition at line 751 of file srSensor.cpp.

References GetDocument(), CDoc::GetSelectedObject(), IDP_SENSOR, m_bGrid, m_menuPopup, m_nBright, m_nBufSize, m_nView, m_pBitmap, m_pBuffer, m_rect, m_sSensor, and RestoreLayout().

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

Definition at line 841 of file srSensor.cpp.

References m_menuPopup.

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

Definition at line 771 of file srSensor.cpp.

References doubleFieldSensor, GetDocument(), Simulation::getSensorDimensions(), Simulation::getSensorportId(), Simulation::getSensorportMaxValue(), Simulation::getSensorportMinValue(), Simulation::getSensorportType(), CDoc::GetSimulation(), m_maxValue, m_minValue, m_nBufSize, m_nDim, m_nDimSize, m_nView, m_pBitmap, m_pBuffer, m_pData, m_sp, m_sSensor, OBJECT_TYPE_SENSORPORT, Repaint(), UPDATE_ACTORS, UPDATE_OBJECTS, UPDATE_SENSORS, and viewSensor.

void CSensor::OnUpdateBright ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 963 of file srSensor.cpp.

References ID_BRIGHT0, m_nBright, m_nView, and m_sp.

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

Definition at line 989 of file srSensor.cpp.

References m_sp.

void CSensor::OnUpdateViewColor ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 913 of file srSensor.cpp.

References m_nDim, m_nDimSize, m_nView, and m_sp.

void CSensor::OnUpdateViewColumn ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 873 of file srSensor.cpp.

References m_nDim, m_nView, and m_sp.

void CSensor::OnUpdateViewGrid ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 948 of file srSensor.cpp.

References m_bGrid, m_nView, and m_sp.

void CSensor::OnUpdateViewLine ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 858 of file srSensor.cpp.

References m_nDim, m_nDimSize, m_nView, and m_sp.

void CSensor::OnUpdateViewMono ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 893 of file srSensor.cpp.

References m_nDim, m_nView, and m_sp.

void CSensor::OnUpdateViewStereo ( CCmdUI *  pCmdUI  )  [protected]

Definition at line 933 of file srSensor.cpp.

References m_nDim, m_nView, and m_sp.

void CSensor::OnViewColor (  )  [protected]

Definition at line 899 of file srSensor.cpp.

References m_nDim, m_nDimSize, m_nView, m_pBuffer, m_sp, and Repaint().

void CSensor::OnViewColumn (  )  [protected]

Definition at line 864 of file srSensor.cpp.

References m_nDim, m_nView, m_sp, and Repaint().

void CSensor::OnViewGrid (  )  [protected]

Definition at line 939 of file srSensor.cpp.

References m_bGrid, m_nView, m_sp, and Repaint().

void CSensor::OnViewLine (  )  [protected]

Definition at line 849 of file srSensor.cpp.

References m_nDim, m_nDimSize, m_nView, m_sp, and Repaint().

void CSensor::OnViewMono (  )  [protected]

Definition at line 879 of file srSensor.cpp.

References m_nDim, m_nView, m_pBuffer, m_sp, and Repaint().

void CSensor::OnViewStereo (  )  [protected]

Definition at line 919 of file srSensor.cpp.

References m_nDim, m_nView, m_pBuffer, m_sp, and Repaint().

POINT CSensor::Project2D ( int  x,
int  y,
double  z 
) [private]

Definition at line 458 of file srSensor.cpp.

References int(), m_yAdd, and m_ySize.

Referenced by DrawColumn(), DrawLine(), and Grid3D().

void CSensor::Repaint (  )  [private]

Definition at line 742 of file srSensor.cpp.

References m_bRepaint.

Referenced by OnBright(), OnUpdate(), OnViewColor(), OnViewColumn(), OnViewGrid(), OnViewLine(), OnViewMono(), and OnViewStereo().

bool CSensor::RestoreLayout (  )  [private]

Definition at line 63 of file srSensor.cpp.

References GetDocument(), CDoc::IsRestoringLayout(), m_bGrid, m_nBright, m_nView, m_sSensor, CDoc::NewSection(), CDoc::ReadInt(), and CDoc::ReadString().

Referenced by OnInitialUpdate().

void CSensor::SetClipboardGraphics (  )  [private]

Definition at line 585 of file srSensor.cpp.

References DrawColumn(), DrawDirect(), DrawLine(), m_nView, m_pBuffer, m_xSize, and m_ySize.

Referenced by OnEditCopy().

void CSensor::SetClipboardText (  )  [private]

Definition at line 639 of file srSensor.cpp.

References boolSensor, cameraSensor, d, doubleFieldSensor, doubleSensor, GetDocument(), Simulation::getSensorportType(), Simulation::getSensorportValue(), CDoc::GetSimulation(), intSensor, m_nDimSize, m_pData, and m_sp.

Referenced by OnEditCopy().

unsigned char CSensor::ToChar ( double  value  )  const [inline, private]

Definition at line 47 of file srSensor.h.

References m_maxValue, and m_minValue.

void CSensor::WriteLayout (  ) 

Definition at line 38 of file srSensor.cpp.

References GetDocument(), m_bGrid, m_nBright, m_nView, m_sSensor, CDoc::NewSection(), CDoc::WriteInt(), and CDoc::WriteString().


Member Data Documentation

bool CSensor::m_bGrid [private]

Definition at line 23 of file srSensor.h.

Referenced by Grid3D(), OnInitialUpdate(), OnUpdateViewGrid(), OnViewGrid(), RestoreLayout(), and WriteLayout().

bool CSensor::m_bRepaint [private]

Definition at line 23 of file srSensor.h.

Referenced by DrawBitmap(), DrawMemDC(), and Repaint().

unsigned char CSensor::m_data [private]

Definition at line 25 of file srSensor.h.

double CSensor::m_maxValue [private]

Definition at line 21 of file srSensor.h.

Referenced by OnUpdate(), and ToChar().

CMenu CSensor::m_menuPopup [private]

Definition at line 10 of file srSensor.h.

Referenced by OnInitialUpdate(), and OnRButtonUp().

double CSensor::m_minValue [private]

Definition at line 21 of file srSensor.h.

Referenced by OnUpdate(), and ToChar().

int CSensor::m_nBright [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawColor(), DrawMono(), OnBright(), OnInitialUpdate(), OnUpdateBright(), RestoreLayout(), and WriteLayout().

int CSensor::m_nBufSize [private]

Definition at line 13 of file srSensor.h.

Referenced by OnInitialUpdate(), OnUpdate(), and ~CSensor().

int CSensor::m_nDim [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawBitmap(), DrawColor(), DrawStereo(), OnUpdate(), OnUpdateViewColor(), OnUpdateViewColumn(), OnUpdateViewLine(), OnUpdateViewMono(), OnUpdateViewStereo(), OnViewColor(), OnViewColumn(), OnViewLine(), OnViewMono(), and OnViewStereo().

int CSensor::m_nDimSize[3] [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawBitmap(), DrawColor(), DrawColumn(), DrawLine(), DrawStereo(), OnEditCopy(), OnUpdate(), OnUpdateViewColor(), OnUpdateViewLine(), OnViewColor(), OnViewLine(), and SetClipboardText().

int CSensor::m_nView [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawBitmap(), DrawMemDC(), OnBright(), OnEditCopy(), OnInitialUpdate(), OnUpdate(), OnUpdateBright(), OnUpdateViewColor(), OnUpdateViewColumn(), OnUpdateViewGrid(), OnUpdateViewLine(), OnUpdateViewMono(), OnUpdateViewStereo(), OnViewColor(), OnViewColumn(), OnViewGrid(), OnViewLine(), OnViewMono(), OnViewStereo(), RestoreLayout(), SetClipboardGraphics(), and WriteLayout().

CBitmap* CSensor::m_pBitmap [private]

Definition at line 28 of file srSensor.h.

Referenced by DrawMemDC(), OnInitialUpdate(), OnUpdate(), and ~CSensor().

BITMAPINFOHEADER* CSensor::m_pBuffer [private]

Definition at line 29 of file srSensor.h.

Referenced by DrawBitmap(), DrawColor(), DrawMono(), DrawStereo(), OnInitialUpdate(), OnUpdate(), OnViewColor(), OnViewMono(), OnViewStereo(), SetClipboardGraphics(), and ~CSensor().

unsigned char * CSensor::m_pData [private]

Definition at line 25 of file srSensor.h.

Referenced by DrawColor(), DrawColumn(), DrawLine(), DrawMono(), DrawStereo(), OnUpdate(), SetClipboardText(), and ~CSensor().

CRect CSensor::m_rect [private]

Definition at line 27 of file srSensor.h.

Referenced by DrawBitmap(), DrawMemDC(), and OnInitialUpdate().

int CSensor::m_sp [private]

Definition at line 12 of file srSensor.h.

Referenced by DrawDirect(), OnBright(), OnEditCopy(), OnUpdate(), OnUpdateBright(), OnUpdateEditCopy(), OnUpdateViewColor(), OnUpdateViewColumn(), OnUpdateViewGrid(), OnUpdateViewLine(), OnUpdateViewMono(), OnUpdateViewStereo(), OnViewColor(), OnViewColumn(), OnViewGrid(), OnViewLine(), OnViewMono(), OnViewStereo(), and SetClipboardText().

CString CSensor::m_sSensor [private]

Definition at line 11 of file srSensor.h.

Referenced by OnInitialUpdate(), OnUpdate(), RestoreLayout(), and WriteLayout().

int CSensor::m_xSize [private]

Definition at line 13 of file srSensor.h.

Referenced by Constrains(), DrawBitmap(), DrawColor(), DrawColumn(), DrawLine(), DrawMono(), DrawStereo(), Grid3D(), and SetClipboardGraphics().

int CSensor::m_yAdd [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawColumn(), DrawLine(), and Project2D().

int CSensor::m_ySize [private]

Definition at line 13 of file srSensor.h.

Referenced by DrawBitmap(), DrawColor(), DrawColumn(), DrawLine(), DrawMono(), DrawStereo(), Grid3D(), Project2D(), and SetClipboardGraphics().


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