⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sphereview.h

📁 此源代码是介绍中点位移算法
💻 H
字号:
// sphereView.h : interface of the CSphereView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SPHEREVIEW_H__F05DF185_D7F8_4291_96B6_90A855ACDFB2__INCLUDED_)
#define AFX_SPHEREVIEW_H__F05DF185_D7F8_4291_96B6_90A855ACDFB2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//////////////////////////////////////////////////
#include<conio.h>
#include<iostream.h>
#define   WINDOW_HEIGHT  500
#define PI 3.1415926
typedef struct ColorRGB{float R,G,B;}pRGB;
typedef struct fillpoint{int x,y; pRGB c;}Fpoint;
typedef struct tEdge{
	int yUpper;
	float xIntersect,dxPerScan;
	pRGB c; float mR,mG,mB;
	struct tEdge *next;
}Edge;//
typedef struct dcpt3 { double x,y,z; }	dcpt3;
	/**/
typedef struct ZPoint{ int z;double r; Fpoint *pxy; dcpt3 *fn,*pn;}ZP;

///////////////////////////////////////////////////
class CSphereView : public CView
{
protected: // create from serialization only
	CSphereView();
	DECLARE_DYNCREATE(CSphereView)

// Attributes
public:
	CSphereDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSphereView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void lineany(int xa,int ya,int xb,int yb);
	void lineany(Fpoint p1, Fpoint p2);
	void fillScan(int scan,Edge *active);
	void scanFill(int cnt,Fpoint *pts);
	bool sphereview();
	virtual ~CSphereView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
protected://+++++++++++++++++++++++++++++++++++++
	CClientDC *m_pDC;
	COLORREF m_ForeColor;
	COLORREF m_BackColor;


protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSphereView)
	afx_msg void OnButtonWangge();
	afx_msg void OnButtonJingmian();
	afx_msg void OnButtonFanshe();
	afx_msg void OnButtonGuangzhao();
	afx_msg void OnButtonNs();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in sphereView.cpp
inline CSphereDoc* CSphereView::GetDocument()
   { return (CSphereDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SPHEREVIEW_H__F05DF185_D7F8_4291_96B6_90A855ACDFB2__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -