2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
geometry.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <units/angle.h>
8
9#include <optional>
10#include <utility>
11
12namespace argos_lib {
13 namespace led {
20 units::degree_t FlipHorizontal(units::degree_t incidentAngle);
21
28 units::degree_t FlipVertical(units::degree_t inicidentAngle);
29
42 bool PointInBox(float corner1X, float corner1Y, float corner2X, float corner2Y, float pointX, float pointY);
43
59 std::optional<std::pair<float, float>> SegmentIntersection(
60 float s1x1, float s1y1, float s1x2, float s1y2, float s2x1, float s2y1, float s2x2, float s2y2);
61 } // namespace led
62} // namespace argos_lib
address::comp_bot::led led
Definition addresses.h:74
bool PointInBox(float corner1X, float corner1Y, float corner2X, float corner2Y, float pointX, float pointY)
Determine if a point (pointX, pointY) is within the bounds of an axis-aligned bounding box with oppos...
Definition geometry.cpp:17
units::degree_t FlipHorizontal(units::degree_t incidentAngle)
Flip an angle horizontally as though a ray bounces off a horizontal surface.
Definition geometry.cpp:9
std::optional< std::pair< float, float > > SegmentIntersection(float s1x1, float s1y1, float s1x2, float s1y2, float s2x1, float s2y1, float s2x2, float s2y2)
Finds the intersection point of two lines – [(s1x1, s1y1), (s1x2, s1y2)] and [(s2x1,...
Definition geometry.cpp:27
units::degree_t FlipVertical(units::degree_t inicidentAngle)
Flip an angle vertically as though a ray bounces off a vertical surface.
Definition geometry.cpp:13
Definition swap_controllers_command.h:12