MEPP2 Project
Geometry_traits.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
13 namespace FEVV {
14 
116 template< typename Mesh >
118 {
119 };
120 
121 
159 template< typename Mesh,
160  typename Kernel = typename RetrieveKernel< Mesh >::Kernel >
162 {
163 };
164 
174 template< typename MeshT, typename KernelT >
176 {
177 public:
179  typedef MeshT Mesh;
181  typedef KernelT Kernel;
182  typedef typename Kernel::Point Point;
183  typedef typename Kernel::Normal Vector;
184  typedef typename Kernel::Scalar Scalar;
185 
190  Scalar get_x(const Point &p1);
191 
196  Scalar get_y(const Point &p1);
197 
202  Scalar get_z(const Point &p1);
203 
208 
212  Scalar length2(const Vector &v);
213 
217  Scalar length(const Vector &v);
218 
222  Scalar length(const Point &p, const Point &q);
223 
228  Vector normal(const Point &p, const Point &q, const Point &r);
229 
234  Vector unit_normal(const Point &p, const Point &q, const Point &r);
235 
239  Vector add_v(const Vector &u, const Vector &v);
240 
244  Vector add_pv(const Point &p, const Vector &v);
245 
249  Vector sub_pv(const Point &p, const Vector &v);
250 
254  Vector sub_p(const Point &p, const Point &q);
255 
259  Vector sub_v(const Vector &u, const Vector &v);
260 
265 
269  Scalar dot_product(const Vector &u, const Vector &v);
270 
274  Vector cross_product(const Vector &u, const Vector &v);
275 
279  static const Point ORIGIN;
280 
284  static const Vector NULL_VECTOR;
285 };
286 
287 } // namespace FEVV
288 
FEVV::Geometry_traits_documentation_dummy::cross_product
Vector cross_product(const Vector &u, const Vector &v)
Returns the cross product of vectors u and v.
FEVV::Geometry_traits_documentation_dummy::get_x
Scalar get_x(const Point &p1)
Returns the normal of the three argument points (implemented as get_x() free function .
FEVV::Geometry_traits_documentation_dummy::sub_p
Vector sub_p(const Point &p, const Point &q)
Returns the vector from point q to point p.
FEVV::Geometry_traits_documentation_dummy::ORIGIN
static const Point ORIGIN
The point at the origin.
Definition: Geometry_traits.h:279
FEVV::Geometry_traits_documentation_dummy::Point
Kernel::Point Point
Definition: Geometry_traits.h:182
FEVV::Geometry_traits_documentation_dummy::add_pv
Vector add_pv(const Point &p, const Vector &v)
Returns the sum of point p and vector v.
FEVV::Geometry_traits_documentation_dummy::get_z
Scalar get_z(const Point &p1)
Returns the normal of the three argument points (implemented as get_z() free function .
FEVV::Geometry_traits_documentation_dummy::normal
Vector normal(const Point &p, const Point &q, const Point &r)
Returns a vector that is normal to the plane passing through points p, q and r.
FEVV::Geometry_traits
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
Definition: Geometry_traits.h:162
Point
AIFMesh::Point Point
Definition: Graph_properties_aif.h:21
FEVV::Geometry_traits_documentation_dummy::length
Scalar length(const Point &p, const Point &q)
Returns the distance between points p and q.
FEVV::Geometry_traits_documentation_dummy
Documentation (as a template dummy class) of Geometry_traits.
Definition: Geometry_traits.h:176
Kernel
CGAL::Cartesian< double > Kernel
Definition: test_complying_concepts_linear_cell_complex.cpp:22
FEVV::Geometry_traits_documentation_dummy::dot_product
Scalar dot_product(const Vector &u, const Vector &v)
Returns the dot product of vectors u and v.
FEVV::RetrieveKernel
A generic definition, that is template specialized for every supported native implementation,...
Definition: Geometry_traits.h:118
FEVV::Geometry_traits_documentation_dummy::get_y
Scalar get_y(const Point &p1)
Returns the normal of the three argument points (implemented as get_y() free function .
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Geometry_traits_documentation_dummy::Vector
Kernel::Normal Vector
Definition: Geometry_traits.h:183
FEVV::Geometry_traits_documentation_dummy::add_v
Vector add_v(const Vector &u, const Vector &v)
Returns the sum of vectors u and v.
FEVV::Geometry_traits_documentation_dummy::scalar_mult
Vector scalar_mult(const Vector &v, Scalar s)
Returns the multiplication of vector v by scalar s.
FEVV::Geometry_traits_documentation_dummy::NULL_VECTOR
static const Vector NULL_VECTOR
The zero length vector.
Definition: Geometry_traits.h:284
FEVV::Geometry_traits_documentation_dummy::sub_pv
Vector sub_pv(const Point &p, const Vector &v)
Returns the subtraction of vector v from point p.
FEVV::Geometry_traits_documentation_dummy::Scalar
Kernel::Scalar Scalar
Definition: Geometry_traits.h:184
Mesh
FEVV::DataStructures::AIF::AIFMesh Mesh
Definition: test_complying_concepts_aif.cpp:18
FEVV::Geometry_traits_documentation_dummy::Kernel
KernelT Kernel
Unused internaly but nice to embed for unforseen caller usage.
Definition: Geometry_traits.h:181
FEVV::Geometry_traits_documentation_dummy::length2
Scalar length2(const Vector &v)
Returns the square of the length of vector v.
FEVV::Geometry_traits_documentation_dummy::sub_v
Vector sub_v(const Vector &u, const Vector &v)
Returns the subtraction of vector v from vector u.
FEVV::Geometry_traits_documentation_dummy::unit_normal
Vector unit_normal(const Point &p, const Point &q, const Point &r)
Returns a unit vector that is normal to the plane passing through points p, q and r.
FEVV::DataStructures::AIF::AIFMesh
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...
Definition: AIFMesh.hpp:47
FEVV::Geometry_traits_documentation_dummy::length
Scalar length(const Vector &v)
Returns the length of vector v.
FEVV::Geometry_traits_documentation_dummy::Mesh
MeshT Mesh
Unused internaly but nice to embed for unforseen caller usage.
Definition: Geometry_traits.h:179
FEVV::Geometry_traits_documentation_dummy::normalize
Vector normalize(const Vector &v)
Returns the normalization of vector 'v'.