Skip to content

Commit

Permalink
Rename adjacent() to adjacent_node()
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Aug 13, 2020
1 parent be38237 commit 4a6eed5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Octree/include/CGAL/Octree.h
Expand Up @@ -704,7 +704,7 @@ class Octree {
for (int direction = 0; direction < 6; ++direction) {

// Get the neighbor in this direction
Node *neighbor = node->adjacent(direction);
Node *neighbor = node->adjacent_node(direction);

// Skip if there is no neighbor in this direction
if (!neighbor)
Expand Down
16 changes: 8 additions & 8 deletions Octree/include/CGAL/Octree/Node.h
Expand Up @@ -361,19 +361,19 @@ class Node {
return !operator==(rhs);
}

Self *adjacent(Direction direction) {
return adjacent(std::bitset<3>(static_cast<int>(direction)));
Self *adjacent_node_node(Direction direction) {
return adjacent_node(std::bitset<3>(static_cast<int>(direction)));
}

const Self *adjacent(Direction direction) const {
return adjacent(std::bitset<3>(static_cast<int>(direction)));
const Self *adjacent_node_node(Direction direction) const {
return adjacent_node(std::bitset<3>(static_cast<int>(direction)));
}

Self *adjacent(std::bitset<3> direction) {
return const_cast<Self *>(const_cast<const Self *>(this)->adjacent(direction));
Self *adjacent_node_node(std::bitset<3> direction) {
return const_cast<Self *>(const_cast<const Self *>(this)->adjacent_node(direction));
}

const Self *adjacent(std::bitset<3> direction) const {
const Self *adjacent_node(std::bitset<3> direction) const {

// Direction: LEFT RIGHT DOWN UP BACK FRONT
// direction: 000 001 010 011 100 101
Expand Down Expand Up @@ -405,7 +405,7 @@ class Node {
}

// Find the parent's neighbor in that direction if it exists
auto *adjacent_node_of_parent = parent()->adjacent(direction);
auto *adjacent_node_of_parent = parent()->adjacent_node(direction);

// If the parent has no neighbor, then this node doesn't have one
if (!adjacent_node_of_parent)
Expand Down

0 comments on commit 4a6eed5

Please sign in to comment.