8 #define _USE_MATH_DEFINES    37                         indexOfOppositeVert = -1;       
    39                         indexOfRightEdge = -1;
    40                         indexOfFrontFace = -1;
    41                         angleOpposite = 2 * M_PI;
    46         void CreateEdgesFromVertsAndFaces();
    47         void CollectAndArrangeNeighs();
    48         void ComputeAnglesAroundVerts();
    49         void ComputePlanarCoordsOfIncidentVertForEdges();
    50         void ComputeNumOfHoles();
    51         void ComputeNumOfComponents();
    54         CRichModel(
const vector<CPoint3D> &verts, 
const vector<CBaseModel::CFace> &faces);
    56         void PreprocessBaseModel();
    58         void SplitBasedOnScalarField(
const vector<double>& scalarField,
    60                 const string& fileWithLargerScalars,
    61                 const string& fileWithSmallerScalars);
    62         void SavePathToObj(
const vector<EdgePoint>& pl, 
const string& filename) 
const;
    64         void SaveIsolineToObj(
const vector<EdgePoint>& isoline, 
const string& filename) 
const;
    65         void SetEdgeLength(
int leftVert, 
int rightVert, 
double newLength);
    66         void FinishChangingEdgeLengths();
    67         void PrintInfo(ostream& out) 
const;
    68         double AngleSum(
int vertIndex) 
const;
    69         int GetSubindexToVert(
int root, 
int neigh) 
const;
    70         const CEdge& Edge(
int edgeIndex) 
const; 
    71         const vector<pair<int, double> >& Neigh(
int root) 
const;                
    74         double ProportionOnEdgeByImage(
int edgeIndex, 
const pair<double, double> &coord) 
const;
    76         double ProportionOnLeftEdgeByImage(
int edgeIndex, 
const pair<double, double> &coord, 
double proportion) 
const;
    78         double ProportionOnRightEdgeByImage(
int edgeIndex, 
const pair<double, double> &coord, 
double proportion) 
const;
    80         double ProportionOnEdgeByImage(
int edgeIndex, 
double x1, 
double y1, 
double x2, 
double y2) 
const;
    81         pair<double, double> GetNew2DCoordinatesByRotatingAroundLeftChildEdge(
int edgeIndex, 
const pair<double, double>& input2DCoordinates) 
const;     
    82         pair<double, double> GetNew2DCoordinatesByRotatingAroundRightChildEdge(
int edgeIndex, 
const pair<double, double>& input2DCoordinates) 
const;
    83         pair<double, double> GetNew2DCoordinatesByReversingCurrentEdge(
int edgeIndex, 
const pair<double, double>& input2DCoordinates) 
const;
    84         double DistanceToOppositeAngle(
int edgeIndex, 
const pair<double, double>& coord) 
const;
    85         double DistanceToLeftVert(
int edgeIndex, 
const pair<double, double>& coord) 
const;
    86         double DistanceToRightVert(
int edgeIndex, 
const pair<double, double>& coord) 
const;
    87         int GetNumOfEdges() 
const;
    88         int GetNumOfValidDirectedEdges() 
const;
    89         int GetNumOfTotalUndirectedEdges() 
const;
    90         int GetNumOfGenera() 
const;
    91         int GetNumOfIsolated() 
const;
    92         int GetNumOfComponents() 
const;
    93         int GetNumOfBoundries() 
const;
    94         bool IsStronglyConvexVert(
int index) 
const;
    95         bool IsWeaklyConvexVert(
int index) 
const;
    96         bool isBoundaryVert(
int index) 
const;
    97         bool IsClosedModel() 
const;
    98         bool IsExtremeEdge(
int edgeIndex) 
const;
    99         bool IsStartEdge(
int edgeIndex) 
const;  
   100         int GetEdgeIndexFromTwoVertices(
int leftVert, 
int rightVert) 
const;
   102         int IntersectQuery(
int faceID, 
const pair<EdgePoint, EdgePoint>& seg1, 
const pair<EdgePoint, EdgePoint>& seg2, 
EdgePoint& intersection) 
const;
   103         double GetMaxEdgeLength() 
const;
 
pair< double, double > coordOfOppositeVert
vector< pair< bool, bool > > m_FlagsForCheckingConvexVerts
pair< double, double > matrixRotatedToLeftEdge
vector< vector< pair< int, double > > > m_NeighsAndAngles
set< int > m_UselessEdges
pair< double, double > matrixRotatedToRightEdge