Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB

  1. #ifndef __xc_h__
  2. #define __xc_h__
  3. #include "sscommon.h"
  4. // useful for xc-coords
  5. enum {
  6. RIGHT = 0,
  7. TOP,
  8. LEFT,
  9. BOTTOM
  10. };
  11. // Cross_section (xc) class
  12. class XC {
  13. public:
  14. GLfloat xLeft, xRight; // bounding box
  15. GLfloat yTop, yBottom;
  16. int numPts;
  17. POINT2D *pts; // CW points around the xc, from +x
  18. XC( int numPts );
  19. XC( const XC& xc );
  20. XC( XC *xc );
  21. ~XC();
  22. void Scale( float scale );
  23. float MaxExtent();
  24. float MinTurnRadius( int relDir );
  25. void CalcArcACValues90( int dir, float r, float *acPts );
  26. void CalcArcACValuesByDistance( float *acPts );
  27. void ConvertPtsZ( POINT3D *pts, float z );
  28. protected:
  29. void CalcBoundingBox();
  30. };
  31. // Specific xc's derived from base xc class
  32. class ELLIPTICAL_XC : public XC {
  33. public:
  34. ELLIPTICAL_XC( float r1, float r2 );
  35. ~ELLIPTICAL_XC();
  36. private:
  37. void SetControlPoints( float r1, float r2 );
  38. };
  39. class RANDOM4ARC_XC : public XC {
  40. public:
  41. RANDOM4ARC_XC( float r );
  42. ~RANDOM4ARC_XC();
  43. private:
  44. void SetControlPoints( float radius );
  45. };
  46. #endif __xc_h__