CGAL 5.5.3 - Quadtrees, Octrees, and Orthtrees
CGAL::Orthtree_traits_2< GeomTraits > Struct Template Reference

#include <CGAL/Orthtree_traits_2.h>

Definition

The class Orthtree_traits_2 can be used as a template parameter of the Orthtree class.

Template Parameters
GeomTraitsmodel of Kernel.
Is Model Of:
OrthtreeTraits
See also
CGAL::Quadtree
CGAL::Orthtree_traits_3
CGAL::Orthtree_traits_d

Types

enum  Adjacency
 Two directions along each axis in Cartesian space, relative to a node. More...
 
typedef Dimension_tag< 2 > Dimension
 Dimension type.
 
typedef Bbox_2 Bbox_d
 Bounding box type.
 
typedef GeomTraits::FT FT
 Number type.
 
typedef GeomTraits::Point_2 Point_d
 Point type.
 
typedef GeomTraits::Circle_2 Sphere_d
 Sphere type.
 
typedef GeomTraits::Cartesian_const_iterator_2 Cartesian_const_iterator_d
 An iterator over the Cartesian coordinates.
 
typedef std::array< FT, Dimension::valueArray
 Array type.
 
typedef unspecified_type Construct_point_d_from_array
 Functor with an operator to construct a Point_d from an Array object.
 
typedef unspecified_type Construct_bbox_d
 Functor with an operator to construct a Bbox_d from two Array objects (coordinates of minimum and maximum points).
 

Operations

Construct_point_d_from_array construct_point_d_from_array_object () const
 Function used to construct an object of type Construct_point_d_from_array.
 
Construct_bbox_d construct_bbox_d_object () const
 Function used to construct an object of type Construct_bbox_d.
 

Member Enumeration Documentation

◆ Adjacency

template<typename GeomTraits >
enum CGAL::Orthtree_traits_2::Adjacency

Two directions along each axis in Cartesian space, relative to a node.

Directions are mapped to numbers as 2-bit integers.

The first bit indicates the axis (0 = x, 1 = y), the second bit indicates the direction along that axis (0 = -, 1 = +).

The following diagram may be a useful reference:

       3 *
         |
         |                    y+
         |                    *
0 *------+------* 1           |
         |                    |
         |                    +-----* x+
         |
         * 2

This lookup table may also be helpful:

Direction bitset number Enum
-x 00 0 LEFT
+x 01 1 RIGHT
-y 10 2 DOWN
+y 11 3 UP