edge.h

来自「此代码主要用于汽车车身的优化」· C头文件 代码 · 共 55 行

H
55
字号
// Edge.h: interface for the Edge class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_EDGE_H__338DC2B7_A924_41E3_AA95_5F7672FBA58B__INCLUDED_)
#define AFX_EDGE_H__338DC2B7_A924_41E3_AA95_5F7672FBA58B__INCLUDED_


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Vector.h"
#include <vector>
using namespace std;
/*
#if !defined(INCLUDE_MESH)
#define INCLUDE_MESH
#include "Mesh.h"  //ERRORs!!!!!
#endif 
*/

class Mesh;
class Edge;
class Face;

class Edge  
{
public:
	bool isOnBoundary();//是不是边界
	int getCounterVertex( int vi );//获取计算顶点
	void reset();//重新排列
	void dump() const;//
	Edge();//边函数
	Edge(int bgVertexIdx, int edVertexIdx);//	起始顶点和终止顶点
	virtual ~Edge();//
//	Mesh::EDGEPOS m_index;
	bool operator < (const Edge &e) const;
	Edge& operator = (const Edge &e);
	bool operator == (const Edge &e) const;
	int m_bgVertexIdx;//起始顶点索引
	int m_edVertexIdx;//终止顶点索引
	Vector3d m_midPoint;//中点索引
	int m_newEdgePointIdx;//新边点索引
	inline void addAdjFace(int fi) { m_adjFaceIdxSet.push_back(fi); };//增加邻接面
	inline void setMidPoint(Vector3d& mid) { 	m_midPoint = mid; } ;//设置中点
private:
	vector<int> m_adjFaceIdxSet;//邻接面索引
	friend class Mesh;//Face& Mesh::getAdjFace(const Face &f, const Edge &e);Mesh类为友元结构

};


#endif // !defined(AFX_EDGE_H__338DC2B7_A924_41E3_AA95_5F7672FBA58B__INCLUDED_)

⌨️ 快捷键说明

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