Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Cartesian math API . More...
Data Structures | |
struct | cartesian_point_2d |
struct | cartesian_line_2d |
Functions | |
bool | cartesian_line_intersection (struct cartesian_line_2d a, struct cartesian_line_2d b, struct cartesian_point_2d *intersection) |
Find the intersection point of two finite lines, if it exists. | |
bool | cartesian_point_in_circle (struct cartesian_point_2d point, struct cartesian_point_2d origin, uint32_t radius) |
Determine if a point in inside a circle. | |
bool | cartesian_point_in_polygon (struct cartesian_point_2d point, const struct cartesian_point_2d *polygon, size_t vertices) |
Determine if a point in inside an arbitrary polygon. | |
uint32_t | cartesian_distance_to_polygon_edge (struct cartesian_point_2d point, const struct cartesian_point_2d *polygon, size_t vertices) |
Determine the minimum distance to a polygons edge. | |
Cartesian math API .
uint32_t cartesian_distance_to_polygon_edge | ( | struct cartesian_point_2d | point, |
const struct cartesian_point_2d * | polygon, | ||
size_t | vertices ) |
#include <infuse/math/cartesian.h>
Determine the minimum distance to a polygons edge.
point | Point to test |
polygon | Pointer to array of points defining the polygon (Do not duplicate first point) |
vertices | Number of points in polygon array |
bool cartesian_line_intersection | ( | struct cartesian_line_2d | a, |
struct cartesian_line_2d | b, | ||
struct cartesian_point_2d * | intersection ) |
#include <infuse/math/cartesian.h>
Find the intersection point of two finite lines, if it exists.
a | First finite line |
b | Second finite line |
intersection | Storage for intersection point |
bool cartesian_point_in_circle | ( | struct cartesian_point_2d | point, |
struct cartesian_point_2d | origin, | ||
uint32_t | radius ) |
#include <infuse/math/cartesian.h>
Determine if a point in inside a circle.
point | Point to test |
origin | Centre point of circle |
radius | Radius of circle |
bool cartesian_point_in_polygon | ( | struct cartesian_point_2d | point, |
const struct cartesian_point_2d * | polygon, | ||
size_t | vertices ) |
#include <infuse/math/cartesian.h>
Determine if a point in inside an arbitrary polygon.
point | Point to test |
polygon | Pointer to array of points defining the polygon (Do not duplicate first point) |
vertices | Number of points in polygon array |