scenario_simulator_v2 C++ API
plane.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef GEOMETRY__PLANE_HPP_
16 #define GEOMETRY__PLANE_HPP_
17 
18 #include <geometry_msgs/msg/point.hpp>
19 #include <geometry_msgs/msg/vector3.hpp>
20 #include <optional>
21 
22 namespace math
23 {
24 namespace geometry
25 {
26 
35 struct Plane
36 {
37  Plane(const geometry_msgs::msg::Point & point, const geometry_msgs::msg::Vector3 & normal);
38  auto offset(const geometry_msgs::msg::Point & point) const -> double;
39 
40  const geometry_msgs::msg::Vector3 normal_;
41  const double d_;
42 };
43 } // namespace geometry
44 } // namespace math
45 #endif // GEOMETRY__PLANE_HPP_
Definition: bounding_box.hpp:32
Represents a plane in 3D space, defined by a normal vector and a point on the plane.
Definition: plane.hpp:36
const double d_
Definition: plane.hpp:41
auto offset(const geometry_msgs::msg::Point &point) const -> double
Definition: plane.cpp:34
Plane(const geometry_msgs::msg::Point &point, const geometry_msgs::msg::Vector3 &normal)
Definition: plane.cpp:24
const geometry_msgs::msg::Vector3 normal_
Definition: plane.hpp:40