Class PolygonFill

Class Documentation

class PolygonFill

Constructs a manual ogre object to display the polygon area as a triangle mesh.

Public Functions

PolygonFill(Ogre::SceneManager &scene_manager, Ogre::SceneNode &scene_node, const std::string &material_name)
virtual ~PolygonFill()
void reset()
void setPolygon(const polygon_msgs::msg::Polygon2D &polygon, const std_msgs::msg::ColorRGBA &color, double z_offset)

Set the object to display the area of the given polygon, in a specific color, possibly offset in z.

Parameters:
  • polygon – Polygon to display

  • color – ROS color value (includes alpha)

  • z_offset – Amount in meters to offset each two dimensional pose into the z direction

void setPolygon(const polygon_msgs::msg::ComplexPolygon2D &polygon, const std_msgs::msg::ColorRGBA &color, double z_offset)

Set the object to display the area of the given polygon, in a specific color, possibly offset in z.

Parameters:
  • polygon – Complex Polygon to display

  • color – ROS color value (includes alpha)

  • z_offset – Amount in meters to offset each two dimensional pose into the z direction

Protected Attributes

Ogre::ManualObject *manual_object_
unsigned int last_vertex_count_ = {0}
Ogre::SceneManager &scene_manager_
Ogre::SceneNode &scene_node_
std::string material_name_