Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding cone primitives. #442

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions core/include/gz/msgs/convert/GeometryType.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ inline msgs::Geometry::Type ConvertGeometryType(const std::string &_str)
{
result = msgs::Geometry::CAPSULE;
}
else if (_str == "cone")
{
result = msgs::Geometry::CONE;
}
else if (_str == "cylinder")
{
result = msgs::Geometry::CYLINDER;
Expand Down Expand Up @@ -100,6 +104,11 @@ inline std::string ConvertGeometryType(const msgs::Geometry::Type _type)
result = "capsule";
break;
}
case msgs::Geometry::CONE:
{
result = "cone";
break;
}
case msgs::Geometry::CYLINDER:
{
result = "cylinder";
Expand Down
2 changes: 2 additions & 0 deletions proto/gz/msgs/particle_emitter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ message ParticleEmitter
CYLINDER = 2;
/// \brief Ellipsoid emitter.
ELLIPSOID = 3;
/// \brief Cone emitter.
CONE = 4;
}
/// \brief The emitter type.
EmitterType type = 4;
Expand Down
1 change: 1 addition & 0 deletions test/integration/Utility_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ TEST(MsgsTest, ConvertMsgsGeometryTypeToString)
CompareMsgsGeometryTypeToString(msgs::Geometry::BOX);
CompareMsgsGeometryTypeToString(msgs::Geometry::SPHERE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CAPSULE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CONE);
CompareMsgsGeometryTypeToString(msgs::Geometry::CYLINDER);
CompareMsgsGeometryTypeToString(msgs::Geometry::ELLIPSOID);
CompareMsgsGeometryTypeToString(msgs::Geometry::PLANE);
Expand Down
Loading