Mathematical methods
More...
|
| static float | Angle2D (Vector3 point1, Vector3 point2) |
| | The angle between the two points in degree More...
|
| |
| static float | Angle2D (float p1x, float p1y, float p2x, float p2y) |
| | The angle between the two points in degree More...
|
| |
| static double | Angle2D (double p1x, double p1y, double p2x, double p2y) |
| | The angle between the two points in degree More...
|
| |
| static bool | IsPointInPolygon (List< Vector2 > poly, float x, float y) |
| | Checks if a point is inside a polygon More...
|
| |
| static Vector2 | NearestPointStrict (Vector2 point, Vector2 lineStart, Vector2 lineEnd) |
| | Gets the nearest point on a line segment More...
|
| |
| static List< int > | Triangulate (List< Vector3 > points) |
| | Triangulates a polygon More...
|
| |
|
| const double | Deg2Rad = Math.PI / 180 |
| | Degrees-to-radians conversion constant. More...
|
| |
| const double | Rad2Deg = 180 / Math.PI |
| | Radians-to-degrees conversion constant. More...
|
| |
| const double | PID4 = Math.PI / 4 |
| | Math.PI / 4 More...
|
| |
◆ Angle2D() [1/3]
| static double InfinityCode.uPano.MathHelper.Angle2D |
( |
double |
p1x, |
|
|
double |
p1y, |
|
|
double |
p2x, |
|
|
double |
p2y |
|
) |
| |
|
static |
The angle between the two points in degree
- Parameters
-
| p1x | Point 1 X |
| p1y | Point 1 Y |
| p2x | Point 2 X |
| p2y | Point 2 Y |
- Returns
- Angle in degree
◆ Angle2D() [2/3]
| static float InfinityCode.uPano.MathHelper.Angle2D |
( |
float |
p1x, |
|
|
float |
p1y, |
|
|
float |
p2x, |
|
|
float |
p2y |
|
) |
| |
|
static |
The angle between the two points in degree
- Parameters
-
| p1x | Point 1 X |
| p1y | Point 1 Y |
| p2x | Point 2 X |
| p2y | Point 2 Y |
- Returns
- Angle in degree
◆ Angle2D() [3/3]
| static float InfinityCode.uPano.MathHelper.Angle2D |
( |
Vector3 |
point1, |
|
|
Vector3 |
point2 |
|
) |
| |
|
static |
The angle between the two points in degree
- Parameters
-
| point1 | Point 1 |
| point2 | Point 2 |
- Returns
- Angle in degree
◆ IsPointInPolygon()
| static bool InfinityCode.uPano.MathHelper.IsPointInPolygon |
( |
List< Vector2 > |
poly, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
|
static |
Checks if a point is inside a polygon
- Parameters
-
| poly | Polygon points list |
| x | Point X |
| y | Point Y |
- Returns
- True - point inside the polygon, false - otherwise
◆ NearestPointStrict()
| static Vector2 InfinityCode.uPano.MathHelper.NearestPointStrict |
( |
Vector2 |
point, |
|
|
Vector2 |
lineStart, |
|
|
Vector2 |
lineEnd |
|
) |
| |
|
static |
Gets the nearest point on a line segment
- Parameters
-
| point | The point for which need to find the nearest point |
| lineStart | Segment start point |
| lineEnd | Segment end point |
- Returns
- Nearest point on a line segment
◆ Triangulate()
| static List<int> InfinityCode.uPano.MathHelper.Triangulate |
( |
List< Vector3 > |
points | ) |
|
|
static |
Triangulates a polygon
- Parameters
-
- Returns
- List of vertex indices
◆ Deg2Rad
| const double InfinityCode.uPano.MathHelper.Deg2Rad = Math.PI / 180 |
|
static |
Degrees-to-radians conversion constant.
◆ PID4
| const double InfinityCode.uPano.MathHelper.PID4 = Math.PI / 4 |
|
static |
◆ Rad2Deg
| const double InfinityCode.uPano.MathHelper.Rad2Deg = 180 / Math.PI |
|
static |
Radians-to-degrees conversion constant.