DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
InHalfPlaneBy2x2DetComputer.h
1
16
17
#pragma once
18
30
31
#if defined(InHalfPlaneBy2x2DetComputer_RECURSES)
32
#error Recursive header files inclusion detected in InHalfPlaneBy2x2DetComputer.h
33
#else
// defined(InHalfPlaneBy2x2DetComputer_RECURSES)
35
#define InHalfPlaneBy2x2DetComputer_RECURSES
36
37
#if !defined InHalfPlaneBy2x2DetComputer_h
39
#define InHalfPlaneBy2x2DetComputer_h
40
42
// Inclusions
43
#include <array>
44
#include <iostream>
45
#include "DGtal/base/Common.h"
46
47
#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
49
50
namespace
DGtal
51
{
52
54
// template class InHalfPlaneBy2x2DetComputer
91
template
<
typename
TPo
int
,
typename
TDetComputer>
92
class
InHalfPlaneBy2x2DetComputer
93
{
94
// ----------------------- Types ------------------------------------
95
public
:
96
100
typedef
TPoint
Point
;
101
105
typedef
std::array<Point,2>
PointArray
;
109
typedef
typename
PointArray::size_type
SizeArray
;
113
static
const
SizeArray
size
= 2;
114
118
typedef
TDetComputer
DetComputer
;
119
BOOST_CONCEPT_ASSERT
((
C2x2DetComputer<DetComputer>
));
120
127
typedef
typename
TDetComputer::ArgumentInteger
ArgumentInteger
;
128
132
typedef
typename
TDetComputer::ResultInteger
Value
;
133
134
// ----------------------- Standard services ------------------------------
135
public
:
136
137
138
// ----------------------- Interface --------------------------------------
139
public
:
140
146
void
init
(
const
Point
& aP,
const
Point
& aQ);
147
152
void
init
(
const
PointArray
& aA);
153
164
Value
operator()
(
const
Point
& aR)
const
;
165
170
void
selfDisplay
( std::ostream & out )
const
;
171
176
bool
isValid
()
const
;
177
178
// ------------------------- Protected Data ------------------------------
179
private
:
180
// ------------------------- Private Data --------------------------------
181
private
:
182
183
184
// ------------------------- Internals ------------------------------------
185
private
:
189
ArgumentInteger
myA
,
myB
;
193
mutable
DetComputer
myDetComputer
;
194
195
};
// end of class InHalfPlaneBy2x2DetComputer
196
197
204
template
<
typename
TPo
int
,
typename
TDetComputer>
205
std::ostream&
206
operator<<
( std::ostream & out,
const
InHalfPlaneBy2x2DetComputer<TPoint, TDetComputer>
&
object
);
207
208
}
// namespace DGtal
209
210
212
// Includes inline functions.
213
#include "DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.ih"
214
215
// //
217
218
#endif
// !defined InHalfPlaneBy2x2DetComputer_h
219
220
#undef InHalfPlaneBy2x2DetComputer_RECURSES
221
#endif
// else defined(InHalfPlaneBy2x2DetComputer_RECURSES)
DGtal::InHalfPlaneBy2x2DetComputer
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation o...
Definition
InHalfPlaneBy2x2DetComputer.h:93
DGtal::InHalfPlaneBy2x2DetComputer::operator()
Value operator()(const Point &aR) const
DGtal::InHalfPlaneBy2x2DetComputer::PointArray
std::array< Point, 2 > PointArray
Definition
InHalfPlaneBy2x2DetComputer.h:105
DGtal::InHalfPlaneBy2x2DetComputer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::InHalfPlaneBy2x2DetComputer::myA
ArgumentInteger myA
Definition
InHalfPlaneBy2x2DetComputer.h:189
DGtal::InHalfPlaneBy2x2DetComputer::myB
ArgumentInteger myB
Definition
InHalfPlaneBy2x2DetComputer.h:189
DGtal::InHalfPlaneBy2x2DetComputer::init
void init(const Point &aP, const Point &aQ)
DGtal::InHalfPlaneBy2x2DetComputer::Value
TDetComputer::ResultInteger Value
Definition
InHalfPlaneBy2x2DetComputer.h:132
DGtal::InHalfPlaneBy2x2DetComputer::ArgumentInteger
TDetComputer::ArgumentInteger ArgumentInteger
Definition
InHalfPlaneBy2x2DetComputer.h:127
DGtal::InHalfPlaneBy2x2DetComputer::size
static const SizeArray size
Definition
InHalfPlaneBy2x2DetComputer.h:113
DGtal::InHalfPlaneBy2x2DetComputer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((C2x2DetComputer< DetComputer >))
DGtal::InHalfPlaneBy2x2DetComputer::DetComputer
TDetComputer DetComputer
Definition
InHalfPlaneBy2x2DetComputer.h:118
DGtal::InHalfPlaneBy2x2DetComputer::SizeArray
PointArray::size_type SizeArray
Definition
InHalfPlaneBy2x2DetComputer.h:109
DGtal::InHalfPlaneBy2x2DetComputer::myDetComputer
DetComputer myDetComputer
Definition
InHalfPlaneBy2x2DetComputer.h:193
DGtal::InHalfPlaneBy2x2DetComputer::init
void init(const PointArray &aA)
DGtal::InHalfPlaneBy2x2DetComputer::isValid
bool isValid() const
DGtal::InHalfPlaneBy2x2DetComputer::Point
TPoint Point
Definition
InHalfPlaneBy2x2DetComputer.h:100
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::C2x2DetComputer
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...
Definition
C2x2DetComputer.h:108
src
DGtal
geometry
tools
determinant
InHalfPlaneBy2x2DetComputer.h
Generated on
for DGtal by
1.18.0