ug4
triangle_fill_sweep_line.cpp File Reference
#include <list>
#include <vector>
#include <cassert>
#include <map>
#include <stack>
#include <algorithm>
#include "lib_grid/lg_base.h"
#include "triangle_fill_sweep_line.h"

Classes

struct  ug::SweepLineEdge
 
struct  ug::SweepLineVertex
 

Namespaces

 ug
 the ug namespace
 

Typedefs

typedef multimap< number, SweepLineEdge * > ug::MapEdgeCuts
 
typedef SweepLineEdgeList::iterator ug::SweepLineEdgeIter
 
typedef list< SweepLineEdge > ug::SweepLineEdgeList
 

Enumerations

enum  ug::SweepLineEdgeStatus { ug::SLES_UNKNOWN = 0 , ug::SLES_RIM }
 
enum  ug::SweepLineVertexStatus {
  ug::SLVS_NONE = 0 , ug::SLVS_START , ug::SLVS_END , ug::SLVS_REGULAR ,
  ug::SLVS_SPLIT , ug::SLVS_MERGE
}
 

Functions

number ug::CalculateRightBendVal (vector2 &dirOut, number &normDotOut, SweepLineEdge &e, SweepLineVertex *firstVrt, vector2 lastDir, bool lastDirNormalized=false)
 returns a value between -1 and 1, determining the magnitude of the right bend. More...
 
bool ug::cmp_slv (const SweepLineVertex &v1, const SweepLineVertex &v2)
 
bool ug::CreateSweepLineStructs (vector< SweepLineVertex > &vrtsOut, SweepLineEdgeList &edgesOut, const vector< vector2 > &vrtsIn, const vector< int > &edgesIn)
 
bool ug::EdgeExists (SweepLineVertex *v0, SweepLineVertex *v1)
 
SweepLineEdge * ug::GetEdgeOnTheLeft (MapEdgeCuts &edgeCuts, SweepLineVertex &v)
 
void ug::PrintDebugInfos (const vector< SweepLineVertex > &vrts, const list< SweepLineEdge > &edges)
 
bool ug::SweepLine_CreateMonotones (vector< SweepLineVertex > &vrts, list< SweepLineEdge > &edges)
 inserts new edges so that edges contains a set of monotone polynomes More...
 
bool ug::SweepLineEdgeIntersectsSweepLine (number &xOut, const SweepLineEdge &edge, number sweepLineY)
 
bool ug::TriangleFill_SweepLine (std::vector< int > &facesOut, const std::vector< vector3 > &srcVrts, std::vector< int > &srcEdges)
 Performs triangulation of a 3d polygon and resolves inner edges. More...
 
bool ug::TriangleFill_SweepLine (vector< int > &facesOut, const vector< vector2 > &srcVrtsOrig, vector< int > &srcEdges)
 Performs triangulation of a polygon and resoves additional inner edges. More...