DGtalTools  1.5.beta
Public Types | Public Member Functions | Data Fields
TorusShape Struct Reference

#include <estimators/volSurfaceRegularization-details/shape.h>

Public Types

typedef DGtal::Z3i::Point Point
 
typedef Eigen::Vector3d Vector
 
typedef Eigen::Matrix3d Matrix
 

Public Member Functions

 TorusShape (const Matrix &transform_, const double &radius_large_, const double &radius_small_)
 
bool operator() (const Point &point) const
 

Data Fields

Matrix transform
 
double radius_large
 
double radius_small
 

Detailed Description

Definition at line 35 of file shape.h.

Member Typedef Documentation

◆ Matrix

typedef Eigen::Matrix3d TorusShape::Matrix

Definition at line 39 of file shape.h.

◆ Point

Definition at line 37 of file shape.h.

◆ Vector

typedef Eigen::Vector3d TorusShape::Vector

Definition at line 38 of file shape.h.

Constructor & Destructor Documentation

◆ TorusShape()

TorusShape::TorusShape ( const Matrix transform_,
const double &  radius_large_,
const double &  radius_small_ 
)
inline

Definition at line 41 of file shape.h.

41  : transform(transform_), radius_large(radius_large_), radius_small(radius_small_)
42  {
43  ASSERT( radius_small < radius_large );
44  }
double radius_small
Definition: shape.h:59
Matrix transform
Definition: shape.h:57
double radius_large
Definition: shape.h:58

References radius_large, and radius_small.

Member Function Documentation

◆ operator()()

bool TorusShape::operator() ( const Point point) const
inline

Definition at line 46 of file shape.h.

47  {
48  const Vector vector_(point[0], point[1], point[2]);
49  const Vector vector = transform*vector_;
50  Vector projected = vector;
51  projected[1] = 0;
52  if (projected.norm() == 0) return false;
53  projected *= radius_large/projected.norm();
54  return (vector-projected).norm() <= radius_small;
55  }
Eigen::Vector3d Vector
Definition: shape.h:38

References radius_large, radius_small, and transform.

Field Documentation

◆ radius_large

double TorusShape::radius_large

Definition at line 58 of file shape.h.

Referenced by operator()(), and TorusShape().

◆ radius_small

double TorusShape::radius_small

Definition at line 59 of file shape.h.

Referenced by operator()(), and TorusShape().

◆ transform

Matrix TorusShape::transform

Definition at line 57 of file shape.h.

Referenced by operator()().


The documentation for this struct was generated from the following file: