DGtal  0.9.4beta
Public Types | Public Member Functions | Data Fields
DGtal::ClosedIntegerHalfPlane< TSpace > Struct Template Reference

#include <DGtal/arithmetic/ClosedIntegerHalfPlane.h>

Collaboration diagram for DGtal::ClosedIntegerHalfPlane< TSpace >:
[legend]

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 (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
 
Integer c
 

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.

Examples:
arithmetic/lower-integer-convex-hull.cpp.

Definition at line 63 of file ClosedIntegerHalfPlane.h.

Member Typedef Documentation

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

Definition at line 69 of file ClosedIntegerHalfPlane.h.

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

Definition at line 70 of file ClosedIntegerHalfPlane.h.

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

Definition at line 65 of file ClosedIntegerHalfPlane.h.

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

Definition at line 68 of file ClosedIntegerHalfPlane.h.

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

Definition at line 71 of file ClosedIntegerHalfPlane.h.

Constructor & Destructor Documentation

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

Destructor.

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.
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

template<typename TSpace >
DGtal::ClosedIntegerHalfPlane< TSpace >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
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 ).
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.
template<typename TSpace >
void DGtal::ClosedIntegerHalfPlane< TSpace >::negate ( )

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

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 ).
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.
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

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.

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: