Skip to content

Commit

Permalink
Cone
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti committed May 12, 2024
1 parent b4a0f36 commit 8c64351
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/marker_manager/MarkerManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ gz::rendering::MarkerType MarkerManagerPrivate::MsgToType(
return gz::rendering::MarkerType::MT_BOX;
case gz::msgs::Marker::CAPSULE:
return gz::rendering::MarkerType::MT_CAPSULE;
case gz::msgs::Marker::CONE:
return gz::rendering::MarkerType::MT_CONE;
case gz::msgs::Marker::CYLINDER:
return gz::rendering::MarkerType::MT_CYLINDER;
case gz::msgs::Marker::LINE_STRIP:
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/transport_scene_manager/TransportSceneManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,13 @@ rendering::GeometryPtr TransportSceneManagerPrivate::LoadGeometry(
if (_msg.box().has_size())
scale = msgs::Convert(_msg.box().size());
}
else if (_msg.has_cone())
{
geom = this->scene->CreateCone();
scale.X() = _msg.cone().radius() * 2;
scale.Y() = scale.X();
scale.Z() = _msg.cone().length();
}
else if (_msg.has_cylinder())
{
geom = this->scene->CreateCylinder();
Expand Down

0 comments on commit 8c64351

Please sign in to comment.