Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
plane.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <string>
5
12class Plane {
13public:
22 Plane(double a, double b, double c, double d);
23
27 Plane();
28
34 double get_a() const;
35
41 double get_b() const;
42
48 double get_c() const;
49
55 double get_d() const;
56
63 Plane& operator+=(const Plane& other);
64
71 Plane& operator/=(double scalar);
78 double get_distance_to_point(float x, float y, float z) const;
79
80private:
81 double a; // Coefficient 'a' of the plane equation
82 double b; // Coefficient 'b' of the plane equation
83 double c; // Coefficient 'c' of the plane equation
84 double d; // Coefficient 'd' of the plane equation
85};
The Plane class represents a 3D plane defined by its equation ax + by + cz + d = 0.
Definition plane.hpp:12
double d
Definition plane.hpp:84
double get_b() const
Getter - Get the b component of the plane.
Definition plane.cpp:9
double get_a() const
Getter - Get the a component of the plane.
Definition plane.cpp:7
Plane & operator+=(const Plane &other)
Overloads the += operator to add another plane to this plane.
Definition plane.cpp:21
double get_c() const
Getter - Get the c component of the plane.
Definition plane.cpp:11
double get_distance_to_point(float x, float y, float z) const
Calculates the distance from a point to the plane.
Definition plane.cpp:15
Plane & operator/=(double scalar)
Overloads the /= operator to divide a plane by a scalar.
Definition plane.cpp:29
double c
Definition plane.hpp:83
Plane()
Constructs a new Plane object with default coefficients (0).
Definition plane.cpp:5
double get_d() const
Getter - Get the d component of the plane.
Definition plane.cpp:13
double a
Definition plane.hpp:81
double b
Definition plane.hpp:82