My Project
lineSegments.h
1 #ifndef LINE_SEGMENTS_INCLUDED
2 #define LINE_SEGMENTS_INCLUDED
3 
4 #include <stdio.h>
5 
6 
9 public:
10 
12  static const float A,B,P;
13 
15  int x1,y1,x2,y2;
16 
17  OrientedLineSegment(void);
18 
20  int read(FILE* fp);
21 
23  float getWeight(const int& x,const int& y) const;
24 
28  static void Blend(const OrientedLineSegment& segment1,const OrientedLineSegment& segment2,const float& blendWeight,OrientedLineSegment& outSegment);
29 
31  // Unimplemented Code //
33 
34  float length(void) const;
35 
38  float distance(const int& x,const int& y) const;
39 
43  void getPerpendicular(float& x,float& y) const;
44 
48  static void GetSourcePosition(const OrientedLineSegment& source,const OrientedLineSegment& destination,
49  const int& destinationX,const int& destinationY,
50  float& sourceX,float& sourceY);
51 };
52 
55  int read(FILE* fp);
56 public:
58  int count;
61 
64 
66  int read(const char* fileName);
67 
68 
70  int setCount(const int& count);
71 
76  void getSourcePosition(const int& destinationX,const int& destinationY,float& sourceX,float& sourceY) const;
77 
78 };
79 #endif // LINE_SEGMENTS_INCLUDED
static const float A
Definition: lineSegments.h:12
int count
Definition: lineSegments.h:58
float getWeight(const int &x, const int &y) const
Definition: lineSegments.cpp:24
float distance(const int &x, const int &y) const
Definition: lineSegments.todo.cpp:11
float length(void) const
Definition: lineSegments.todo.cpp:7
static void GetSourcePosition(const OrientedLineSegment &source, const OrientedLineSegment &destination, const int &destinationX, const int &destinationY, float &sourceX, float &sourceY)
Definition: lineSegments.todo.cpp:20
static void Blend(const OrientedLineSegment &segment1, const OrientedLineSegment &segment2, const float &blendWeight, OrientedLineSegment &outSegment)
Definition: lineSegments.cpp:13
Definition: lineSegments.h:54
OrientedLineSegment * segments1
Definition: lineSegments.h:60
int x1
Definition: lineSegments.h:15
Definition: lineSegments.h:8
int read(FILE *fp)
Definition: lineSegments.cpp:19
void getPerpendicular(float &x, float &y) const
Definition: lineSegments.todo.cpp:15