-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMeshFace.h
56 lines (46 loc) · 1.95 KB
/
MeshFace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// MeshFace.h: interface for the CMeshFace class.
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
#if !defined MESH_FACE_HEADER_INCLUDED
#define MESH_FACE_HEADER_INCLUDED
#pragma once
#include "MeshChild.h"
#include "MeshPosition.h"
class CMeshVertex;
class CMeshEdge;
class CMesh;
class CMeshFace:public CMeshChild
{
private:
void split_bezier_triangle(int level, int edge_to_split, const Point& vt0, const Point& vt1, const Point& vt2, const Point& c, const Point& vt01, const Point& vt10, const Point& vt12, const Point& vt21, const Point& vt20, const Point& vt02, void(*call_back)(const Point& vt0, const Point& vt1, const Point& vt2, const Point& n0, const Point& n1, const Point& n2));
public:
CMeshVertex* m_v[3];
CMeshEdge* m_e[3];
bool m_edge_dir[3];
CMeshPosition m_centre;
CMeshFace();
virtual ~CMeshFace();
// HeeksObj's virtual functions
int GetType()const{return MeshFaceType;}
const wxChar* GetTypeString(void)const{return _("Mesh Face");}
HeeksObj *MakeACopy(void)const;
const wxBitmap &GetIcon();
void GetGripperPositions(std::list<GripData> *list, bool just_for_endof);
void GetTools(std::list<Tool*>* t_list, const wxPoint* p);
bool Stretch(const double *p, const double* shift, void* data);
void DrawGripperSelectItems();
// member functions
void MakeSureDisplayListExists();
void GetSmoothTriangles(void(*call_back)(const Point& vt0, const Point& vt1, const Point& vt2, const Point& n0, const Point& n1, const Point& n2));
CMeshVertex* SplitOnGivenEdge(CMeshEdge* edge);
void RemoveGivenEdge(CMeshEdge* edge);
//Point normal();
Point simple_3_pts_normal();
Point midpoints3normal();
double angle_at_vertex(const CMeshVertex* v)const;
Point direction_at_vertex(const CMeshVertex* v)const;
double longest_length();
bool is_connected_to_edge(const CMeshEdge* edge)const;
bool RecalculateAGoodCentre();
};
#endif