bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
rounded_rectangle.h
Go to the documentation of this file.
1#ifndef BITSIM_TRAJECTORY_ROUNDED_RECTANGLE_H
2#define BITSIM_TRAJECTORY_ROUNDED_RECTANGLE_H
3
5
6namespace bitsim
7{
8namespace trajectory
9{
10
20{
21 public:
28
29 real_t half_length() const noexcept { return half_length_; }
30 real_t half_width() const noexcept { return half_width_; }
31 real_t corner_radius() const noexcept { return corner_radius_; }
32
36 real_t distance(real_t x, real_t y) const;
37
43
47 real_t perimeter() const;
48
49 private:
50 real_t half_length_;
51 real_t half_width_;
52 real_t corner_radius_;
53};
54
55} // namespace trajectory
56} // namespace bitsim
57
58#endif // BITSIM_TRAJECTORY_ROUNDED_RECTANGLE_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
RoundedRectangle(real_t half_length, real_t half_width, real_t corner_radius)
Definition rounded_rectangle.cpp:13
real_t signed_distance(real_t x, real_t y) const
The signed distance from (x, y) to the track [m]: negative inside the shape, positive outside....
Definition rounded_rectangle.cpp:24
real_t distance(real_t x, real_t y) const
The distance from (x, y) to the track [m], from inside or outside.
Definition rounded_rectangle.cpp:35
real_t half_width() const noexcept
Definition rounded_rectangle.h:30
real_t perimeter() const
The length of the track [m].
Definition rounded_rectangle.cpp:40
real_t half_length() const noexcept
Definition rounded_rectangle.h:29
real_t corner_radius() const noexcept
Definition rounded_rectangle.h:31
Definition line_segment_link.h:11
Definition dc_motor_backend_base.h:9
double real_t
real_t
Definition bitsim_types.h:20