www.pudn.com > final_6.rar > TopView.h
#if !defined(AFX_TOPVIEW_H__2296BF7B_0878_49D6_AB5B_51C7A1AFB4A5__INCLUDED_)
#define AFX_TOPVIEW_H__2296BF7B_0878_49D6_AB5B_51C7A1AFB4A5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TopView.h : header file
//
#include "Base.h"
/////////////////////////////////////////////////////////////////////////////
// CTopView view
class CTopView : public CView
{
protected:
CTopView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CTopView)
CPoint prePoint,curPoint;
// Attributes
public:
CGPoint *startPoint;
color ZBuffer; //软件ZBuffer 存放像素点的色值
double Zt; //软件ZBuffer 存放距离视点最近交的参数t
// Operations
public:
void OnTrans2();
void OnRenderTop2();
void CallRender();
void TraceRay(CGPoint *startPoint, vector directVector,color *rayColor,int pX,int pY);
void SetStartPoint(CGPoint *mousePoint);
BOOL MouseOn(CPoint point);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTopView)
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CTopView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CTopView)
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 OnRButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOPVIEW_H__2296BF7B_0878_49D6_AB5B_51C7A1AFB4A5__INCLUDED_)