CGAL 6.2 - 2D and 3D Linear Geometry Kernel

Loading...
Searching...
No Matches
List of all members
CGAL::Ambient_dimension< T, K > Struct Template Reference
Reference Manual » Dimension Handling Tools

`#include <CGAL/Dimension.h>`

## Definition

template<typename T, typename K = typename Kernel_traits<T>::Kernel>
struct CGAL::Ambient_dimension< T, K >

The class `Ambient_dimension` allows to retrieve the dimension of the ambient space 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 = Ambient_dimension<Point, K>::value;
assert(dimension == 2);
CGAL::Ambient_dimension
The class Ambient_dimension allows to retrieve the dimension of the ambient space of a type T in a ke...
Definition: Dimension.h:32

See also
  `CGAL::Dimension_tag<int dim>`
  `CGAL::Dynamic_dimension_tag`
  `CGAL::Feature_dimension<T, K>`

## 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.

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

## Member Typedef Documentation

## ◆ type

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

typedef unspecified_type CGAL::Ambient_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::Ambient_dimension<T>::type`.

## Member Data Documentation

## ◆ value

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

const int CGAL::Ambient_dimension< T, K >::value
| static

The dimension value as a compile-time integral constant.

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