- Timestamp:
- 05/24/17 16:59:40 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp
r919 r1146 1047 1047 1048 1048 //create a new edge array ... 1049 TEdge *edges = new TEdge [highI+1];1049 TEdge *edges = new TEdge[highI+1]; 1050 1050 1051 1051 bool IsFlat = true; … … 4274 4274 { 4275 4275 //The equation of a line in general form (Ax + By + C = 0) 4276 //given 2 points (x ¹,y¹) & (x²,y²) is ...4277 //(y ¹ - y²)x + (x² - x¹)y + (y² - y¹)x¹ - (x² - x¹)y¹= 04278 //A = (y ¹ - y²); B = (x² - x¹); C = (y² - y¹)x¹ - (x² - x¹)y¹4279 //perpendicular distance of point (x ³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²)4276 //given 2 points (x,y) & (x,y) is ... 4277 //(y - y)x + (x - x)y + (y - y)x - (x - x)y = 0 4278 //A = (y - y); B = (x - x); C = (y - y)x - (x - x)y 4279 //perpendicular distance of point (x,y) = (Ax + By + C)/Sqrt(A + B) 4280 4280 //see http://en.wikipedia.org/wiki/Perpendicular_distance 4281 4281 double A = double(ln1.Y - ln2.Y);
Note: See TracChangeset
for help on using the changeset viewer.