| |
- Node
class Node |
|
The node at each cell in the 3D matrix.
Attributes:
x node's x coordinate
y node's y coordinate
z node's z coordinate
up y axis (y+1) adjacent node, if any
down y axis (y-1) adjacent node, if any
forward z axis (z+1) adjecent node, if any
backward z axis (z-1) adjecent node, if any
left x axis (x-1) adjecent node, if any
right x axis (x+1) adjecent node, if any
wormhole wormhole node, if any
id node's ID (integer) |
|
Methods defined here:
- __init__(self, x, y, z, id)
- Initialize a matrix node.
- get_coords(self)
- Return a node's coordinates as a tuple (x,y,z).
- get_id(self)
- Return a Node's id.
- get_nav_info(self)
- Return a node's navigation information as a list of tuples.
The returned navigation tuples are (x,y,z) coordinates of the
destination node or 'None' if there is no destination.
The order of the list is
[ up, down, forward, backward, left, right, wormhole ].
- minimum_display(self)
- Display basic node information (x, y, z, and id)
- set_backward(self, node)
- Set the backward link.
- set_down(self, node)
- Set the down link.
- set_forward(self, node)
- Set the forward link.
- set_left(self, node)
- Set the left link.
- set_right(self, node)
- Set the right link.
- set_up(self, node)
- Set the up link.
- set_wormhole(self, node)
- Set the wormhole link.
| |