Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8e11461
initial commit with the basic version of the new Weights package
danston Apr 22, 2021
8429bf4
updated triangulation 2 projection traits to internal traits until th…
danston Apr 23, 2021
2100010
flattening is moved to internal
danston May 25, 2021
b21ade8
review second round + fixed errors
danston May 25, 2021
2e010c2
changed internal projection traits to the tri one
danston May 25, 2021
1ac8599
removed internal projection traits and examples changed to projection…
danston May 25, 2021
7022e47
added simple authalic weight test
danston May 25, 2021
eb15457
added analytic, region, and barycentric weight tests
danston May 26, 2021
8145388
extended and updated tests for regions and wachspress
danston May 27, 2021
a74a0df
finished tests for all other weights
danston May 27, 2021
f8dd213
updated tests
danston May 27, 2021
3d11a46
updated docs with edge cases
danston May 27, 2021
00f9d9b
added barycentric properties test to analytic weights
danston May 28, 2021
91c8a92
more general tangent weights (works both with pos and neg cases) + pr…
danston May 28, 2021
527153a
Merge remote-tracking branch 'origin/Kernel_23-add_centroid_2_and_det…
danston May 28, 2021
424d0b2
finished projected traits test
danston May 28, 2021
001da6c
Merge remote-tracking branch 'origin/master' into Weights-new_package…
danston May 28, 2021
5ce7734
Merge remote-tracking branch 'origin/Kernel_23-add_centroid_2_and_det…
danston May 28, 2021
815b8e3
better explained coplanarity case
danston May 31, 2021
f0563a7
improved user manual
danston May 31, 2021
c4ab20e
better user manual
danston May 31, 2021
f63e34f
removed all notes about flattening from both user and ref manuals
danston May 31, 2021
fe3317c
mael's review
danston Jun 1, 2021
ea612fa
fixed tools
danston Jun 3, 2021
7f96109
updated tools
danston Jun 3, 2021
3d4c967
added uniform weight fairing to tools + removed duplicate uniform wei…
danston Jun 4, 2021
2638c59
explicit call to weights in tools
danston Jun 4, 2021
01171f9
using different version of the voronoi area in the tools
danston Jun 7, 2021
665e615
fixed call to the area 3
danston Jun 7, 2021
e681e3c
using global functions in tools
danston Jun 7, 2021
3570601
moving internal weights from tools to the correct headers
danston Jun 9, 2021
55ea347
making query point type equal to point range value type
danston Jun 9, 2021
20baa77
fixed license
danston Jun 11, 2021
c5c9d6c
fixed doxygen warnings for deprecated weights
danston Jun 11, 2021
ce382b4
fixed typos
danston Jun 11, 2021
2467aec
updated Weights license
danston Jun 14, 2021
ca661e3
added weights concept dependency to Kernel_23
danston Jun 24, 2021
ab9a80c
renamed depr weights header
danston Jun 24, 2021
a25a583
secure -> clamped
danston Jun 24, 2021
1d5ef23
removed some conversions from double to FT in examples
danston Jun 25, 2021
b66b71a
added doxygen comment to Weights.h
danston Jun 25, 2021
9ccbea0
undocumenting utils with tangent and cotangent
danston Jun 25, 2021
649db1f
added missing includes in the docs + convenience header
danston Jun 28, 2021
5126f83
missing projection traits as model of analytic weights
danston Jun 28, 2021
9fe1c94
removed tmp modifs
danston Jun 29, 2021
e012dad
added a comment to internal functions
danston Jun 29, 2021
80cd341
better description of the analytic weight traits
danston Jun 29, 2021
686309a
using double numbers in examples
danston Jun 29, 2021
ebef1cc
better explained edge cases
danston Jun 30, 2021
22ff1f3
removed todo
danston Jun 30, 2021
350234a
skipping useless headers in the convenience header
danston Jun 30, 2021
454072e
updated changes.md
danston Jul 1, 2021
b31174b
Merge remote-tracking branch 'origin/Kernel_23-add_centroid_2_and_det…
danston Jul 27, 2021
59e9cf0
Merge remote-tracking branch 'origin/Kernel_23-add_centroid_2_and_det…
danston Jul 27, 2021
551c314
fixed cmakelists
danston Aug 4, 2021
50157a7
Merge remote-tracking branch 'origin/master' into Weights-new_package…
danston Aug 4, 2021
2bbf87f
make eigen quiet
danston Aug 4, 2021
fb9b973
added missing components
danston Aug 4, 2021
bb1f492
use correct version of eigen
danston Aug 4, 2021
f0c0c90
fix doc errors
sloriot Aug 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Installation/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ Release History

Release date: December 2021

### [Weights](https://doc.cgal.org/5.4/Manual/packages.html#PkgWeights) (new package)

- This package provides a simple and unified interface to different types of weights.
In particular, it groups all weights into three category: analytic weights including
all basic weights which can be computed analytically for a query point with respect to its
local neighbors in 2D and 3D; barycentric weights including all weights which can be computed
for a query point with respect to the vertices of a planar polygon; and weighting regions
including all weights which are used to balance other weights.

### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/5.4/Manual/packages.html#PkgKernel23)

- Added `construct_centroid_2_object()` and `compute_determinant_2_object()` in `Projection_traits_xy_3`, `Projection_traits_xz_3`,
Expand Down
54 changes: 54 additions & 0 deletions Installation/include/CGAL/license/Weights.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) 2016 GeometryFactory SARL (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Andreas Fabri
//
// Warning: this file is generated, see include/CGAL/licence/README.md

#ifndef CGAL_LICENSE_WEIGHTS_H
#define CGAL_LICENSE_WEIGHTS_H

#include <CGAL/config.h>
#include <CGAL/license.h>

#ifdef CGAL_WEIGHTS_COMMERCIAL_LICENSE

# if CGAL_WEIGHTS_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE

# if defined(CGAL_LICENSE_WARNING)

CGAL_pragma_warning("Your commercial license for CGAL does not cover "
"this release of the Weights package.")
# endif

# ifdef CGAL_LICENSE_ERROR
# error "Your commercial license for CGAL does not cover this release \
of the Weights package. \
You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR

# endif // CGAL_WEIGHTS_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE

#else // no CGAL_WEIGHTS_COMMERCIAL_LICENSE

# if defined(CGAL_LICENSE_WARNING)
CGAL_pragma_warning("\nThe macro CGAL_WEIGHTS_COMMERCIAL_LICENSE is not defined."
"\nYou use the CGAL Weights package under "
"the terms of the GPLv3+.")
# endif // CGAL_LICENSE_WARNING

# ifdef CGAL_LICENSE_ERROR
# error "The macro CGAL_WEIGHTS_COMMERCIAL_LICENSE is not defined.\
You use the CGAL Weights package under the terms of \
the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR."
# endif // CGAL_LICENSE_ERROR

#endif // no CGAL_WEIGHTS_COMMERCIAL_LICENSE

#endif // CGAL_LICENSE_WEIGHTS_H
1 change: 1 addition & 0 deletions Installation/include/CGAL/license/gpl_package_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ Triangulation dD Triangulations
Visibility_2 2D Visibility Computation
Voronoi_diagram_2 2D Voronoi Diagram Adaptor
Tetrahedral_remeshing Tetrahedral Remeshing
Weights Weights
1 change: 1 addition & 0 deletions Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and predicates defined in `K`.
\cgalModels `ConstrainedTriangulationTraits_2`
\cgalModels `ConvexHullTraits_2`
\cgalModels `DelaunayMeshTraits_2`
\cgalModels `AnalyticWeightTraits_2`

*/
template< typename K >
Expand Down
1 change: 1 addition & 0 deletions Kernel_23/doc/Kernel_23/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Circular_kernel_2
Circular_kernel_3
STL_Extension
Polyhedron
Weights
202 changes: 202 additions & 0 deletions Weights/doc/Weights/Concepts/AnalyticWeightTraits_2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
/*!
\ingroup PkgWeightsRefConcepts
\cgalConcept

A concept that describes the set of requirements of classes used in the computation
of analytic weights in 2D.

\cgalHasModel
- All models of `Kernel`
- `CGAL::Projection_traits_xy_3<K>`
- `CGAL::Projection_traits_yz_3<K>`
- `CGAL::Projection_traits_xz_3<K>`
*/
class AnalyticWeightTraits_2 {

public:

/// \name Types
/// @{

/*!
A model of `FieldNumberType`.
*/
typedef unspecified_type FT;

/*!
`CGAL::Comparison_result` or `Uncertain<CGAL::Comparison_result>`.
*/
typedef unspecified_type Comparison_result;

/*!
`CGAL::Orientation` or `Uncertain<CGAL::Orientation>`.
*/
typedef unspecified_type Orientation;

/// @}

/// \name Geometric Objects
/// @{

/*!
2D point type.
*/
typedef unspecified_type Point_2;

/*!
2D vector type.
*/
typedef unspecified_type Vector_2;

/// @}

/// \name Constructions
/// @{

/*!
A construction object that must provide the function operator:

`FT operator()(const Point_2& p, const Point_2& q, const Point_2& r)`

that returns the signed area of the triangle defined by the points `p`, `q`, and `r`.
*/
typedef unspecified_type Compute_area_2;

/*!
A construction object that must provide the function operator:

`FT operator()(const Point_2& p, const Point_2& q)`

that returns the squared Euclidean distance between the points `p` and `q`.
*/
typedef unspecified_type Compute_squared_distance_2;

/*!
A construction object that must provide the function operator:

`FT operator()(const Vector_2& v)`

that returns the squared length of the vector `v`.
*/
typedef unspecified_type Compute_squared_length_2;

/*!
A construction object that must provide the function operator:

`FT operator()(const Vector_2& v, const Vector_2& w)`

that returns the scalar product of the vectors `v` and `w`.
*/
typedef unspecified_type Compute_scalar_product_2;

/*!
A construction object that must provide the function operator:

`FT operator()(const Vector_2& v, const Vector_2& w)`

that returns the determinant of the vectors `v` and `w`.
*/
typedef unspecified_type Compute_determinant_2;

/*!
A construction object that must provide the function operator:

`%Point_2 operator()(const Point_2& p, const Point_2& q, const Point_2& r)`

that returns the center of the circle passing through the points `p`, `q`, and `r`.

\pre The points `p`, `q`, and `r` are not collinear.
*/
typedef unspecified_type Construct_circumcenter_2;

/*!
A construction object that must provide the function operator:

`%Vector_2 operator()(const Point_2& p, const Point_2& q)`

that returns the vector through the points `p` and `q`.
*/
typedef unspecified_type Construct_vector_2;

/*!
A construction object that must provide the function operator:

`%Point_2 operator()(const Point_2& p, const Point_2& q)`

that returns the midpoint between the points `p` and `q`.
*/
typedef unspecified_type Construct_midpoint_2;

/*!
A construction object that must provide the function operator:

`%Point_2 operator()(const Point_2& p, const Point_2& q, const Point_2& r)`

that returns the centroid of the points `p`, `q`, and `r`.
*/
typedef unspecified_type Construct_centroid_2;

/// @}

/// \name Predicates
/// @{

/*!
A predicate object that must provide the function operator:

`bool operator()(const Point_2& p, const Point_2& q)`

that returns `true` if `p = q` and `false` otherwise.
*/
typedef unspecified_type Equal_2;

/*!
A predicate object that must provide the function operator:

`bool operator()(const Point_2& p, const Point_2& q, const Point_2& r)`

that returns `true` if the points `p`, `q`, and `r` are collinear and `false` otherwise.
*/
typedef unspecified_type Collinear_2;

/*!
A predicate object that must provide the function operator:

`bool operator()(const Point_2& p, const Point_2& q)`

that returns `true` iff the x-coordinate of `p` is smaller than the x-coordinate of `q` or
if they are the same and the y-coordinate of `p` is smaller than the y-coordinate of `q`.
*/
typedef unspecified_type Less_xy_2;

/*!
A predicate object that must provide the function operator:

`Comparison_result operator()(const Point_2& p, const Point_2& q)`

that compares the %Cartesian x-coordinates of the points `p` and `q`.
*/
typedef unspecified_type Compare_x_2;

/*!
A predicate object that must provide the function operator:

`Comparison_result operator()(const Point_2& p, const Point_2& q)`

that compares the %Cartesian y-coordinates of the points `p` and `q`.
*/
typedef unspecified_type Compare_y_2;

/*!
A predicate object that must provide the function operator:

`Orientation operator()(const Point_2& p, const Point_2& q, const Point_2& r)`

that returns `CGAL::LEFT_TURN` if `r` lies to the left of the oriented line `l` defined by `p` and `q`,
returns `CGAL::RIGHT_TURN` if `r` lies to the right of `l`, and returns `CGAL::COLLINEAR` if `r` lies on `l`.
*/
typedef unspecified_type Orientation_2;

/// @}

};
Loading