#include "general.h"
#include <stdio.h>
#include <math.h>
Go to the source code of this file.
#define AngleFrom | ( | A, | |||
B | ) |
Value:
Definition at line 62 of file fpoint.h.
Referenced by ComputeOrientation(), and NormalizedAngleFrom().
#define CopyPoint | ( | A, | |||
B | ) | ( Xof(B) = Xof(A), Yof(B) = Yof(A) ) |
Definition at line 53 of file fpoint.h.
Referenced by ComputeBulges(), ConvertOutline(), and ConvertToOutlineFeatures().
#define DistanceBetween | ( | A, | |||
B | ) | (sqrt ((double) (XDelta(A,B) * XDelta(A,B) + YDelta(A,B) * YDelta(A,B)))) |
Definition at line 58 of file fpoint.h.
Referenced by AddOutlineFeatureToSet(), ConvertSegmentToPicoFeat(), ExtractMicroFeature(), and FilterEdgeNoise().
#define FillPoint | ( | P, | |||
X, | |||||
Y | ) | ( Xof(P) = (X), Yof(P) = (Y) ) |
#define XDelta | ( | A, | |||
B | ) | ( Xof(B) - Xof(A) ) |
macros for computing miscellaneous functions of 2 points
Definition at line 56 of file fpoint.h.
Referenced by ConvertSegmentToPicoFeat().
#define XIntersectionOf | ( | A, | |||
B, | |||||
X | ) | ( SlopeFrom(A,B) * ((X) - Xof(A)) + Yof(A)) |
#define Xof | ( | P | ) | ( (P).x ) |
macros for manipulating simple point data structures
Definition at line 48 of file fpoint.h.
Referenced by AddOutlineFeatureToSet(), ComputeBulges(), ConvertOutline(), and ConvertSegmentToPicoFeat().
#define YDelta | ( | A, | |||
B | ) | ( Yof(B) - Yof(A) ) |
#define Yof | ( | P | ) | ( (P).y ) |
Definition at line 49 of file fpoint.h.
Referenced by AddOutlineFeatureToSet(), ConvertOutline(), and ConvertSegmentToPicoFeat().
Return the angle from Point1 to Point2 normalized to lie in the range 0 to FullScale (where FullScale corresponds to 2*pi or 360 degrees).
Point1,Point2 | Points to compute angle between | |
FullScale | Value to associate with 2*pi |
Definition at line 41 of file fpoint.cpp.
Referenced by AddOutlineFeatureToSet(), ConvertSegmentToPicoFeat(), and ExtractMicroFeature().
00043 { 00044 FLOAT32 Angle; 00045 FLOAT32 NumRadsInCircle = 2.0 * PI; 00046 00047 Angle = AngleFrom (*Point1, *Point2); 00048 if (Angle < 0.0) 00049 Angle += NumRadsInCircle; 00050 Angle *= FullScale / NumRadsInCircle; 00051 if (Angle < 0.0 || Angle >= FullScale) 00052 Angle = 0.0; 00053 return (Angle); 00054 00055 } /* NormalizedAngleFrom */