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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? geometry.h

?? 機器人足球?qū)崿F(xiàn)的核心代碼
?? 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_)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日产欧美精品一区二区三区| 欧美中文字幕不卡| 久久综合久久99| 国产黑丝在线一区二区三区| 国产欧美一区二区精品仙草咪| 国产激情视频一区二区在线观看 | 欧美专区亚洲专区| 一区二区不卡在线视频 午夜欧美不卡在 | 日本一区二区免费在线| 91免费版在线| 丝袜美腿亚洲一区二区图片| 精品国精品自拍自在线| 成人精品视频一区二区三区尤物| 亚洲人成影院在线观看| 欧美日韩精品一区二区三区| 美女一区二区视频| 中文字幕第一页久久| 一本久久综合亚洲鲁鲁五月天| 午夜久久电影网| 久久久99久久| 欧美日韩中文字幕一区| 韩国一区二区视频| 亚洲欧洲综合另类| 精品乱人伦小说| 91在线porny国产在线看| 蜜桃精品视频在线观看| 国产精品精品国产色婷婷| 91精品久久久久久蜜臀| 丁香婷婷综合色啪| 日日夜夜免费精品| 国产精品对白交换视频| 日韩女优电影在线观看| av高清不卡在线| 免费成人深夜小野草| 亚洲天堂福利av| 日韩免费视频线观看| 欧美在线免费视屏| 国产91高潮流白浆在线麻豆 | 欧美一区二区日韩| 91女神在线视频| 国产精品一区二区三区四区| 亚洲一区二三区| 国产精品沙发午睡系列990531| 欧美另类高清zo欧美| 成人激情小说乱人伦| 男女男精品视频网| 亚洲福利一区二区| 亚洲视频网在线直播| 精品欧美久久久| 7777精品久久久大香线蕉| 91视频在线看| 成人一区二区三区中文字幕| 久久99在线观看| 午夜精品123| 亚洲在线视频一区| 国产精品久久久久久久第一福利| 亚洲精品一区二区三区99| 欧美日韩国产一二三| 日本久久一区二区| 99精品视频在线免费观看| 国产成人精品一区二| 国产一区二区剧情av在线| 蜜臀av一区二区在线观看| 午夜精品在线看| 亚洲18女电影在线观看| 亚洲一区二区高清| 亚洲中国最大av网站| 亚洲一区二区影院| 一区二区三区免费网站| 国产精品亚洲专一区二区三区| 欧美一区二区三区视频在线观看| 欧洲一区二区av| eeuss国产一区二区三区| 国产精品资源站在线| 久久成人免费日本黄色| 久久精品国产澳门| 国内精品久久久久影院薰衣草| 久久国产精品72免费观看| 久久成人久久鬼色| 国产精品自在欧美一区| 顶级嫩模精品视频在线看| 国产精品一区二区三区99| 国产精品一区二区三区网站| 国产成人精品aa毛片| 成人高清免费在线播放| 99视频超级精品| 在线欧美日韩精品| 欧美日韩在线三区| 欧美一区二区三区四区高清| 日韩欧美国产小视频| 精品国产电影一区二区 | 99久久精品免费| av中文字幕在线不卡| 色婷婷国产精品| 69堂国产成人免费视频| 欧美精品一区二区三区四区 | 亚洲精品日产精品乱码不卡| 亚洲国产欧美日韩另类综合 | 免费成人av在线播放| 久久99精品久久久久| 成人激情午夜影院| 欧美色综合网站| 欧美电影免费观看高清完整版 | 亚洲国产三级在线| 奇米精品一区二区三区在线观看一| 美女视频第一区二区三区免费观看网站 | 国产米奇在线777精品观看| 成人激情免费电影网址| 在线观看欧美日本| 日韩欧美一区二区在线视频| 国产精品视频一二三| 亚洲一区二区精品3399| 激情成人午夜视频| 在线免费观看日韩欧美| 欧美大片在线观看| 亚洲三级在线免费| 精品一区二区免费| 一本色道久久加勒比精品| 欧美一级视频精品观看| 国产精品大尺度| 蜜桃久久精品一区二区| 99riav久久精品riav| 日韩午夜中文字幕| 亚洲裸体在线观看| 国精品**一区二区三区在线蜜桃| 色视频成人在线观看免| 久久久不卡影院| 丝袜脚交一区二区| 91免费在线视频观看| 久久影院午夜片一区| 亚洲在线一区二区三区| 国产成人av在线影院| 91精品国产综合久久久久久久久久 | 91精品欧美综合在线观看最新| 亚洲国产精品99久久久久久久久 | 99riav一区二区三区| 精品电影一区二区三区| 偷拍与自拍一区| 91蝌蚪porny成人天涯| 国产日韩欧美一区二区三区乱码 | 在线观看日韩国产| 成人免费在线播放视频| 国产在线精品免费| 欧美乱妇一区二区三区不卡视频| 亚洲色图欧美偷拍| 成人性色生活片| 国产午夜精品一区二区三区视频 | 欧美成va人片在线观看| 亚洲一区二区四区蜜桃| caoporn国产一区二区| 国产日产亚洲精品系列| 美女视频黄 久久| 欧美精品一卡二卡| 亚洲永久免费av| 色香色香欲天天天影视综合网| 欧美激情一区二区三区四区 | **性色生活片久久毛片| 国产福利精品一区二区| 精品国产第一区二区三区观看体验| 日本美女一区二区三区| 91麻豆精品国产91久久久久久 | 制服丝袜亚洲精品中文字幕| 午夜国产精品影院在线观看| 欧美日韩国产高清一区| 五月婷婷综合在线| 欧美日韩不卡一区| 日韩影院免费视频| 日韩欧美国产一区二区三区| 久久成人免费电影| 亚洲精品一线二线三线| 国产一区不卡在线| 国产欧美1区2区3区| 成人小视频在线观看| 椎名由奈av一区二区三区| 91在线视频在线| 亚洲午夜久久久久久久久电影院| 欧美性极品少妇| 日韩精品免费专区| 精品国精品自拍自在线| 粉嫩在线一区二区三区视频| 国产精品国产三级国产aⅴ中文| 99r精品视频| 亚洲成人午夜影院| 精品少妇一区二区三区在线视频| 国产呦精品一区二区三区网站| 国产午夜精品一区二区三区四区| 成人精品一区二区三区四区| 一区二区三区波多野结衣在线观看| 欧美性xxxxx极品少妇| 日一区二区三区| 国产网红主播福利一区二区| 91免费版在线| 免费观看成人av| 中文字幕av一区二区三区高| 欧美影院一区二区| 美女精品自拍一二三四| 国产精品国产自产拍高清av| 欧美日韩免费高清一区色橹橹| 蜜桃av噜噜一区| 国产精品毛片久久久久久久|