MSDM
 All Classes Namespaces Files Functions Variables Typedefs Pages
Classes | Typedefs | Functions | Variables
Header.h File Reference

Header for all procedures. More...

#include <omp.h>
#include <boost/math/constants/constants.hpp>
#include "mex.h"
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Bbox_3.h>
#include <CGAL/Timer.h>
#include "enriched_polyhedron.h"

Go to the source code of this file.

Classes

struct  MSDM_options
 Structure that contains all the parameters of the MSDM estimation. More...
 

Typedefs

typedef CGAL::Simple_cartesian
< double > 
K
 
typedef K::Point_3 Point
 
typedef K::Triangle_3 Triangle
 
typedef K::Vector_3 Vector_3
 
typedef K::Plane_3 Plane
 
typedef Enriched_polyhedron< K,
Enriched_items
Polyhedron
 

Functions

bool sphere_clip_vector (const Point &O, double r, const Point &P, Vector_3 &V)
 Clip a 3D vector within a sphere. More...
 
template<typename T >
void getMatlabFieldScalar (const mxArray *MATLAB_struct, mwIndex index, const char *fieldname, T *out)
 Extract a scalar value associated with a field in a MATLAB structure. More...
 
Vector_3 normalize (const Vector_3 &v)
 Normalize a CGAL vector using according to its Euclidean norm. More...
 
double asinT (double sine)
 Returns asin or \(\pm\frac{\pi}{2}\) if outside the range.
 

Variables

static const double pi = boost::math::constants::pi<double>()
 Constant pi from boost library.
 

Detailed Description

Header for all procedures.

All necessary CGAL classes are included and typedefs are set. Routine inline functions are regrouped here.

Author
Guillaume Lavoué, Xavier Rolland-Nevière

Typedef Documentation

typedef CGAL::Simple_cartesian<double> K

CGAL inexact kernel with double.

typedef K::Plane_3 Plane

3D plane.

typedef K::Point_3 Point

CGAL 3D point.

CGAL polyhedron for MSDM computation.

typedef K::Triangle_3 Triangle

CGAL 3D triangle.

typedef K::Vector_3 Vector_3

CGAL 3D vector.

Function Documentation

template<typename T >
void getMatlabFieldScalar ( const mxArray *  MATLAB_struct,
mwIndex  index,
const char *  fieldname,
T *  out 
)
inline

Extract a scalar value associated with a field in a MATLAB structure.

Parameters
MATLAB_structPointer to an array of MATLAB structures.
indexIndex of the structure in the array.
fieldnameName of the field in the structure.
outPointer to the scalar value associated to the fieldname.
Template Parameters
TType of the scalar value.

MATLAB scalar are represented as double. The pointer to the out value can be of any scalar type, as the conversion is automatically performed. If the field does not exist in the structure, the original value of out is unmodified.

Vector_3 normalize ( const Vector_3 v)
inline

Normalize a CGAL vector using according to its Euclidean norm.

Parameters
vVector to be normalized
Returns
Vector with unit Euclidean norm
bool sphere_clip_vector ( const Point O,
double  r,
const Point P,
Vector_3 V 
)
inline

Clip a 3D vector within a sphere.