mesh.h

来自「快速fft变换的c实现」· C头文件 代码 · 共 58 行

H
58
字号
// Mesh.h: interface for the Mesh class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MESH_H__A4C83FBA_763C_435C_8FE8_513AC8799C0E__INCLUDED_)
#define AFX_MESH_H__A4C83FBA_763C_435C_8FE8_513AC8799C0E__INCLUDED_

#include "PointSet.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Mesh  
{
private:
	int m_iVertexNum;
	int m_iFaceNum;
//	float (*m_pVertex)[3];
//	int (*m_pFaceIndex)[3];
//	float (*m_pVNormal)[3];
//	float (*m_pFNormal)[3];
	vec3f m_pVertex;
	vec3i m_pFaceIndex;
	vec3f m_pVNormal;
	vec3f m_pFNormal;
	float *m_pValue;

public:
	void SetFace(int index, int i, int j, int k);
	void SetVertex(int index, float x, float y, float z);
	void DrawSmooth();
	void DrawSolid();
	void DrawShadedWires();
	void DrawWireframes();
	vec3i GetFaceIndex();
	int* GetFaceIndex(int index);
	vec3f GetVertex();
	float* GetVertex(int index);
	void SmoothShading();
	void DrawBox();
	void GetBoundingBox(float *minCoord, float *maxCoord);
	BOOL OpenFile(CString fileName, CString fileExt);
	BOOL WriteFile(CString fileName, CString fileExt);
	double LENGTH(double v[3]);
	void ComputeVertexNormal();
	void ComputeFaceNormal();
	int GetFaceCount();
	int GetVertexCount();
	void SetFaceCount(int N);
	void SetVertexCount(int N);

	Mesh();
	virtual ~Mesh();

};

#endif // !defined(AFX_MESH_H__A4C83FBA_763C_435C_8FE8_513AC8799C0E__INCLUDED_)

⌨️ 快捷键说明

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