Mesh.h
上传用户:lin85885
上传日期:2013-04-27
资源大小:796k
文件大小:2k
- // Mesh.h: interface for the CMesh class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MESH_H__9E1E69C2_755C_11D2_8C17_0000E83E7EBA__INCLUDED_)
- #define AFX_MESH_H__9E1E69C2_755C_11D2_8C17_0000E83E7EBA__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "Defs.h"
- #include "Geometry.h"
- class CMesh
- {
- public:
- CMesh();
- virtual ~CMesh();
- //members
- public:
- void SaveData(FILE *fp);
- int m_nTriangle;
- int m_nsTriangle;
- Triangle *m_Triangle;
- Triangle *m_sTriangle;
- int m_nVertex;
- int m_nsVertex;
- Coord3 *m_Vertex;
- Coord3 *m_sVertex;
- Coord3 *m_VNormal;
- Coord3 *m_sVNormal;
- Coord3 *m_TNormal;
- Coord3 *m_sTNormal;
- CProgressCtrl *m_pProgress;
- //methods
- int ReadData(FILE *fp);
- int DrawModel(int RenderMode, int RenderModel);
- int Simplify(float ratio);
- int Simplify(int nFaceNo);
- void pair_contract(int Num_vertex,BOOL *border,int **cad_pair,float **pair_cost,Coord3 **pair_pos,Matrix4x4 *vex_Q,Coord3 *vertex,int *vex_map,int require);
- void cal_tri_Q(int Num_triangle,Triangle *mesh,Coord3 *vertex,Vector3 *tri_normal,Matrix4x4 *tri_Q);
- void cal_vex_Q(int Num_vertex,BOOL *border,int **vex_tri,Triangle *mesh,Coord3 *vertex,Vector3 *tri_normal,Matrix4x4 *tri_Q,Matrix4x4 *vex_Q);
- void V3Standarize(Vector3 v);
- float deta3(float matrix[3][3]);
- int Gauss(int n,float **A,float *b);
- };
- #endif // !defined(AFX_MESH_H__9E1E69C2_755C_11D2_8C17_0000E83E7EBA__INCLUDED_)