A loader for SVG files.
More...
#include <SVGLoader.hh>
|
static void | PathsToClosedPolylines (const std::vector< common::SVGPath > &_paths, double _tol, std::vector< std::vector< ignition::math::Vector2d > > &_closedPolys, std::vector< std::vector< ignition::math::Vector2d > > &_openPolys) |
| Reads in paths and outputs closed polylines and open polylines. More...
|
|
gazebo::common::SVGLoader::SVGLoader |
( |
unsigned int |
_samples | ) |
|
Constructor.
- Parameters
-
[in] | _samples | The number of points for cubic spline segments |
gazebo::common::SVGLoader::~SVGLoader |
( |
| ) |
|
void gazebo::common::SVGLoader::DumpPaths |
( |
const std::vector< SVGPath > & |
_paths, |
|
|
std::ostream & |
_out |
|
) |
| const |
Outputs the content of the paths to file (or console)
- Parameters
-
[in] | _paths | The paths |
[in] | _out | The output stream (can be a file or std::cout) |
bool gazebo::common::SVGLoader::Parse |
( |
const std::string & |
_filename, |
|
|
std::vector< SVGPath > & |
_paths |
|
) |
| |
Reads an SVG file and loads all the paths.
- Parameters
-
[in] | _filename | The SVG file |
[out] | _paths | Vector that receives path datai |
- Returns
- false when the file cannot be processed
static void gazebo::common::SVGLoader::PathsToClosedPolylines |
( |
const std::vector< common::SVGPath > & |
_paths, |
|
|
double |
_tol, |
|
|
std::vector< std::vector< ignition::math::Vector2d > > & |
_closedPolys, |
|
|
std::vector< std::vector< ignition::math::Vector2d > > & |
_openPolys |
|
) |
| |
|
static |
Reads in paths and outputs closed polylines and open polylines.
- Parameters
-
[in] | _paths | The input paths |
[in] | _tol | Tolerence when comparing distance between 2 points. |
[out] | _closedPolys | A vector to collect new closed loops |
[out] | _openPolys | A vector to collect non closed paths |
The documentation for this class was generated from the following file: