Skip to content

Commit

Permalink
Revert "Visibility followup for marker (#297)"
Browse files Browse the repository at this point in the history
This reverts commit a47ceb6.
  • Loading branch information
wjwwood committed Dec 21, 2018
1 parent 6f52c7a commit ae4deb7
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ 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,14 +38,6 @@
#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 @@ -62,14 +54,17 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC ArrowMarker : public MarkerBase
class 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 @@ -89,8 +84,4 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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,12 +44,13 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC LineListMarker : public LineMarkerBase
class 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,14 +37,6 @@
#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 @@ -62,12 +54,14 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC LineMarkerBase : public MarkerBase
class 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 @@ -92,8 +86,4 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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,11 +42,13 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC LineStripMarker : public LineMarkerBase
class 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,14 +42,6 @@
#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 @@ -76,29 +68,38 @@ class MarkerSelectionHandler;
typedef std::pair<std::string, int32_t> MarkerID;
typedef std::set<Ogre::MaterialPtr> S_MaterialPtr;

class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerBase
class 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 @@ -108,14 +109,19 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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 @@ -146,8 +152,4 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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 RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerFactory
class MarkerFactory
{
public:
/// Initialization of the marker factory
Expand All @@ -69,6 +69,7 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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 @@ -79,6 +80,7 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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,23 +58,29 @@ class InteractiveMarkerControl;
class MarkerBase;
typedef std::pair<std::string, int32_t> MarkerID;

class RVIZ_DEFAULT_PLUGINS_PUBLIC MarkerSelectionHandler : public
class 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,14 +39,6 @@
#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 @@ -65,14 +57,17 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC MeshResourceMarker : public MarkerBase
class 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 @@ -100,8 +95,4 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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,14 +48,17 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC PointsMarker : public MarkerBase
class 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,14 +36,6 @@
#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 @@ -56,12 +48,14 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC ShapeMarker : public MarkerBase
class 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 @@ -78,8 +72,4 @@ class RVIZ_DEFAULT_PLUGINS_PUBLIC 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,16 +51,20 @@ namespace displays
namespace markers
{

class RVIZ_DEFAULT_PLUGINS_PUBLIC TextViewFacingMarker : public MarkerBase
class 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 ae4deb7

Please sign in to comment.