Method | Description | |
---|---|---|
AngleBetweenLines ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : double |
两条线之间的角度
|
|
AngleOfLine ( Vector2 start, Vector2 end ) : double |
获取一条线以起始点为圆心的顺时针旋转角度
|
|
CubicBezierEvaluate ( float p0, float p1, float p2, float p3, float t ) : float | ||
DistanceSqr ( Vector2 one, Vector2 two ) : float |
两点距离的平方, [用这个比较长度效率高]
|
|
GeneralBezierEvaluate ( Vector3 points, float t ) : Vector3 | ||
LineIntersectCircle ( Vector2 start, Vector2 end, Vector2 circlePoint, float circleRadius ) : bool |
判断直线和圆是否相交.
|
|
LineIntersectRect ( Vector2 start, Vector2 end, Rect rect ) : bool |
判断直线是否和矩形相交
|
|
LinearBezierEvaluate ( Vector3 p0, Vector3 p1, float t ) : Vector3 | ||
LinearBezierEvaluate ( float p0, float p1, float t ) : float | ||
PointToLineDistanceSqr ( Vector2 point, Vector2 start, Vector2 end ) : float |
计算点到直线的距离的平方.
|
|
PointWithAngle ( Vector2 point, float distance, float angle ) : Vector2 |
从原点向一个给定角度移动给定的距离
|
|
QuadBezierEvaluate ( float p0, float p1, float p2, float t ) : float | ||
RadianToDegree ( double radian ) : double |
弧度转角度
|
|
lineIntersectLine ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : bool |
判断两条直线是否相交.
|
public static AngleBetweenLines ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : double | ||
start1 | Vector2 | |
end1 | Vector2 | |
start2 | Vector2 | |
end2 | Vector2 | |
return | double |
public static AngleOfLine ( Vector2 start, Vector2 end ) : double | ||
start | Vector2 | |
end | Vector2 | |
return | double |
public static CubicBezierEvaluate ( float p0, float p1, float p2, float p3, float t ) : float | ||
p0 | float | |
p1 | float | |
p2 | float | |
p3 | float | |
t | float | |
return | float |
public static DistanceSqr ( Vector2 one, Vector2 two ) : float | ||
one | Vector2 | |
two | Vector2 | |
return | float |
public static GeneralBezierEvaluate ( Vector3 points, float t ) : Vector3 | ||
points | Vector3 | |
t | float | |
return | Vector3 |
public static LineIntersectCircle ( Vector2 start, Vector2 end, Vector2 circlePoint, float circleRadius ) : bool | ||
start | Vector2 | |
end | Vector2 | |
circlePoint | Vector2 | |
circleRadius | float | |
return | bool |
public static LineIntersectRect ( Vector2 start, Vector2 end, Rect rect ) : bool | ||
start | Vector2 | |
end | Vector2 | |
rect | Rect | |
return | bool |
public static LinearBezierEvaluate ( Vector3 p0, Vector3 p1, float t ) : Vector3 | ||
p0 | Vector3 | |
p1 | Vector3 | |
t | float | |
return | Vector3 |
public static LinearBezierEvaluate ( float p0, float p1, float t ) : float | ||
p0 | float | |
p1 | float | |
t | float | |
return | float |
public static PointToLineDistanceSqr ( Vector2 point, Vector2 start, Vector2 end ) : float | ||
point | Vector2 | |
start | Vector2 | |
end | Vector2 | |
return | float |
public static PointWithAngle ( Vector2 point, float distance, float angle ) : Vector2 | ||
point | Vector2 | |
distance | float | |
angle | float | |
return | Vector2 |
public static QuadBezierEvaluate ( float p0, float p1, float p2, float t ) : float | ||
p0 | float | |
p1 | float | |
p2 | float | |
t | float | |
return | float |
public static RadianToDegree ( double radian ) : double | ||
radian | double | |
return | double |
public static lineIntersectLine ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : bool | ||
start1 | Vector2 | |
end1 | Vector2 | |
start2 | Vector2 | |
end2 | Vector2 | |
return | bool |