mirror of https://github.com/CGAL/cgal
40 lines
1.1 KiB
TeX
40 lines
1.1 KiB
TeX
\begin{ccRefClass}{Ambient_dimension<T, K>}
|
|
|
|
\ccDefinition
|
|
The class \ccRefName\ allows to retrieve the dimension of the ambient space of
|
|
a type \ccc{T} in a kernel \ccc{K}.
|
|
|
|
\ccParameters
|
|
The parameter \ccc{K} has the default value \ccc{Kernel_traits<T>::Kernel>}.
|
|
|
|
\ccInclude{CGAL/Dimension.h}
|
|
|
|
\ccConstants
|
|
|
|
\ccVariable{static const int value;}{The dimension value as a compile-time
|
|
integral constant. It is implemented as \ccc{K::Dimension<T>::type::value}.
|
|
It exists only when the dimension is a compile-time constant.}
|
|
|
|
\ccTypes
|
|
|
|
\ccNestedType{type}{Either \ccc{Dimension_tag<dim>} if the dimension is a
|
|
compile-time constant of value \ccc{dim}, or \ccc{Dynamic_dimension_tag}
|
|
otherwise. It is implemented as \ccc{K::Ambient_dimension<T>::type}. }
|
|
|
|
\ccExample
|
|
|
|
The following retrieves the dimension of a point type.
|
|
|
|
\begin{cprog}
|
|
typedef K::Point_2 Point;
|
|
int dimension = Ambient_dimension<Point, K>::value;
|
|
assert(dimension == 2);
|
|
\end{cprog}
|
|
|
|
\ccSeeAlso
|
|
\ccRefConceptPage{CGAL::Dimension_tag<int dim>} \\
|
|
\ccRefConceptPage{CGAL::Dynamic_dimension_tag} \\
|
|
\ccRefConceptPage{CGAL::Feature_dimension<T, K>}
|
|
|
|
\end{ccRefClass}
|