17 #ifndef SDF_POLYLINE_HH_
18 #define SDF_POLYLINE_HH_
22 #include <gz/math/Vector2.hh>
23 #include <gz/utils/ImplPtr.hh>
31 inline namespace SDF_VERSION_NAMESPACE {
62 public:
const gz::math::Vector2d *
PointByIndex(uint64_t _index)
const;
71 public:
bool AddPoint(
const gz::math::Vector2d &_point);
79 public:
const std::vector<gz::math::Vector2d> &
Points()
const;
103 GZ_UTILS_IMPL_PTR(dataPtr)
Polyline represents a 2D path. Multiple polylines can be combined.
Definition: Polyline.hh:36
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this polyline.
double Height() const
Get the polyline's height in meters.
bool AddPoint(const gz::math::Vector2d &_point)
Add a point to the polyline.
Errors Load(ElementPtr _sdf)
Load the polyline geometry based on an element pointer.
sdf::ElementPtr ToElement(sdf::Errors &_errors) const
Create and return an SDF element filled with data from this polyline.
const gz::math::Vector2d * PointByIndex(uint64_t _index) const
Get a point by its index.
void SetHeight(const double _height)
Set the polyline's height in meters.
void ClearPoints()
Remove all points from the polyline.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
const std::vector< gz::math::Vector2d > & Points() const
Get the polyline's points.
uint64_t PointCount() const
Get the number of points.
gz::math::Vector2d * PointByIndex(uint64_t _index)
Get a point by its index.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25