DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
Common.h
1
16
17
#pragma once
18
32
33
#if defined(Common_RECURSES)
34
#error Recursive header files inclusion detected in Common.h
35
#else
// defined(Common_RECURSES)
37
#define Common_RECURSES
38
39
#if !defined Common_h
40
#define Common_h
41
43
// Inclusions
44
#include <iostream>
45
#include <exception>
46
#include <boost/version.hpp>
47
#include <boost/concept_check.hpp>
48
#include <boost/static_assert.hpp>
49
#include <boost/concept/assert.hpp>
50
#include <boost/concept/requires.hpp>
51
#include <boost/iterator/iterator_concepts.hpp>
52
#include <boost/concept_archetype.hpp>
53
#include <boost/static_assert.hpp>
54
55
#ifndef NDEBUG
56
#ifdef __linux__
57
#include <fenv.h>
58
#endif
59
#endif
60
61
62
#ifdef _MSC_VER
63
#define NOMINMAX
64
#include <windows.h>
65
#ifdef M_PI
66
#undef M_PI
67
#endif
68
69
//C++ exception specification ignored except
70
//to indicate a function is not __declspec(nothrow)
71
#pragma warning(disable : 4290)
72
//C++ Perf Warning int <- bool
73
#pragma warning(disable : 4800)
74
#endif
75
76
77
#if defined( WIN32 )
78
#define _USE_MATH_DEFINES
79
#include <math.h>
80
#else
81
#include <cmath>
82
#endif
//win32
83
84
// Explicit M_PI definition if needed
85
// (issue https://github.com/DGtal-team/DGtal/issues/1204)
86
#ifndef M_PI
87
#define M_PI (3.14159265358979323846)
88
#endif
89
#ifndef M_PI_2
90
#define M_PI_2 (1.57079632679489661923)
91
#endif
92
93
94
#if defined( WIN32 )
95
#define secured_sprintf sprintf_s
96
#else
97
#include <stdio.h>
98
#define secured_sprintf snprintf
99
#endif
// defined( WIN32 )
100
101
#include "DGtal/base/Config.h"
102
#include "DGtal/base/Trace.h"
103
#include "DGtal/base/TraceWriterTerm.h"
104
#include "DGtal/base/TraceWriterFile.h"
105
#include "DGtal/base/Assert.h"
106
#include "DGtal/base/ConceptUtils.h"
107
#include "DGtal/base/BasicTypes.h"
108
#include "DGtal/base/BasicFunctors.h"
109
#include "DGtal/base/BasicArchetypes.h"
110
#include "DGtal/base/Exceptions.h"
111
113
namespace
DGtal
114
{
115
119
typedef
DGtal::uint32_t
Dimension
;
120
124
enum
Orientation
{
INSIDE
= 0,
ON
= 1,
OUTSIDE
= 2};
125
129
enum
Closest
{
ClosestFIRST
= 0,
ClosestSECOND
= 1,
ClosestBOTH
= 2};
130
131
135
inline
TraceWriterTerm
traceWriterTerm
(std::cerr);
136
inline
Trace
trace
(
traceWriterTerm
);
137
138
class
Board2D
;
139
140
template
<
class
Space,
class
KSpace>
class
Display3D
;
141
142
#if defined( DGTAL_WITH_POLYSCOPE_VIEWER )
143
template
<
class
Space,
class
KSpace>
class
PolyscopeViewer
;
144
#endif
145
151
struct
DrawableWithBoard2D
{
156
virtual
void
setStyle
(
Board2D
& )
const
{}
157
virtual
~DrawableWithBoard2D
() {}
158
};
159
}
// namespace DGtal
160
161
162
// //
164
165
#endif
// !defined Common_h
166
167
#undef Common_RECURSES
168
#endif
// else defined(Common_RECURSES)
DGtal::Board2D
Aim: This class specializes a 'Board' class so as to display DGtal objects more naturally (with <<)....
Definition
Board2D.h:71
DGtal::Display3D
Base class for viewing DGtal objects.
Definition
Display3D.h:381
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:57
DGtal::TraceWriterTerm
Implements trace prefix for color terminals.
Definition
TraceWriterTerm.h:64
DGtal::Trace
implementation of basic methods to trace out messages with indentation levels.
Definition
Trace.h:74
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::Closest
Closest
Definition
Common.h:129
DGtal::ClosestBOTH
@ ClosestBOTH
Definition
Common.h:129
DGtal::ClosestSECOND
@ ClosestSECOND
Definition
Common.h:129
DGtal::ClosestFIRST
@ ClosestFIRST
Definition
Common.h:129
DGtal::uint32_t
std::uint32_t uint32_t
unsigned 32-bit integer.
Definition
BasicTypes.h:62
DGtal::Dimension
DGtal::uint32_t Dimension
Definition
Common.h:119
DGtal::trace
Trace trace
DGtal::Orientation
Orientation
Definition
Common.h:124
DGtal::INSIDE
@ INSIDE
Definition
Common.h:124
DGtal::OUTSIDE
@ OUTSIDE
Definition
Common.h:124
DGtal::ON
@ ON
Definition
Common.h:124
DGtal::traceWriterTerm
TraceWriterTerm traceWriterTerm(std::cerr)
DGtal::DrawableWithBoard2D
Definition
Common.h:151
DGtal::DrawableWithBoard2D::setStyle
virtual void setStyle(Board2D &) const
Definition
Common.h:156
DGtal::DrawableWithBoard2D::~DrawableWithBoard2D
virtual ~DrawableWithBoard2D()
Definition
Common.h:157
src
DGtal
base
Common.h
Generated on
for DGtal by
1.18.0