Skip to content

Commit

Permalink
Revert "Revert "Visibility followup for marker"" (#373)
Browse files Browse the repository at this point in the history
* Revert "Migrate scalar displays (#367)"

This reverts commit 9f3f3a6.

* Revert "Handle FindEigen3 module's differing definitions (#370)"

This reverts commit 2077b3a.

* Revert "Skip the system directories when looking for OGRE (#371)"

This reverts commit 61de77f.

* Revert "Revert "Visibility followup for marker" (#369)"

This reverts commit 712f903.
  • Loading branch information
wjwwood authored Jan 15, 2019
1 parent 9f3f3a6 commit 4217c09
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ class MapDisplay;
class Swatch
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC Swatch(
RVIZ_DEFAULT_PLUGINS_PUBLIC
Swatch(
Ogre::SceneManager * scene_manager,
Ogre::SceneNode * parent_scene_node,
size_t x, size_t y, size_t width, size_t height,
float resolution, bool draw_under);

RVIZ_DEFAULT_PLUGINS_PUBLIC ~Swatch();
RVIZ_DEFAULT_PLUGINS_PUBLIC
~Swatch();

RVIZ_DEFAULT_PLUGINS_PUBLIC
void updateAlpha(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
#include "rviz_rendering/objects/arrow.hpp"
#include "rviz_default_plugins/visibility_control.hpp"

// This is necessary because of using stl types with this display. Nevertheless, if you are
// experiencing problems when subclassing this class, please make sure ROS2 and your code were
// compiled with the same compiler and version
#ifdef _WIN32
# pragma warning(push)
# pragma warning(disable:4251)
#endif

namespace Ogre
{
class SceneNode;
Expand All @@ -54,17 +62,14 @@ namespace displays
namespace markers
{

class ArrowMarker : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC ArrowMarker : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
ArrowMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
~ArrowMarker() override = default;

RVIZ_DEFAULT_PLUGINS_PUBLIC
S_MaterialPtr getMaterials() override;

protected:
Expand All @@ -84,4 +89,8 @@ class ArrowMarker : public MarkerBase
} // namespace displays
} // namespace rviz_default_plugins

#ifdef _WIN32
# pragma warning(pop)
#endif

#endif // RVIZ_DEFAULT_PLUGINS__DISPLAYS__MARKER__MARKERS__ARROW_MARKER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ namespace displays
namespace markers
{

class LineListMarker : public LineMarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC LineListMarker : public LineMarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
LineListMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);
RVIZ_DEFAULT_PLUGINS_PUBLIC

~LineListMarker() override = default;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
#include "rviz_default_plugins/displays/marker/markers/marker_base.hpp"
#include "rviz_default_plugins/visibility_control.hpp"

// This is necessary because of using stl types with this display. Nevertheless, if you are
// experiencing problems when subclassing this class, please make sure ROS2 and your code were
// compiled with the same compiler and version
#ifdef _WIN32
# pragma warning(push)
# pragma warning(disable:4251)
#endif

namespace rviz_rendering
{
class BillboardLine;
Expand All @@ -54,14 +62,12 @@ namespace displays
namespace markers
{

class LineMarkerBase : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC LineMarkerBase : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
LineMarkerBase(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
S_MaterialPtr getMaterials() override;

protected:
Expand All @@ -86,4 +92,8 @@ class LineMarkerBase : public MarkerBase
} // namespace displays
} // namespace rviz_default_plugins

#ifdef _WIN32
# pragma warning(pop)
#endif

#endif // RVIZ_DEFAULT_PLUGINS__DISPLAYS__MARKER__MARKERS__LINE_MARKER_BASE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ namespace displays
namespace markers
{

class LineStripMarker : public LineMarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC LineStripMarker : public LineMarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
LineStripMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);
RVIZ_DEFAULT_PLUGINS_PUBLIC
~LineStripMarker() override = default;

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
#include "rviz_common/interaction/forwards.hpp"
#include "rviz_default_plugins/visibility_control.hpp"

// This is necessary because of using stl types with this display. Nevertheless, if you are
// experiencing problems when subclassing this class, please make sure ROS2 and your code were
// compiled with the same compiler and version
#ifdef _WIN32
# pragma warning(push)
# pragma warning(disable:4251)
#endif

namespace Ogre
{
class SceneNode;
Expand All @@ -68,38 +76,29 @@ class MarkerSelectionHandler;
typedef std::pair<std::string, int32_t> MarkerID;
typedef std::set<Ogre::MaterialPtr> S_MaterialPtr;

class MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerBase
{
public:
typedef visualization_msgs::msg::Marker Marker;
typedef visualization_msgs::msg::Marker::ConstSharedPtr MarkerConstSharedPtr;

RVIZ_DEFAULT_PLUGINS_PUBLIC
MarkerBase(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
virtual ~MarkerBase();

RVIZ_DEFAULT_PLUGINS_PUBLIC
void setMessage(const Marker & message);

RVIZ_DEFAULT_PLUGINS_PUBLIC
void setMessage(const MarkerConstSharedPtr & message);

RVIZ_DEFAULT_PLUGINS_PUBLIC
bool expired();

RVIZ_DEFAULT_PLUGINS_PUBLIC
void updateFrameLocked();

RVIZ_DEFAULT_PLUGINS_PUBLIC
const MarkerConstSharedPtr & getMessage() const {return message_;}

RVIZ_DEFAULT_PLUGINS_PUBLIC
MarkerID getID() {return MarkerID(message_->ns, message_->id);}

RVIZ_DEFAULT_PLUGINS_PUBLIC
std::string getStringID()
{
return message_->ns + "/" + std::to_string(message_->id);
Expand All @@ -109,19 +108,14 @@ class MarkerBase
/** @brief Associate an InteractiveObject with this MarkerBase. */
// void setInteractiveObject(InteractiveObjectWPtr object);

RVIZ_DEFAULT_PLUGINS_PUBLIC
virtual void setPosition(const Ogre::Vector3 & position);

RVIZ_DEFAULT_PLUGINS_PUBLIC
virtual void setOrientation(const Ogre::Quaternion & orientation);

RVIZ_DEFAULT_PLUGINS_PUBLIC
const Ogre::Vector3 & getPosition();

RVIZ_DEFAULT_PLUGINS_PUBLIC
const Ogre::Quaternion & getOrientation();

RVIZ_DEFAULT_PLUGINS_PUBLIC
virtual S_MaterialPtr getMaterials() {return S_MaterialPtr();}

protected:
Expand Down Expand Up @@ -152,4 +146,8 @@ class MarkerBase
} // namespace displays
} // namespace rviz_default_plugins

#ifdef _WIN32
# pragma warning(pop)
#endif

#endif // RVIZ_DEFAULT_PLUGINS__DISPLAYS__MARKER__MARKERS__MARKER_BASE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace markers
* Markers come in as visualization_msgs::msg::Marker messages.
* See the Marker message for more information.
*/
class MarkerFactory
class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerFactory
{
public:
/// Initialization of the marker factory
Expand All @@ -69,7 +69,6 @@ class MarkerFactory
* \param context Display context.
* \param parent_node Ogre parent scene node.
*/
RVIZ_DEFAULT_PLUGINS_PUBLIC
void initialize(
MarkerCommon * owner, rviz_common::DisplayContext * context,
Ogre::SceneNode * parent_node);
Expand All @@ -80,7 +79,6 @@ class MarkerFactory
* \param marker_type marker type of the marker message
* \return shared pointer of the generated marker
*/
RVIZ_DEFAULT_PLUGINS_PUBLIC
std::shared_ptr<MarkerBase>
createMarkerForType(visualization_msgs::msg::Marker::_type_type marker_type);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,23 @@ class InteractiveMarkerControl;
class MarkerBase;
typedef std::pair<std::string, int32_t> MarkerID;

class MarkerSelectionHandler : public
class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerSelectionHandler : public
rviz_common::interaction::SelectionHandler
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
MarkerSelectionHandler(
const MarkerBase * marker, MarkerID id, rviz_common::DisplayContext * context);

RVIZ_DEFAULT_PLUGINS_PUBLIC
~MarkerSelectionHandler() override;

RVIZ_DEFAULT_PLUGINS_PUBLIC
Ogre::Vector3 getPosition();

RVIZ_DEFAULT_PLUGINS_PUBLIC
Ogre::Quaternion getOrientation();

RVIZ_DEFAULT_PLUGINS_PUBLIC
void createProperties(
const rviz_common::interaction::Picked & obj,
rviz_common::properties::Property * parent_property) override;

RVIZ_DEFAULT_PLUGINS_PUBLIC
void updateProperties() override;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
#include "rviz_default_plugins/displays/marker/markers/marker_base.hpp"
#include "rviz_default_plugins/visibility_control.hpp"

// This is necessary because of using stl types with this display. Nevertheless, if you are
// experiencing problems when subclassing this class, please make sure ROS2 and your code were
// compiled with the same compiler and version
#ifdef _WIN32
# pragma warning(push)
# pragma warning(disable:4251)
#endif

namespace Ogre
{
class SceneNode;
Expand All @@ -57,17 +65,14 @@ namespace displays
namespace markers
{

class MeshResourceMarker : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC MeshResourceMarker : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
MeshResourceMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
~MeshResourceMarker() override;

RVIZ_DEFAULT_PLUGINS_PUBLIC
S_MaterialPtr getMaterials() override;

protected:
Expand Down Expand Up @@ -95,4 +100,8 @@ class MeshResourceMarker : public MarkerBase
} // namespace displays
} // namespace rviz_default_plugins

#ifdef _WIN32
# pragma warning(pop)
#endif

#endif // RVIZ_DEFAULT_PLUGINS__DISPLAYS__MARKER__MARKERS__MESH_RESOURCE_MARKER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,14 @@ namespace displays
namespace markers
{

class PointsMarker : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC PointsMarker : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
PointsMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
~PointsMarker() override;

RVIZ_DEFAULT_PLUGINS_PUBLIC
void setHighlightColor(float red, float green, float blue);

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
#include "rviz_default_plugins/displays/marker/markers/marker_base.hpp"
#include "rviz_default_plugins/visibility_control.hpp"

// This is necessary because of using stl types with this display. Nevertheless, if you are
// experiencing problems when subclassing this class, please make sure ROS2 and your code were
// compiled with the same compiler and version
#ifdef _WIN32
# pragma warning(push)
# pragma warning(disable:4251)
#endif

namespace rviz_rendering
{
class Shape;
Expand All @@ -48,14 +56,12 @@ namespace displays
namespace markers
{

class ShapeMarker : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC ShapeMarker : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
ShapeMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
S_MaterialPtr getMaterials() override;

protected:
Expand All @@ -72,4 +78,8 @@ class ShapeMarker : public MarkerBase
} // namespace displays
} // namespace rviz_default_plugins

#ifdef _WIN32
# pragma warning(pop)
#endif

#endif // RVIZ_DEFAULT_PLUGINS__DISPLAYS__MARKER__MARKERS__SHAPE_MARKER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,16 @@ namespace displays
namespace markers
{

class TextViewFacingMarker : public MarkerBase
class RVIZ_DEFAULT_PLUGINS_PUBLIC TextViewFacingMarker : public MarkerBase
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC
TextViewFacingMarker(
MarkerCommon * owner, rviz_common::DisplayContext * context, Ogre::SceneNode * parent_node);

RVIZ_DEFAULT_PLUGINS_PUBLIC
~TextViewFacingMarker() override;

RVIZ_DEFAULT_PLUGINS_PUBLIC
void setOrientation(const Ogre::Quaternion & orientation) override {(void) orientation;}

RVIZ_DEFAULT_PLUGINS_PUBLIC
S_MaterialPtr getMaterials() override;

protected:
Expand Down
Loading

0 comments on commit 4217c09

Please sign in to comment.