亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? geometry.h

?? 一個C編寫的足球機器人比賽程序
?? H
字號:
// Geometry.h: interface for the Geometry class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GEOMETRY_H__D6CBA539_D626_4363_B6ED_837FC5B87A31__INCLUDED_)
#define AFX_GEOMETRY_H__D6CBA539_D626_4363_B6ED_837FC5B87A31__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "math.h"       // needed for M_PI constant
#include <string>       // needed for string
#include <iostream>


using namespace std;

typedef double AngRad;  /*!< Type definition for angles in degrees. */
typedef double AngDeg;  /*!< Type definition for angles in radians. */

#define EPSILON 0.0001  /*!< Value used for floating point equality tests. */

//<MOD Revisor="LordRPG" Date="2004-08-18" Ver="1.0">
//<SUM>needed from linux => win32</SUM>
#ifndef M_PI
#define M_PI 3.14159265
#endif

#ifndef min
#define min(a,b) (((a)<(b))?(a):(b))
#endif

#ifndef max
#define max(a,b) (((a)>(b))?(a):(b))
#endif
//</MOD>


// auxiliary numeric functions for determining the
// maximum and minimum of two given double values and the sign of a value
//double max     ( double d1, double d2 );
//double min     ( double d1, double d2 );
int    sign    ( double d1            );

// auxiliary goniometric functions which enable you to
// specify angles in degrees rather than in radians
AngDeg Rad2Deg ( AngRad x             );
AngRad Deg2Rad ( AngDeg x             );
double cosDeg  ( AngDeg x             );
double sinDeg  ( AngDeg x             );
double tanDeg  ( AngDeg x             );
AngDeg atanDeg ( double x             );
double atan2Deg( double x,  double y  );
AngDeg acosDeg ( double x             );
AngDeg asinDeg ( double x             );

// various goniometric functions
bool   isAngInInterval     ( AngDeg ang,    AngDeg angMin,    AngDeg angMax );
AngDeg getBisectorTwoAngles( AngDeg angMin, AngDeg angMax );

/*! CoordSystem is an enumeration of the different specified
    coordinate systems.  The two possibilities are CARTESIAN or
    POLAR. These values are for instance used in the initializing a
    VecPosition. The CoordSystem indicates whether the supplied
    arguments represent the position in cartesian or in polar
    coordinates. */
enum CoordSystemT {
  CARTESIAN,
  POLAR
};

/*****************************************************************************/
/********************   CLASS VECPOSITION   **********************************/
/*****************************************************************************/

/*! This class contains an x- and y-coordinate of a position (x,y) as
    member data and methods which operate on this position. The
    standard arithmetic operators are overloaded and can thus be
    applied to positions (x,y). It is also possible to represent a
    position in polar coordinates (r,phi), since the class contains a
    method to convert these into cartesian coordinates (x,y). */
class VecPosition
{
  // private member data
private:

  double m_x;   /*!< x-coordinate of this position */
  double m_y;   /*!< y-coordinate of this position */

  // public methods
public:
  // constructor for VecPosition class
  VecPosition                               ( double            vx = 0,
                                              double            vy = 0,
                                              CoordSystemT      cs =CARTESIAN);

  // overloaded arithmetic operators
  VecPosition        operator -             (                                );
  VecPosition        operator +             ( const double      &d           );
  VecPosition        operator +             ( const VecPosition &p           );
  VecPosition        operator -             ( const double      &d           );
  VecPosition        operator -             ( const VecPosition &p           );
  VecPosition        operator *             ( const double      &d           );
  VecPosition        operator *             ( const VecPosition &p           );
  VecPosition        operator /             ( const double      &d           );
  VecPosition        operator /             ( const VecPosition &p           );
  void               operator =             ( const double      &d           );
  void               operator +=            ( const VecPosition &p           );
  void               operator +=            ( const double      &d           );
  void               operator -=            ( const VecPosition &p           );
  void               operator -=            ( const double      &d           );
  void               operator *=            ( const VecPosition &p           );
  void               operator *=            ( const double      &d           );
  void               operator /=            ( const VecPosition &p           );
  void               operator /=            ( const double      &d           );
  bool               operator !=            ( const VecPosition &p           );
  bool               operator !=            ( const double      &d           );
  bool               operator ==            ( const VecPosition &p           );
  bool               operator ==            ( const double      &d           );


  // set- and get methods for private member variables
  bool               setX                   ( double            dX           );
  double             getX                   (                          ) const;
  bool               setY                   ( double            dY           );
  double             getY                   (                          ) const;

  // set- and get methods for derived position information
  void               setVecPosition         ( double            dX = 0,
                                              double            dY = 0,
                                              CoordSystemT      cs =CARTESIAN);
  double             getDistanceTo          ( const VecPosition p            );
  VecPosition        setMagnitude           ( double            d            );
  double             getMagnitude           (                          ) const;
  AngDeg             getDirection           (                          ) const;

  // comparison methods for positions
  bool               isInFrontOf            ( const VecPosition &p           );
  bool               isInFrontOf            ( const double      &d           );
  bool               isBehindOf             ( const VecPosition &p           );
  bool               isBehindOf             ( const double      &d           );
  bool               isLeftOf               ( const VecPosition &p           );
  bool               isLeftOf               ( const double      &d           );
  bool               isRightOf              ( const VecPosition &p           );
  bool               isRightOf              ( const double      &d           );
  bool               isBetweenX             ( const VecPosition &p1,
                                              const VecPosition &p2          );
  bool               isBetweenX             ( const double      &d1,
                                              const double      &d2          );
  bool               isBetweenY             ( const VecPosition &p1,
                                              const VecPosition &p2          );
  bool               isBetweenY             ( const double      &d1,
                                              const double      &d2          );

  // conversion methods for positions
  VecPosition        normalize              (                                );
  VecPosition        rotate                 ( AngDeg            angle        );
  VecPosition        globalToRelative       ( VecPosition       orig,
                                              AngDeg            ang          );
  VecPosition        relativeToGlobal       ( VecPosition       orig,
                                              AngDeg            ang          );
  VecPosition        getVecPositionOnLineFraction( VecPosition  &p,
                                              double            dFrac        );

  // static class methods
  static VecPosition getVecPositionFromPolar( double            dMag,
                                              AngDeg            ang          );
  static AngDeg      normalizeAngle         ( AngDeg            angle        );
};

/*****************************************************************************/
/*********************   CLASS GEOMETRY   ************************************/
/*****************************************************************************/

/*! This class contains several static methods dealing with geometry.*/
class Geometry
{

public:

  // geometric series
  static double getLengthGeomSeries(double dFirst,double dRatio,double dSum  );
  static double getSumGeomSeries   (double dFirst,double dRatio,double dLen  );
  static double getSumInfGeomSeries(double dFirst,double dRatio              );
  static double getFirstGeomSeries (double dSum,  double dRatio,double dLen  );
  static double getFirstInfGeomSeries(double dSum,double dRatio              );

  // abc formula
  static int    abcFormula(double a,double b, double c, double *s1,double *s2);
};

/*****************************************************************************/
/********************** CLASS CIRCLE *****************************************/
/*****************************************************************************/

/*!This class represents a circle. A circle is defined by one VecPosition
   (which denotes the center) and its radius. */
class Circle
{
    VecPosition m_posCenter;            /*!< Center of the circle  */
    double      m_dRadius;              /*!< Radius of the circle  */

public:
    Circle( );
    Circle( VecPosition pos, double dR );

    // get and set methods
    bool        setCircle             ( VecPosition pos,
                                        double      dR  );
    bool        setRadius             ( double dR       );
    double      getRadius             (                 );
    bool        setCenter             ( VecPosition pos );
    VecPosition getCenter             (                 );
    double      getCircumference      (                 );
    double      getArea               (                 );

    // calculate intersection points and area with other circle
    bool        isInside              ( VecPosition pos );
    int         getIntersectionPoints ( Circle      c,
                                        VecPosition *p1,
                                        VecPosition *p2 );
    double      getIntersectionArea   ( Circle c        );


}  ;

/*****************************************************************************/
/*********************** CLASS LINE ******************************************/
/*****************************************************************************/

/*!This class contains the representation of a line. A line is defined
   by the formula ay + bx + c = 0. The coefficients a, b and c are stored
   and used in the calculations. */
class Line
{
  // a line is defined by the formula: ay + bx + c = 0
  double m_a; /*!< This is the a coefficient in the line ay + bx + c = 0 */
  double m_b; /*!< This is the b coefficient in the line ay + bx + c = 0 */
  double m_c; /*!< This is the c coefficient in the line ay + bx + c = 0 */

public:
  Line( double a, double b, double c );


  // get intersection points with this line
  VecPosition getIntersection            ( Line        line                  );
  int         getCircleIntersectionPoints( Circle      circle,
                                           VecPosition *posSolution1,
                                           VecPosition *posSolution2         );
  Line        getTangentLine             ( VecPosition pos                   );
  VecPosition getPointOnLineClosestTo    ( VecPosition pos                   );
  double      getDistanceWithPoint       ( VecPosition pos                   );
  bool        isInBetween                ( VecPosition pos,
                                           VecPosition point1,
                                           VecPosition point2                );

  // calculate associated variables in the line
  double      getYGivenX                 ( double      x );
  double      getXGivenY                 ( double      y );
  double      getACoefficient            (               ) const;
  double      getBCoefficient            (               ) const;
  double      getCCoefficient            (               ) const;

  // static methods to make a line using an easier representation.
  static Line makeLineFromTwoPoints      ( VecPosition pos1,
                                           VecPosition pos2                  );
  static Line makeLineFromPositionAndAngle( VecPosition vec,
                                           AngDeg angle                      );
};

/*****************************************************************************/
/********************** CLASS RECTANGLE **************************************/
/******************************************************************************/
/*!This class represents a rectangle. A rectangle is defined by two
   VecPositions the one at the upper left corner and the one at the
   right bottom. */
class Rect
{
  VecPosition m_posLeftTop;     /*!< top left position of the rectangle      */
  VecPosition m_posRightBottom; /*!< bottom right position of the rectangle  */

public:
  Rect                          ( VecPosition pos, VecPosition pos2 );

  void        show              ( ostream& os = cout                );

  // checks whether point lies inside the rectangle
  bool        isInside          ( VecPosition pos                   );

  // standard get and set methosd
  void        setRectanglePoints( VecPosition pos1,
                                  VecPosition pos2                  );
  bool        setPosLeftTop     ( VecPosition pos                   );
  VecPosition getPosLeftTop     (                                   );
  bool        setPosRightBottom ( VecPosition pos                   );
  VecPosition getPosRightBottom (                                   );
};

#endif
 // !defined(AFX_GEOMETRY_H__D6CBA539_D626_4363_B6ED_837FC5B87A31__INCLUDED_)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产全国免费观看| 亚洲福利一区二区三区| 欧美日韩在线播放三区| 国产精品18久久久久| 午夜精品免费在线| 亚洲激情五月婷婷| 国产欧美综合在线| 精品国产1区2区3区| 欧美日韩国产综合一区二区三区| 成人性生交大片免费看视频在线 | 日韩av不卡一区二区| 国产精品久99| 国产亚洲人成网站| 欧美一区二区女人| 欧美色视频一区| 91蜜桃网址入口| 国产aⅴ精品一区二区三区色成熟| 日韩av一二三| 亚洲va韩国va欧美va精品 | 午夜一区二区三区在线观看| 国产精品久久久99| 国产欧美精品区一区二区三区| 欧美mv日韩mv国产网站app| 在线成人免费视频| 欧美视频一二三区| 欧美性色欧美a在线播放| 一本一道久久a久久精品综合蜜臀| 国产91对白在线观看九色| 国产一区二区三区四区五区美女 | 欧美图区在线视频| 在线观看一区日韩| 色婷婷综合久久久中文字幕| kk眼镜猥琐国模调教系列一区二区 | 亚洲伊人色欲综合网| 99久久精品情趣| 国产91精品一区二区麻豆亚洲| 国产在线不卡视频| 国产精品自在在线| 国产成人自拍在线| 丁香另类激情小说| 日韩一区二区精品葵司在线| 欧美日韩精品高清| 欧美乱妇20p| 欧美久久久久免费| 欧美日韩一级视频| 欧美日韩国产一区| 欧美一区二区三区电影| 欧美成人高清电影在线| 久久精品视频在线免费观看| 欧美激情资源网| 最新日韩在线视频| 亚洲午夜在线电影| 人人精品人人爱| 激情小说欧美图片| 粉嫩一区二区三区在线看| 从欧美一区二区三区| 国产精品一区二区无线| 粉嫩av一区二区三区| 99久久国产综合精品女不卡| 欧美在线免费播放| 日韩精品中文字幕一区| 久久久99久久| 亚洲精品欧美二区三区中文字幕| 尤物视频一区二区| 日本美女一区二区| 国产a区久久久| 一本到高清视频免费精品| 欧美精选午夜久久久乱码6080| 精品成人在线观看| 成人欧美一区二区三区白人| 亚洲欧美视频在线观看视频| 日韩电影免费在线看| 国产成人精品三级麻豆| 欧美性一区二区| 日韩欧美不卡在线观看视频| 日本一二三四高清不卡| 午夜天堂影视香蕉久久| 国模少妇一区二区三区| 99re8在线精品视频免费播放| 欧美高清www午色夜在线视频| 国产午夜精品在线观看| 亚洲国产sm捆绑调教视频 | 婷婷国产在线综合| 国产精品一二二区| 欧美日韩大陆在线| 中文无字幕一区二区三区| 午夜视频一区在线观看| 成人精品免费看| 欧美嫩在线观看| 国产精品二区一区二区aⅴ污介绍| 亚洲sss视频在线视频| 成人一区二区视频| 欧美一区午夜视频在线观看| 亚洲视频免费看| 国产黄人亚洲片| 3d动漫精品啪啪一区二区竹菊| 国产精品欧美久久久久无广告 | 国产精品女同一区二区三区| 日韩中文字幕麻豆| 91麻豆精品在线观看| 日韩美女主播在线视频一区二区三区| 亚洲三级免费电影| 国产一区二区在线观看视频| 欧美日韩国产首页在线观看| 国产精品美女久久久久av爽李琼| 日本成人在线一区| 欧美中文字幕不卡| 国产精品丝袜一区| 久久91精品国产91久久小草| 欧美日韩精品一区二区在线播放| 国产精品久久精品日日| 国产老女人精品毛片久久| 日韩一区二区在线看片| 亚洲gay无套男同| 一本久道久久综合中文字幕| 国产精品久久久久天堂| 国产成人超碰人人澡人人澡| 日韩精品一区二区三区在线 | 国产精品麻豆欧美日韩ww| 精品一区二区三区视频在线观看| 欧美夫妻性生活| 亚洲成在线观看| 欧美丝袜丝交足nylons图片| 亚洲免费看黄网站| 91麻豆免费在线观看| 国产精品国产三级国产有无不卡| 国产大陆亚洲精品国产| 国产人成一区二区三区影院| 国产美女在线观看一区| 亚洲精品一区二区三区精华液| 蜜桃视频在线观看一区| 日韩三级精品电影久久久| 图片区小说区国产精品视频| 欧美巨大另类极品videosbest | 国产亚洲综合色| 国产一区二区伦理| 精品国产不卡一区二区三区| 久久国产福利国产秒拍| 亚洲精品一区二区三区四区高清| 久久99精品久久久久久国产越南| 精品1区2区在线观看| 国产精品一品视频| 国产精品色婷婷| 91免费看视频| 亚洲一区在线观看网站| 欧美日韩三级在线| 日韩黄色小视频| 精品国产99国产精品| 国产乱码字幕精品高清av| 国产精品嫩草影院av蜜臀| 色综合久久久久| 视频一区二区欧美| 亚洲精品在线电影| 99久久综合99久久综合网站| 亚洲五码中文字幕| 欧美一级二级三级蜜桃| 国产精品自在在线| 亚洲激情自拍偷拍| 制服丝袜亚洲色图| 国产精品一二一区| 亚洲精品视频在线观看免费| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 亚洲愉拍自拍另类高清精品| 日韩欧美视频一区| www.亚洲色图| 亚洲综合激情网| 欧美变态tickling挠脚心| 成人理论电影网| 亚洲www啪成人一区二区麻豆| xnxx国产精品| 91色porny蝌蚪| 久久疯狂做爰流白浆xx| 国产精品毛片大码女人| 欧美日韩五月天| 国产91精品久久久久久久网曝门| 一区二区三区日韩欧美| 精品美女在线观看| 97se亚洲国产综合自在线观| 日韩av网站免费在线| 国产精品国产三级国产| 欧美妇女性影城| 97精品久久久久中文字幕| 美女脱光内衣内裤视频久久网站| 中文字幕一区在线| 日韩午夜精品视频| 91成人在线免费观看| 韩日欧美一区二区三区| 亚洲主播在线播放| 国产精品嫩草久久久久| 欧美一区二区三区免费大片| 99久久99久久综合| 国产精品中文字幕日韩精品| 亚洲成人综合在线| 国产精品成人免费在线| 日韩欧美电影一二三| 欧美在线免费观看亚洲| 不卡视频一二三| 国产一区二区三区免费看| 日韩黄色一级片| 依依成人精品视频|