Geometric skeleton of the workspace.
More...
|
vertex_iterator | find_vertex (VD _vd) |
|
|
vertex_iterator | FindNearestVertex (const mathtool::Point3d &_target) |
|
vertex_iterator | FindVertex (const VD _vertexDescriptor) |
|
adj_edge_iterator | FindEdge (const ED &_edgeDescriptor) |
|
std::vector< adj_edge_iterator > | FindInboundEdges (const VD &_vertexDescriptor) |
|
std::vector< adj_edge_iterator > | FindInboundEdges (const vertex_iterator &_vi) |
|
|
WorkspaceSkeleton | Direct (const mathtool::Point3d &_start) |
|
void | Prune (const mathtool::Point3d &_goal) |
|
void | RefineEdges (double _maxLength) |
| Divide existing edges into sizes of at most _maxLength.
|
|
void | DoubleEdges () |
|
|
void | SetGraph (GraphType &_graph) noexcept |
|
GraphType & | GetGraph () noexcept |
| Get the skeleton graph.
|
|
const GraphType & | GetGraph () const noexcept |
|
|
void | Write (const std::string &_file) |
|
void | Read (const std::string &_file) |
|
|
|
typedef stapl::sequential::directed_preds_graph< stapl::MULTIEDGES, mathtool::Point3d, std::vector< mathtool::Point3d > > | GraphType |
| Graph type is a directed multiedge graph of points and paths.
|
|
typedef GraphType::vertex_descriptor | VD |
|
typedef GraphType::edge_descriptor | ED |
|
typedef GraphType::vertex_iterator | vertex_iterator |
|
typedef GraphType::vertex_descriptor | vertex_descriptor |
|
typedef GraphType::adj_edge_iterator | adj_edge_iterator |
|
Geometric skeleton of the workspace.
◆ FindNearestVertex()
WorkspaceSkeleton::vertex_iterator WorkspaceSkeleton::FindNearestVertex |
( |
const mathtool::Point3d & |
_target | ) |
|
Helper function to find the skeleton vertex that is closest to a given workspace point.
- Parameters
-
_target | The workspace point. |
- Returns
- An iterator to the nearest skeleton vertex.
◆ FindVertex()
WorkspaceSkeleton::vertex_iterator WorkspaceSkeleton::FindVertex |
( |
const VD |
_vertexDescriptor | ) |
|
Find a vertex iterator in the skeleton by descriptor.
- Parameters
-
_vertexDescriptor | The descriptor of the vertex to search for. |
- Returns
- An iterator to the desired vertex.
◆ FindEdge()
WorkspaceSkeleton::adj_edge_iterator WorkspaceSkeleton::FindEdge |
( |
const ED & |
_edgeDescriptor | ) |
|
Find an edge iterator in the skeleton by descriptor.
- Parameters
-
_edgeDescriptor | The descriptor of the edge to search for. |
- Returns
- An iterator to the desired edge.
◆ FindInboundEdges() [1/2]
std::vector< WorkspaceSkeleton::adj_edge_iterator > WorkspaceSkeleton::FindInboundEdges |
( |
const VD & |
_vertexDescriptor | ) |
|
Find iterators to all edges inbound on a given vertex.
- Parameters
-
_vertexDescriptor | The descriptor for the vertex of interest. |
- Returns
- A set of iterators for each edge incident on _vertexDescriptor.
◆ FindInboundEdges() [2/2]
std::vector< WorkspaceSkeleton::adj_edge_iterator > WorkspaceSkeleton::FindInboundEdges |
( |
const vertex_iterator & |
_vi | ) |
|
Find iterators to all edges inbound on a given vertex.
- Parameters
-
_vi | An iterator to the vertex of interest. |
- Returns
- A set of iterators for each edge incident on _vi.
◆ Direct()
Direct the skeleton so that all edges point outwards from the vertex nearest to a given starting point.
- Parameters
-
_start | A workspace point from which the direction should eminate. |
- Returns
- A directed skeleton with flow pointing outward from _start.
◆ Prune()
void WorkspaceSkeleton::Prune |
( |
const mathtool::Point3d & |
_goal | ) |
|
Prune the skeleton by removing vertices and edges that are not reachable by back-tracking the edges from the vertex nearst to a goal point. Only makes sense after calling Direct.
- Parameters
-
_goal | A workspace goal point. |
◆ DoubleEdges()
void WorkspaceSkeleton::DoubleEdges |
( |
| ) |
|
Double up the edges so that each one has a duplicate facing the opposite direction with reversed path and same edge ID. This does not make sense with Direct or Prune. If you want to use with RefineEdges you should call that first to ensure the edge counterparts match exactly.
- Note
- This function assumes that all edges currently in the skeleton are unique and not reverse duplicates.
◆ SetGraph()
void WorkspaceSkeleton::SetGraph |
( |
GraphType & |
_graph | ) |
|
|
noexcept |
Set the skeleton graph.
- Parameters
-
_graph | the flow graph we want to set for this skeleton. |
◆ Write()
void WorkspaceSkeleton::Write |
( |
const std::string & |
_file | ) |
|
Writes the graph to a file.
- Parameters
-
_file | the output file name. |
◆ Read()
void WorkspaceSkeleton::Read |
( |
const std::string & |
_file | ) |
|
Reads the graph from a file.
- Parameters
-
_file | the output file name. |
◆ find_vertex()
WorkspaceSkeleton::vertex_iterator WorkspaceSkeleton::find_vertex |
( |
WorkspaceSkeleton::VD |
_vd | ) |
|
Find a vertex iterator in the skeleton by descriptor.
- Parameters
-
_vd | The descriptor of the vertex to search for. |
- Returns
- An iterator to the desired vertex.
The documentation for this class was generated from the following files:
- WorkspaceSkeleton.h
- WorkspaceSkeleton.cpp