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

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

?? geometry.h

?? 機器人足球AI設計比賽
?? H
?? 第 1 頁 / 共 2 頁
字號:
{public:    f_inline                Sector() { }//    f_inline                Sector(const Rectangle &inOther) : _Left(inOther.Left()), _Top(inOther.Top()), _Right(inOther.Right()), _Bottom(inOther.Bottom()) { }     f_inline                Sector(Vector3f start, Vector3f direction, float radius, AngDeg alpha) :_start(start), _direction(direction), _radius(radius), _alpha(alpha) { }     f_inline void   Set(Vector3f start, Vector3f direction, float radius, AngDeg alpha)   { _start = start; _direction = direction; _radius = radius; _alpha = alpha; }     // member access    f_inline Vector3f    Start() const                    { return _start; }    f_inline Vector3f    Direction() const                   { return _direction; }    f_inline float    Radius() const                     { return _radius; }    f_inline AngDeg    Alpha() const                  { return _alpha; }/*    f_inline void   Normalize()                                                                             { if (_Right < _Left) gSwap(_Left, _Right); if (_Bottom < _Top) gSwap(_Top, _Bottom); }    f_inline void   Widen(float inDelta)                                                              { _Left-=inDelta; _Top-=inDelta; _Right+=inDelta; _Bottom+=inDelta;     }    f_inline void   Widen(float inDeltaWidth, float inDeltaHeight)              { _Right+=inDeltaWidth; _Bottom+=inDeltaHeight; }    f_inline void   Widen(float inDeltaLeft, float inDeltaTop, float inDeltaRight, float inDeltaBottom)     { _Left-=inDeltaLeft; _Top-=inDeltaTop; _Right+=inDeltaRight; _Bottom+=inDeltaBottom;           }    f_inline void   Shrink(float inDelta)                                                             { _Left+=inDelta;       _Top+=inDelta;  _Right-=inDelta; _Bottom-=inDelta;      }    f_inline void   Shrink(float inDeltaWidth, float inDeltaHeight)             { _Right-=inDeltaWidth; _Bottom-=inDeltaHeight; }    f_inline void   Shrink(float inDeltaLeft, float inDeltaTop, float inDeltaRight, float inDeltaBottom) { _Left+=inDeltaLeft; _Top+=inDeltaTop; _Right-=inDeltaRight; _Bottom-=inDeltaBottom;              }    f_inline void   Offset(float inDeltaX, float inDeltaY)                              { _Left+=inDeltaX;      _Top+=inDeltaY; _Right+=inDeltaX;       _Bottom+=inDeltaY; }    f_inline bool   Intersects(const Rectangle &b) const                                 { return !(_Left > b._Right || _Right < b._Left || _Top > b._Bottom || _Bottom < b._Top); }	     // assignment    f_inline Rectangle& operator=(const Rectangle &inOther)  { _Left=inOther.Left(); _Top=inOther.Top();     _Right=inOther.Right(); _Bottom=inOther.Bottom(); return *this; }     // comparison    f_inline bool operator==(const Rectangle &inRHS) const  { return (_Left==inRHS.Left()) && (_Top==inRHS.Top()) && (_Right==inRHS.Right()) && (_Bottom==inRHS.Bottom()); }    f_inline bool operator!=(const Rectangle &inRHS) const  { return (_Left!=inRHS.Left()) || (_Top!=inRHS.Top()) || (_Right!=inRHS.Right()) || (_Bottom!=inRHS.Bottom()); }	f_inline bool operator[](const Vector3f &p) const { return ( p.x()<_Right && p.x()>_Left && p.y()<_Top && p.y()>_Bottom); }*/	    f_inline Sector& operator=(const Sector &inOther)  { _start=inOther.Start(); _direction=inOther.Direction();     _radius=inOther.Radius(); _alpha=inOther.Alpha(); return *this; }	bool isInside(const Vector3f &point);private:     Vector3f _start;     Vector3f _direction;     float _radius;     AngDeg _alpha;};/*****************************************************************************//*********************** CLASS LINE2 ******************************************//*****************************************************************************//*!This class contains the representation of a line in 2D. A line is defined   by the formula ay + bx + c = 0. The coefficients a, b and c are stored   and used in the calculations. */template <typename T>class Line2{  // a line is defined by the formula: ay + bx + c = 0  T _a; /*!< This is the a coefficient in the line ay + bx + c = 0 */  T _b; /*!< This is the b coefficient in the line ay + bx + c = 0 */  T _c; /*!< This is the c coefficient in the line ay + bx + c = 0 */public:	Line2( T a, T b, T c ){ _a=a; _b=b; _c=c; }	T getACoefficient() const { return _a;}	T getBCoefficient() const { return _b;}	T getCCoefficient() const { return _c;}		// print methods	/*! This method prints the line information to the specified output stream.    \param os output stream to which output is written. */	void show( ostream& os){ os << *this;}	/*! This function prints the line to the specified output stream in the    format y = ax + b.    \param os output stream to which output is written    \param l line that is written to output stream    \return output sream to which output is appended. */	friend ostream& operator <<(ostream & os, Line2<T> l)	{  		T a = l.getACoefficient();  		T b = l.getBCoefficient();  		T c = l.getCCoefficient();  		// ay + bx + c = 0 -> y = -b/a x - c/a  		if( a == 0 )    		os << "x = " << -c/b;  		else  		{    		os << "y = ";    		if( b != 0 )      			os << -b/a << "x ";    		if( c > 0 )       			os << "- " <<  fabs(c/a);    		else if( c < 0 )       			os << "+ " <<  fabs(c/a);  		}  		return os;	}  	/*! get intersection points with this line	This method returns the intersection point between the current Line and    the specified line.    \param line line with which the intersection should be calculated.    \return Vector2f position that is the intersection point. */	Vector2f getIntersection( Line2<T> line ) const	{  		Vector2f pos(0,0);  		T x, y;  		if( ( _a / _b ) ==  (line.getACoefficient() / line.getBCoefficient() ))    		return pos; // lines are parallel, no intersection  		if( _a == 0 )            // bx + c = 0 and a2*y + b2*x + c2 = 0 ==> x = -c/b  		{                          // calculate x using the current line    		x = -_c/_b;                // and calculate the y using the second line    		y = line.getYGivenX(x);  		}  		else if( line.getACoefficient() == 0 )  		{                         // ay + bx + c = 0 and b2*x + c2 = 0 ==> x = -c2/b2   			x = -line.getCCoefficient()/line.getBCoefficient(); // calculate x using   			y = getYGivenX(x);       // 2nd line and calculate y using current line  		}  		// ay + bx + c = 0 and a2y + b2*x + c2 = 0  		// y = (-b2/a2)x - c2/a2  		// bx = -a*y - c =>  bx = -a*(-b2/a2)x -a*(-c2/a2) - c ==>  		// ==> a2*bx = a*b2*x + a*c2 - a2*c ==> x = (a*c2 - a2*c)/(a2*b - a*b2)  		// calculate x using the above formula and the y using the current line  		else  		{    		x = (_a*line.getCCoefficient() - line.getACoefficient()*_c)/                    (line.getACoefficient()*_b - _a*line.getBCoefficient());    		y = getYGivenX(x);  		}  		return Vector2f( x, y );	}			/*! This method returns the closest point on a line to a given position.    \param pos point to which closest point should be determined    \return Vector2f closest point on line to 'pos'. */	Vector2f getPointOnLineClosestTo( const Vector2f &pos ) const	{  		Line2<T> l2 = getTangentLine( pos );  // get tangent line  		return getIntersection( l2 );     // and intersection between the two lines	}		/*! This method returns the tangent line to a Vector2f. This is the line    between the specified position and the closest point on the line to this    position.    \param pos Vector2f point with which tangent line is calculated.    \return Line line tangent to this position */	Line2<T> getTangentLine( const Vector2f &pos ) const	{  		// ay + bx + c = 0 -> y = (-b/a)x + (-c/a)  		// tangent: y = (a/b)*x + C1 -> by - ax + C2 = 0 => C2 = ax - by  		// with pos.y = y, pos.x = x  		return Line2<T>( _b, -_a, _a*pos.x() - _b*pos.y() );	}		/*! This method returns the distance between a specified position and the    closest point on the given line.    \param pos position to which distance should be calculated    \return double indicating the distance to the line. */	T getDistanceToPoint( const Vector2f &pos ) const	{  		return (getPointOnLineClosestTo( pos )-pos).Length();	}		/*! This method determines whether the projection of a point on the    current line lies between two other points ('point1' and 'point2')    that lie on the same line.    \param pos point of which projection is checked.    \param point1 first point on line    \param point2 second point on line    \return true when projection of 'pos' lies between 'pos1' and 'pos2'.*/	bool isInBetween( const Vector2f &pos, const Vector2f &pos1,const Vector2f &pos2) const	{		Vector2f posP = getPointOnLineClosestTo( pos ); // get closest point		T dist = (pos1-pos2).Length(); // get distance between 2 pos  		// if the distance from both points to the projection is smaller than this  		// dist, the pos lies in between.  		return (posP-pos1).Length() <= dist &&         		(posP-pos2).Length() <= dist;	}	  	/*! calculate associated variables in the line  	This method calculates the y coordinate given the x coordinate    \param x coordinate    \return y coordinate on this line */	T getYGivenX( T x ) const	{ 		if( _a == 0 ) 		{   			cerr << __FILE__<<__LINE__<<__FUNCTION__<<" Cannot calculate Y coordinate: "<< endl;   			return 0; 		}  		// ay + bx + c = 0 ==> ay = -(b*x + c)/a  		return -(_b*x+_c)/_a;	}	  	/*! This method calculates the x coordinate given the x coordinate    \param y coordinate    \return x coordinate on this line */	T getXGivenY( T y ) const	{ 		if( _b == 0 ) 		{   			cerr << __FILE__<<__LINE__<<__FUNCTION__<<"Cannot calculate X coordinate\n"<<endl;   			return 0; 	}  	// ay + bx + c = 0 ==> bx = -(a*y + c)/a  	return -(_a*y+_c)/_b;	}  	/*! static methods to make a line using an easier representation.  	This method creates a line given two points.    \param pos1 first point    \param pos2 second point    \return line that passes through the two specified points. */	static Line2<T> makeLineFromTwoPoints( const Vector2f &pos1, const Vector2f &pos2 )	{  		// 1*y + bx + c = 0 => y = -bx - c  		// with -b the direction coefficient (or slope)  		// and c = - y - bx  		T dA, dB, dC;  		T dTemp = pos2.x() - pos1.x(); // determine the slope  		if( fabs(dTemp) < EPSILON )  		{    		// ay + bx + c = 0 with vertical slope=> a = 0, b = 1    		dA = 0.0;    		dB = 1.0;  		}  		else  		{    		// y = (-b)x -c with -b the slope of the line    		dA = 1.0;    		dB = -(pos2.y() - pos1.y())/dTemp;  		}  		// ay + bx + c = 0 ==> c = -a*y - b*x  		dC =  - dA*pos2.y()  - dB * pos2.x();  		return Line2<T>( dA, dB, dC );	}		/*! This method creates a line given a position and an angle.    \param vec position through which the line passes    \param angle direction of the line.    \return line that goes through position 'pos' with angle 'angle'. */	static Line2<T> makeLineFromPositionAndAngle( const Vector2f &pos, AngDeg angle )	{  		// calculate point somewhat further in direction 'angle' and make  		// line from these two points.  		return makeLineFromTwoPoints( pos, pos+projection(pol2xyz(Polar(1,angle,0))));	}};typedef Line2<float> Line2f;#endif /* _GEOMETRY_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲蜜臀av乱码久久精品| 国产午夜久久久久| 午夜精品免费在线| 欧美色网站导航| 亚洲国产日韩在线一区模特| 91福利区一区二区三区| 亚洲激情男女视频| 4438x亚洲最大成人网| 日本不卡在线视频| 国产日韩亚洲欧美综合| 97成人超碰视| 视频一区二区国产| 亚洲精品在线三区| k8久久久一区二区三区| 一区二区三区蜜桃网| 欧美精品九九99久久| 精品一区二区免费在线观看| 国产喷白浆一区二区三区| 一本大道综合伊人精品热热| 日韩av中文字幕一区二区三区| 久久久九九九九| 一本到高清视频免费精品| 青青草国产精品97视觉盛宴| 国产日产欧美一区二区视频| 日本韩国一区二区三区视频| 奇米影视一区二区三区小说| 国产精品视频一二| 制服丝袜在线91| 国产成人日日夜夜| 一区二区三区在线高清| 精品久久久久香蕉网| 色综合一个色综合亚洲| 蜜乳av一区二区三区| 国产精品美女久久久久高潮| 精品视频一区三区九区| 国产一区二区伦理| 性欧美疯狂xxxxbbbb| 中文字幕国产一区二区| 制服丝袜av成人在线看| 波多野结衣精品在线| 青青草国产成人av片免费| 亚洲欧美成aⅴ人在线观看| 欧美大片拔萝卜| 日本精品视频一区二区| 国产福利一区二区三区视频| 日韩影院精彩在线| 亚洲色图视频免费播放| 精品国产凹凸成av人导航| 欧美体内she精高潮| 成人国产精品免费观看动漫| 美国三级日本三级久久99| 亚洲精品国产视频| 国产精品私房写真福利视频| 日韩欧美久久久| 欧美区一区二区三区| 91美女片黄在线| 成人综合婷婷国产精品久久| 免费人成黄页网站在线一区二区 | 精品日韩欧美一区二区| 91片黄在线观看| 国产91精品一区二区麻豆网站| 视频精品一区二区| 午夜一区二区三区视频| 亚洲色图制服丝袜| 国产精品传媒入口麻豆| 久久精品在线免费观看| 精品少妇一区二区三区在线播放 | 国产精品一二三四| 精品一区二区三区久久| 免费成人小视频| 图片区日韩欧美亚洲| 亚洲一区二区三区精品在线| 一区二区三区欧美在线观看| 亚洲精品久久7777| 亚洲一区二区在线播放相泽 | 一片黄亚洲嫩模| 亚洲美女区一区| 亚洲免费观看高清在线观看| 国产精品欧美综合在线| 国产日韩欧美亚洲| 欧美韩国日本综合| 国产三区在线成人av| 久久精品免费在线观看| 国产亚洲欧美中文| 欧美国产日韩一二三区| 中文在线资源观看网站视频免费不卡| 久久精品一级爱片| 亚洲国产精品二十页| 中文字幕亚洲欧美在线不卡| 成人欧美一区二区三区白人| 亚洲人快播电影网| 亚洲国产精品一区二区久久| 性久久久久久久久| 久久99久久99小草精品免视看| 久久99日本精品| 国产在线国偷精品免费看| 国产精品一区二区在线观看不卡 | 久久99精品久久久久婷婷| 国内精品写真在线观看| 成人永久免费视频| 91美女视频网站| 欧美高清性hdvideosex| 日韩欧美一区中文| 欧美激情一区不卡| 一区二区三区国产精品| 视频一区二区不卡| 国产经典欧美精品| av在线不卡电影| 欧美日韩成人激情| 欧美不卡激情三级在线观看| 国产欧美精品一区| 亚洲一区二区三区爽爽爽爽爽| 久久国产生活片100| 成人av电影在线观看| 欧美日韩视频在线第一区 | 一区二区日韩av| 日韩和的一区二区| 国产成人精品免费看| 欧美视频在线不卡| 久久久久久一级片| 亚洲午夜在线电影| 国产ts人妖一区二区| 欧美日韩国产精品自在自线| 久久久久久久久久久99999| 亚洲免费电影在线| 国产尤物一区二区在线| 欧美在线你懂得| 国产婷婷一区二区| 天堂久久久久va久久久久| 国产成人精品免费网站| 欧美精品vⅰdeose4hd| 中文字幕中文字幕一区二区| 日本大胆欧美人术艺术动态| 94色蜜桃网一区二区三区| 精品国一区二区三区| 亚洲国产日韩a在线播放性色| 国产a级毛片一区| 日韩欧美国产三级| 性做久久久久久免费观看 | 欧美日韩国产一级| 国产精品久久久久久福利一牛影视| 日本三级韩国三级欧美三级| 色综合中文字幕| 欧美国产禁国产网站cc| 六月丁香婷婷色狠狠久久| 欧美三级韩国三级日本一级| 国产午夜精品一区二区三区四区 | 亚洲制服丝袜在线| 成人免费毛片a| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 制服丝袜中文字幕一区| 一区二区三区免费看视频| av网站一区二区三区| 国产亚洲综合av| 精品无人码麻豆乱码1区2区 | 欧美国产日韩精品免费观看| 久久精品噜噜噜成人av农村| 91精品在线观看入口| 亚洲成人激情综合网| 日本丶国产丶欧美色综合| 中文字幕av资源一区| 国产成人aaa| 久久久综合激的五月天| 精品中文字幕一区二区小辣椒| 欧美美女一区二区三区| 一区二区成人在线| 欧美天堂亚洲电影院在线播放| 一区二区三区中文字幕精品精品| 成人免费视频caoporn| 中文字幕欧美日韩一区| 成人免费高清视频在线观看| 国产女人18毛片水真多成人如厕| 国产精品影音先锋| 国产精品久久久久久久久免费桃花 | 国产99久久精品| 欧美国产日韩在线观看| 成人夜色视频网站在线观看| 国产精品久久久久aaaa| 91丨porny丨户外露出| 亚洲免费在线观看| 91国偷自产一区二区开放时间 | 岛国精品一区二区| 国产精品久久久久久久浪潮网站| 99视频超级精品| 亚洲免费观看在线视频| 欧美熟乱第一页| 免费av成人在线| 久久亚洲一区二区三区明星换脸 | 亚洲欧美福利一区二区| 在线观看免费视频综合| 婷婷成人激情在线网| 欧美成人猛片aaaaaaa| 粉嫩av一区二区三区粉嫩| 综合久久久久久| 欧美顶级少妇做爰| 国产九色精品成人porny| 中文字幕一区二区5566日韩| 欧美在线视频日韩| 久久99久久99小草精品免视看| 中日韩免费视频中文字幕|