DGtal  1.5.beta
DGtal::ClosedIntegerHalfPlane< TSpace > Struct Template Reference

Aim: A half-space specified by a vector N and a constant c. The half-space is the set \( \{ P \in Z^2, N.P \le c \} \). More...

#include <DGtal/arithmetic/ClosedIntegerHalfPlane.h>

Public Types

typedef ClosedIntegerHalfPlane< TSpace > Self
 
typedef TSpace Space
 
typedef Space::Integer Integer
 
typedef Space::Point Point
 
typedef Space::Vector Vector
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 ~ClosedIntegerHalfPlane ()
 
 ClosedIntegerHalfPlane ()=default
 
 ClosedIntegerHalfPlane (const Vector &aN, const Integer &aC)
 
 ClosedIntegerHalfPlane (const Point &A, const Point &B, const Point &inP, IntegerComputer< Integer > &ic)
 
bool operator() (const Point &p) const
 
bool isOnBoundary (const Point &p) const
 
Vector tangent () const
 
void negate ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Data Fields

Vector N
 The normal to the half-space. More...
 
Integer c
 The uppermost value N.(x,y) that is in the half-space. More...
 

Detailed Description

template<typename TSpace>
struct DGtal::ClosedIntegerHalfPlane< TSpace >

Aim: A half-space specified by a vector N and a constant c. The half-space is the set \( \{ P \in Z^2, N.P \le c \} \).

Description of template class 'ClosedIntegerHalfPlane'

A model of boost::DefaultConstructible, boost::CopyConstructible, boost::Assignable, concepts::CPointPredicate.

Definition at line 63 of file ClosedIntegerHalfPlane.h.

Member Typedef Documentation

◆ Integer

template<typename TSpace >
typedef Space::Integer DGtal::ClosedIntegerHalfPlane< TSpace >::Integer

Definition at line 69 of file ClosedIntegerHalfPlane.h.

◆ Point

template<typename TSpace >
typedef Space::Point DGtal::ClosedIntegerHalfPlane< TSpace >::Point

Definition at line 70 of file ClosedIntegerHalfPlane.h.

◆ Self

template<typename TSpace >
typedef ClosedIntegerHalfPlane<TSpace> DGtal::ClosedIntegerHalfPlane< TSpace >::Self

Definition at line 65 of file ClosedIntegerHalfPlane.h.

◆ Space

template<typename TSpace >
typedef TSpace DGtal::ClosedIntegerHalfPlane< TSpace >::Space

Definition at line 68 of file ClosedIntegerHalfPlane.h.

◆ Vector

template<typename TSpace >
typedef Space::Vector DGtal::ClosedIntegerHalfPlane< TSpace >::Vector

Definition at line 71 of file ClosedIntegerHalfPlane.h.

Constructor & Destructor Documentation

◆ ~ClosedIntegerHalfPlane()

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::~ClosedIntegerHalfPlane ( )
inline

Destructor.

Definition at line 85 of file ClosedIntegerHalfPlane.h.

85 {};

◆ ClosedIntegerHalfPlane() [1/3]

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::ClosedIntegerHalfPlane ( )
default

Default constructor.

◆ ClosedIntegerHalfPlane() [2/3]

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::ClosedIntegerHalfPlane ( const Vector aN,
const Integer aC 
)

Constructor from normal and constant.

Parameters
aNa vector that defines the normal direction to the half-plane.
aCthe constant that defines the bound.

◆ ClosedIntegerHalfPlane() [3/3]

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::ClosedIntegerHalfPlane ( const Point A,
const Point B,
const Point inP,
IntegerComputer< Integer > &  ic 
)

Constructor. Computes the half-space of the form N.P<=c whose supporting line passes through A and B such that the point inP satisfies the constraint.

Parameters
Aany point.
Bany point different from A.
inPany point not on the straight line (AB).
icany compatible integer computer.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )

◆ isOnBoundary()

template<typename TSpace >
bool DGtal::ClosedIntegerHalfPlane< TSpace >::isOnBoundary ( const Point p) const
Parameters
pany point in the plane.
Returns
'true' if p is on the boundary of the half-space (i.e. N.p == c ).

◆ isValid()

template<typename TSpace >
bool DGtal::ClosedIntegerHalfPlane< TSpace >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ negate()

template<typename TSpace >
void DGtal::ClosedIntegerHalfPlane< TSpace >::negate ( )

Negates the half-space. Only the boundary is common.

◆ operator()()

template<typename TSpace >
bool DGtal::ClosedIntegerHalfPlane< TSpace >::operator() ( const Point p) const
Parameters
pany point in the plane.
Returns
'true' if p is inside the half-space (i.e. N.p <= c ).

◆ selfDisplay()

template<typename TSpace >
void DGtal::ClosedIntegerHalfPlane< TSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ tangent()

template<typename TSpace >
Vector DGtal::ClosedIntegerHalfPlane< TSpace >::tangent ( ) const
Returns
the tangent vector to the half-plane boundary (ie. ( -N.y, N.x ) ).

Field Documentation

◆ c

template<typename TSpace >
Integer DGtal::ClosedIntegerHalfPlane< TSpace >::c

The uppermost value N.(x,y) that is in the half-space.

Definition at line 77 of file ClosedIntegerHalfPlane.h.

◆ N

template<typename TSpace >
Vector DGtal::ClosedIntegerHalfPlane< TSpace >::N

The normal to the half-space.

Definition at line 76 of file ClosedIntegerHalfPlane.h.


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