#include <rel_coord_orth.h>
Public Member Functions | |
rel_coord_orth (void) | |
~rel_coord_orth (void) | |
rel_coord_orth (undi_graph ug, algorithm_type alg=ORTH_SIMPLE_PT00) | |
undi_graph | get_underlying_undi_graph () const |
gdt::gdtpoint | center (gdtnode n) const |
gdt::gdtpoint | center (int id) const |
double | xcoord (gdtnode n) const |
double | xcoord (int id) const |
double | ycoord (gdtnode n) const |
double | ycoord (int id) const |
int | aux_id (int id) const |
grid_line | next_grid_line (grid_line gl, bool forward) |
gdtnode | new_node (grid_line l1, grid_line l2) |
gdtedge | new_edge (gdtnode n1, gdtnode n2) |
void | insert_node (gdtnode n, grid_line l1, grid_line l2) |
void | redistribute_coords (double gap) |
void | redistribute_coords_if_needed (double gap) |
void | redistribute_coords (int axis, double gap) |
Definition at line 50 of file rel_coord_orth.h.
rel_coord_orth::rel_coord_orth | ( | void | ) |
Void constructor.
rel_coord_orth::~rel_coord_orth | ( | void | ) |
Deletes the object.
rel_coord_orth::rel_coord_orth | ( | undi_graph | ug, | |
algorithm_type | alg = ORTH_SIMPLE_PT00 | |||
) |
Builds a drawing starting from the given undi_graph. Graph will be drawn with the following algorithm:
undi_graph rel_coord_orth::get_underlying_undi_graph | ( | ) | const |
Return the underlying graph. It makes a copy of it.
gdt::gdtpoint rel_coord_orth::center | ( | gdtnode | n | ) | const |
Return the x and y coordinates of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.
gdt::gdtpoint rel_coord_orth::center | ( | int | id | ) | const |
Return the x and y coordinates of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.
double rel_coord_orth::xcoord | ( | gdtnode | n | ) | const |
Return the x coordinate of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.
double rel_coord_orth::xcoord | ( | int | id | ) | const |
Return the x coordinate of a node.
double rel_coord_orth::ycoord | ( | gdtnode | n | ) | const |
Return the y coordinate of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.
double rel_coord_orth::ycoord | ( | int | id | ) | const |
Return the y coordinate of a node.
Return the auxiliary id of a node whose id is the given one. This value is the id of the node of the undi_graph from which this node has been generated. Rationale: a node of the undi graph may correspond to a box of the rel_coord_orth. All nodes composing the box have the same aux_id as the original node.
Definition at line 255 of file rel_coord_orth.h.
Return the next grid line in the direction specified by "forward". If gl is the last grid line return NULL.
Create a new node and insert it in the specified position.
Definition at line 286 of file rel_coord_orth.h.
References insert_node(), and undi_graph::new_node().
Create a new edge and remember the axis it is parallel to. PRECONDITION: the two input nodes must share a grid line.
Definition at line 306 of file rel_coord_orth.h.
References gdt_error, and undi_graph::new_edge().
Insert the node in the given position. Grid lines l1 and l2 may be swapped without problems.
Referenced by new_node().
void rel_coord_orth::redistribute_coords | ( | double | gap | ) | [inline] |
Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced
Definition at line 344 of file rel_coord_orth.h.
Referenced by redistribute_coords_if_needed().
void rel_coord_orth::redistribute_coords_if_needed | ( | double | gap | ) | [inline] |
Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced
Definition at line 363 of file rel_coord_orth.h.
References redistribute_coords().
void rel_coord_orth::redistribute_coords | ( | int | axis, | |
double | gap | |||
) |
Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced