*
* <h3>User flags and data</h3>
*
- * A triangulation offers one bit per line, quad, etc for user data.
+ * A triangulation offers one bit per line, quad, etc for user flags.
* This field can be
* accessed as all other data using iterators. Normally, this user flag is
* used if an algorithm walks over all cells and needs information whether
* obviously in place here; responsibility for correctness of types etc
* lies entirely with the user of the pointer.
*
+ * @note User pointers and user indices are stored in the same
+ * place. In order to avoid unwanted conversions, Triangulation
+ * checks which one of them is in use and does not allow access to
+ * the other one, until clear_user_data() has been called.
+ *
* Just like the user flags, this field is not available for vertices,
* which does no harm since the vertices have a unique and continuous number
* unlike the structured objects lines and quads.
/**
* Set the user pointer
* to @p p.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
*/
void set_user_pointer (void *p) const;
* style cast operator to
* maintain a minimum of
* typesafety, e.g.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
* <tt>A *a=static_cast<A*>(cell->user_pointer());</tt>.
*/
void * user_pointer () const;
* recursively set the user
* pointer of all finer levels of
* the triangulation.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
*/
void recursively_set_user_pointer (void *p) const;
/**
* Set the user index
* to @p p.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
*/
void set_user_index (const unsigned int p) const;
/**
* Access the value of the user
* index.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
*/
unsigned int user_index () const;
* function to recursively set
* the user index of all finer
* levels of the triangulation.
+ *
+ * @note User pointers and user
+ * indices are mutually
+ * exclusive. Therefore, you can
+ * only use one of them, unless
+ * you call
+ * Triangulation::clear_user_data()
+ * in between.
*/
void recursively_set_user_index (const unsigned int p) const;