![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class defines a vertex as used by the TSLBoundaryEdgeList class. It differs from the standard TSLCoord since it contains a snap-tolerance (see below), and it maintains a list of edges that use each instance.
The snap-tolerance is static, and should be set up before using the TSLBoundaryEdgeList methods. Vertices which are closer than this tolerance are assumed to be identical when the edges are created. You will never have vertices in an edge list that are closer than this tolerance because they will be adjusted to be identical if they are this close.
Public Member Functions | |
bool | isOrphan () const |
TSLTMC | x () const |
TSLTMC | y () const |
const TSLCoord & | position () const |
bool | closeTo (const TSLBoundaryVertex *otherVertex, TSLTMC tolerance=0) const |
bool | closeTo (const TSLCoord &position, TSLTMC tolerance=0) const |
int | numberOfUsers () const |
const TSLBoundaryEdge * | getUser (int index) const |
Static Public Member Functions | |
static TSLTMC | snapTolerance () |
static void | snapTolerance (TSLTMC tolerance) |
bool TSLBoundaryVertex::closeTo | ( | const TSLBoundaryVertex * | otherVertex, |
TSLTMC | tolerance = 0 ) const |
Returns true if the specified vertex is within a specified distance of this vertex.
Arguments list details :
otherVertex : the specific vertex to test against.
tolerance: Maximum distance which the vertices may be apart to return true. If the vertices should be identical, pass zero. In practice, vertices that were within the snap-tolerance will have been forced to be identical already.
bool TSLBoundaryVertex::closeTo | ( | const TSLCoord & | position, |
TSLTMC | tolerance = 0 ) const |
Returns true if the specified position is within a specified distance of this vertex.
Arguments list details :
position : the position to test against.
tolerance: Maximum distance which the vertix may be from the position to return true. If the positions should be identical, pass zero. In practice, vertices that were within the snap-tolerance will have been forced to be identical already.
const TSLBoundaryEdge * TSLBoundaryVertex::getUser | ( | int | index | ) | const |
Returns read-only access to one of the edges used by this vertex.
index | Indicates which of the used edges is to be returned. Must be positive and less than numberOfUsers(). |
bool TSLBoundaryVertex::isOrphan | ( | ) | const |
This method returns true if this vertex is only used by one edge.
Arguments list details :
No parameters.
int TSLBoundaryVertex::numberOfUsers | ( | ) | const |
Returns the number of edges that are used by this vertex.
No parameters.
const TSLCoord & TSLBoundaryVertex::position | ( | ) | const |
Returns the coordinates of the vertex.
Arguments list details :
No parameters.
|
static |
Gets the snap tolerance. Vertices which are closer than this tolerance are assumed to be identical when the edges are created. You will never have vertices in an edge list that are closer than this tolerance because they will be adjusted to be identical if they are this close.
No arguments.
|
static |
Sets the snap tolerance. Vertices which are closer than this tolerance are assumed to be identical when the edges are created. You will never have vertices in an edge list that are closer than this tolerance because they will be adjusted to be identical if they are this close.
tolerance | New snap tolerance. |
TSLTMC TSLBoundaryVertex::x | ( | ) | const |
Returns the x co-ordinate of the vertex.
Arguments list details :
No parameters.
TSLTMC TSLBoundaryVertex::y | ( | ) | const |
Returns the y co-ordinate of the vertex.
Arguments list details :
No parameters.