From e2c81f2d7358c308617d8342ad3801a997ed2ea2 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 18 Jun 2024 12:27:47 -0700 Subject: [PATCH] Remove Cone shape from particle emitters (#1434) Signed-off-by: Ian Chen --- include/sdf/ParticleEmitter.hh | 5 +---- python/src/sdf/pyParticleEmitter.cc | 1 - python/test/pyParticleEmitter_TEST.py | 2 -- sdf/1.11/particle_emitter.sdf | 4 +--- sdf/1.12/particle_emitter.sdf | 4 +--- src/ParticleEmitter.cc | 5 ++--- src/ParticleEmitter_TEST.cc | 2 -- 7 files changed, 5 insertions(+), 18 deletions(-) diff --git a/include/sdf/ParticleEmitter.hh b/include/sdf/ParticleEmitter.hh index c2e09dec5..0326f34c2 100644 --- a/include/sdf/ParticleEmitter.hh +++ b/include/sdf/ParticleEmitter.hh @@ -51,10 +51,7 @@ namespace sdf CYLINDER = 2, /// \brief An ellipsoid emitter. - ELLIPSOID = 3, - - /// \brief An cone emitter. - CONE = 4, + ELLIPSOID = 3 }; /// \brief A description of a particle emitter, which can be attached diff --git a/python/src/sdf/pyParticleEmitter.cc b/python/src/sdf/pyParticleEmitter.cc index 42d70cd43..0e9873c57 100644 --- a/python/src/sdf/pyParticleEmitter.cc +++ b/python/src/sdf/pyParticleEmitter.cc @@ -154,7 +154,6 @@ void defineParticleEmitter(pybind11::object module) pybind11::enum_(particleEmitterModule, "ParticleEmitterType") .value("POINT", sdf::ParticleEmitterType::POINT) .value("BOX", sdf::ParticleEmitterType::BOX) - .value("CONE", sdf::ParticleEmitterType::CONE) .value("CYLINDER", sdf::ParticleEmitterType::CYLINDER) .value("ELLIPSOID", sdf::ParticleEmitterType::ELLIPSOID); } diff --git a/python/test/pyParticleEmitter_TEST.py b/python/test/pyParticleEmitter_TEST.py index dc44557bf..9995eb66d 100644 --- a/python/test/pyParticleEmitter_TEST.py +++ b/python/test/pyParticleEmitter_TEST.py @@ -34,8 +34,6 @@ def test_default_construction(self): self.assertTrue(emitter.set_type("box")) self.assertEqual("box", emitter.type_str()) self.assertEqual(ParticleEmitter.ParticleEmitterType.BOX, emitter.type()) - emitter.set_type(ParticleEmitter.ParticleEmitterType.CONE) - self.assertEqual("cone", emitter.type_str()) emitter.set_type(ParticleEmitter.ParticleEmitterType.CYLINDER) self.assertEqual("cylinder", emitter.type_str()) diff --git a/sdf/1.11/particle_emitter.sdf b/sdf/1.11/particle_emitter.sdf index 1be49ccc8..d6a2fdf7e 100755 --- a/sdf/1.11/particle_emitter.sdf +++ b/sdf/1.11/particle_emitter.sdf @@ -7,7 +7,7 @@ - The type of a particle emitter. One of "box", "cylinder", "cone", "ellipsoid", or "point". + The type of a particle emitter. One of "box", "cylinder", "ellipsoid", or "point". @@ -26,8 +26,6 @@ depending on the emmiter type: - point: The area is ignored. - box: The area is interpreted as width X height X depth. - - cone: The area is interpreted as the bounding box of the - cone. The cone is oriented along the Z-axis. - cylinder: The area is interpreted as the bounding box of the cylinder. The cylinder is oriented along the Z-axis. - ellipsoid: The area is interpreted as the bounding box of an diff --git a/sdf/1.12/particle_emitter.sdf b/sdf/1.12/particle_emitter.sdf index aec7b90cc..d6a2fdf7e 100755 --- a/sdf/1.12/particle_emitter.sdf +++ b/sdf/1.12/particle_emitter.sdf @@ -7,7 +7,7 @@ - The type of a particle emitter. One of "box", "cone", "cylinder", "ellipsoid", or "point". + The type of a particle emitter. One of "box", "cylinder", "ellipsoid", or "point". @@ -26,8 +26,6 @@ depending on the emmiter type: - point: The area is ignored. - box: The area is interpreted as width X height X depth. - - cone: The area is interpreted as the bounding box of the - cone. The cone is oriented along the Z-axis. - cylinder: The area is interpreted as the bounding box of the cylinder. The cylinder is oriented along the Z-axis. - ellipsoid: The area is interpreted as the bounding box of an diff --git a/src/ParticleEmitter.cc b/src/ParticleEmitter.cc index 75c7ac438..b0d07a205 100644 --- a/src/ParticleEmitter.cc +++ b/src/ParticleEmitter.cc @@ -34,13 +34,12 @@ using namespace sdf; /// Particle emitter type strings. These should match the data in /// `enum class ParticleEmitterType` located in ParticleEmitter.hh, and the size /// template parameter should match the number of elements as well. -constexpr std::array kEmitterTypeStrs = +constexpr std::array kEmitterTypeStrs = { "point", "box", "cylinder", - "ellipsoid", - "cone", + "ellipsoid" }; class sdf::ParticleEmitter::Implementation diff --git a/src/ParticleEmitter_TEST.cc b/src/ParticleEmitter_TEST.cc index a8970b9be..121cf2808 100644 --- a/src/ParticleEmitter_TEST.cc +++ b/src/ParticleEmitter_TEST.cc @@ -35,8 +35,6 @@ TEST(DOMParticleEmitter, Construction) EXPECT_TRUE(emitter.SetType("box")); EXPECT_EQ("box", emitter.TypeStr()); EXPECT_EQ(sdf::ParticleEmitterType::BOX, emitter.Type()); - emitter.SetType(sdf::ParticleEmitterType::CONE); - EXPECT_EQ("cone", emitter.TypeStr()); emitter.SetType(sdf::ParticleEmitterType::CYLINDER); EXPECT_EQ("cylinder", emitter.TypeStr());