DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
arithmetic
ClosedIntegerHalfPlane.h
1
17
#pragma once
18
31
#if defined(ClosedIntegerHalfPlane_RECURSES)
32
#error Recursive header files inclusion detected in ClosedIntegerHalfPlane.h
33
#else // defined(ClosedIntegerHalfPlane_RECURSES)
34
35
#define ClosedIntegerHalfPlane_RECURSES
36
37
#if !defined ClosedIntegerHalfPlane_h
38
39
#define ClosedIntegerHalfPlane_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/CSpace.h"
47
48
namespace
DGtal
49
{
50
52
// template class ClosedIntegerHalfPlane
62
template
<
typename
TSpace>
63
struct
ClosedIntegerHalfPlane
64
{
65
typedef
ClosedIntegerHalfPlane<TSpace>
Self
;
66
BOOST_CONCEPT_ASSERT
((
CSpace< TSpace >
));
67
68
typedef
TSpace
Space
;
69
typedef
typename
Space::Integer
Integer
;
70
typedef
typename
Space::Point
Point
;
71
typedef
typename
Space::Vector
Vector
;
72
73
// ----------------------- public data ------------------------------
74
public
:
75
76
Vector
N
;
//<! The normal to the half-space.
77
Integer
c
;
//<! The uppermost value N.(x,y) that is in the half-space.
78
79
protected
:
80
// mutable Integer _d; //<! used for computation (avoids reallocation when Integer is a BigInteger).
81
// ----------------------- Standard services ------------------------------
82
public
:
86
~ClosedIntegerHalfPlane
();
87
94
ClosedIntegerHalfPlane
(
const
Vector
& aN,
const
Integer
& aC );
95
107
ClosedIntegerHalfPlane
(
const
Point
& A,
const
Point
& B,
108
const
Point
& inP,
IntegerComputer<Integer>
& ic );
109
114
bool
operator()
(
const
Point
& p )
const
;
115
120
bool
isOnBoundary
(
const
Point
& p )
const
;
121
125
Vector
tangent
()
const
;
126
130
void
negate
();
131
132
// ----------------------- Interface --------------------------------------
133
public
:
134
139
void
selfDisplay
( std::ostream & out )
const
;
140
145
bool
isValid
()
const
;
146
147
// ------------------------- Protected Datas ------------------------------
148
private
:
149
// ------------------------- Private Datas --------------------------------
150
private
:
151
152
153
};
// end of class ClosedIntegerHalfPlane
154
155
162
template
<
typename
TSpace>
163
std::ostream&
164
operator<< ( std::ostream & out, const ClosedIntegerHalfPlane<TSpace> & object );
165
166
}
// namespace DGtal
167
168
170
// Includes inline functions.
171
#include "DGtal/arithmetic/ClosedIntegerHalfPlane.ih"
172
173
// //
175
176
#endif // !defined ClosedIntegerHalfPlane_h
177
178
#undef ClosedIntegerHalfPlane_RECURSES
179
#endif // else defined(ClosedIntegerHalfPlane_RECURSES)
Generated on Wed Dec 19 2012 19:10:20 for DGtal by
1.8.1.1