15 #ifndef SIMPLE_SENSOR_SIMULATOR__SENSOR_SIMULATION__PRIMITIVES__PRIMITIVE_HPP_
16 #define SIMPLE_SENSOR_SIMULATOR__SENSOR_SIMULATION__PRIMITIVES__PRIMITIVE_HPP_
18 #include <embree4/rtcore.h>
22 #include <geometry_msgs/msg/pose.hpp>
37 std::vector<Vertex>
toVertex(
const std::vector<geometry_msgs::msg::Point> & points);
39 std::vector<geometry_msgs::msg::Point>
toPoints(
const std::vector<Vertex> & v);
56 const geometry_msgs::msg::Pose
pose;
57 unsigned int addToScene(RTCDevice device, RTCScene scene);
62 const geometry_msgs::msg::Pose & sensor_pose)
const;
65 std::optional<double>
getMax(
67 std::optional<double>
getMin(
72 std::vector<Vertex>
transform(
const geometry_msgs::msg::Pose & sensor_pose)
const;
Definition: primitive.hpp:51
std::vector< Triangle > triangles_
Definition: primitive.hpp:74
unsigned int addToScene(RTCDevice device, RTCScene scene)
Definition: primitive.cpp:115
std::vector< Vertex > getVertex() const
Definition: primitive.cpp:100
const geometry_msgs::msg::Pose pose
Definition: primitive.hpp:56
Primitive(std::string type, const geometry_msgs::msg::Pose &pose)
Definition: primitive.cpp:67
std::vector< Vertex > transform() const
Definition: primitive.cpp:82
std::vector< geometry_msgs::msg::Point > get2DConvexHull() const
Definition: primitive.cpp:110
const std::string type
Definition: primitive.hpp:55
std::vector< Vertex > vertices_
Definition: primitive.hpp:73
std::vector< Triangle > getTriangles() const
Definition: primitive.cpp:102
virtual ~Primitive()=default
std::optional< double > getMax(const math::geometry::Axis &axis) const
Definition: primitive.cpp:138
std::optional< double > getMin(const math::geometry::Axis &axis) const
Definition: primitive.cpp:146
Axis
Definition: polygon.hpp:24
Definition: constants.hpp:19
std::vector< geometry_msgs::msg::Point > toPoints(const std::vector< Vertex > &v)
Definition: primitive.cpp:56
geometry_msgs::msg::Point toPoint(const Vertex &v)
Definition: primitive.cpp:38
Vertex toVertex(const geometry_msgs::msg::Point &point)
Definition: primitive.cpp:29
std::string string
Definition: junit5.hpp:26
Definition: primitive.hpp:42
unsigned int v2
Definition: primitive.hpp:45
unsigned int v0
Definition: primitive.hpp:43
unsigned int v1
Definition: primitive.hpp:44
Definition: primitive.hpp:30
float x
Definition: primitive.hpp:31
float z
Definition: primitive.hpp:33
float y
Definition: primitive.hpp:32