CGAL 4.7 - 2D and 3D Linear Geometry Kernel: CGAL::Feature_dimension< T, K > Class Template Reference

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.7 - 2D and 3D Linear Geometry Kernel

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Feature_dimension< T, K > Class Template Reference
Dimension Handling Tools

`#include <CGAL/Dimension.h>`

## Definition

### template<typename T, typename K = typename Kernel_traits<T>::Kernel>
class CGAL::Feature_dimension< T, K >

The class `Feature_dimension` allows to retrieve the geometric dimension of a type `T` in a kernel `K`.

Parameters

The parameter `K` has the default value `Kernel_traits<T>Kernel`.

Example

The following retrieves the dimension of a point type.

typedef K::Point_2 Point;
int dimension = Feature_dimension<Point, K>::value;
assert(dimension == 0);

See Also
  `CGAL::Dimension_tag<int dim>`
  `CGAL::Dynamic_dimension_tag`
  `CGAL::Ambient_dimension<T, K>`

## Constants

static const int | value
| The dimension value as a compile-time integral constant. More...

## Types

typedef unspecified_type | type
| Either `Dimension_tag<dim>` if the dimension is a compile-time constant of value `dim`, or `Dynamic_dimension_tag` otherwise. More...

## Member Typedef Documentation

template<typename T , typename K = typename Kernel_traits<T>::Kernel>

typedef unspecified_type CGAL::Feature_dimension< T, K >::type

Either `Dimension_tag<dim>` if the dimension is a compile-time constant of value `dim`, or `Dynamic_dimension_tag` otherwise.

It is implemented as `K::Feature_dimension<T>::type`.

## Member Data Documentation

template<typename T , typename K = typename Kernel_traits<T>::Kernel>

const int CGAL::Feature_dimension< T, K >::value

static

The dimension value as a compile-time integral constant.

It is implemented as `K::Feature_dimension<T>::type::value`. It exists only when the dimension is a compile-time constant.