Polyline represents a 2D path. Multiple polylines can be combined.
More...
#include <Polyline.hh>
Polyline represents a 2D path. Multiple polylines can be combined.
◆ Polyline()
sdf::SDF_VERSION_NAMESPACE::Polyline::Polyline |
( |
| ) |
|
◆ AddPoint()
bool sdf::SDF_VERSION_NAMESPACE::Polyline::AddPoint |
( |
const gz::math::Vector2d & |
_point | ) |
|
Add a point to the polyline.
- Parameters
-
[in] | _point | 2D point to add. |
- Returns
- True for success.
◆ ClearPoints()
void sdf::SDF_VERSION_NAMESPACE::Polyline::ClearPoints |
( |
| ) |
|
Remove all points from the polyline.
◆ Element()
Get a pointer to the SDF element that was used during load.
- Returns
- SDF element pointer. The value will be nullptr if Load has not been called.
◆ Height()
double sdf::SDF_VERSION_NAMESPACE::Polyline::Height |
( |
| ) |
const |
Get the polyline's height in meters.
- Returns
- The height of the polyline in meters.
◆ Load()
Load the polyline geometry based on an element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ PointByIndex() [1/2]
gz::math::Vector2d * sdf::SDF_VERSION_NAMESPACE::Polyline::PointByIndex |
( |
uint64_t |
_index | ) |
|
Get a point by its index.
- Returns
- Mutable pointer to the point.
◆ PointByIndex() [2/2]
const gz::math::Vector2d * sdf::SDF_VERSION_NAMESPACE::Polyline::PointByIndex |
( |
uint64_t |
_index | ) |
const |
Get a point by its index.
- Returns
- Constant pointer to the point.
◆ PointCount()
uint64_t sdf::SDF_VERSION_NAMESPACE::Polyline::PointCount |
( |
| ) |
const |
Get the number of points.
- Returns
- Number of points.
◆ Points()
const std::vector< gz::math::Vector2d > & sdf::SDF_VERSION_NAMESPACE::Polyline::Points |
( |
| ) |
const |
Get the polyline's points.
Each point has 2D coordinates in meters.
- Returns
- The polyline's points.
◆ SetHeight()
void sdf::SDF_VERSION_NAMESPACE::Polyline::SetHeight |
( |
const double |
_height | ) |
|
Set the polyline's height in meters.
- Parameters
-
[in] | _height | The height of the polyline in meters. |
◆ ToElement() [1/2]
Create and return an SDF element filled with data from this polyline.
Note that parameter passing functionality is not captured with this function.
- Returns
- SDF element pointer with updated polyline values.
◆ ToElement() [2/2]
Create and return an SDF element filled with data from this polyline.
Note that parameter passing functionality is not captured with this function.
- Parameters
-
[in] | _errors | Vector of errors. |
- Returns
- SDF element pointer with updated polyline values.
The documentation for this class was generated from the following file: