cgal/Kernel_23/doc_tex/Kernel_23_ref/Dimension.tex

32 lines
784 B
TeX

\begin{ccRefClass} {Dimension<T, K = Kernel_traits<T>::Kernel>}
\ccDefinition
The class \ccRefName\ allows to retrieve the dimension of the ambiant space of
a type. The dimension can also be the special constant
\ccc{Dynamic_dimension}, which value is \ccc{INT_MAX}, to indicate the case
where the dimension is only known at run time.
\ccInclude{CGAL/Dimension.h}
\ccConstants
\ccVariable{static const int value;}{ The dimension. It is implemented as \ccc{K::Dimension<T>::value}. }
\ccCreation
\ccCreationVariable{d}
\ccExample
The following retrieves the dimension of a point type.
\begin{cprog}
typedef Point_2<K> Point;
int dimension = Dimension<Point, K>::value;
assert(dimension == 2);
\end{cprog}
\ccSeeAlso
\ccRefConceptPage{Dimension_tag}
\end{ccRefClass}