OGS
CoordinateSystem.h
Go to the documentation of this file.
1
10
#pragma once
11
12
namespace
GeoLib
13
{
14
class
AABB;
15
}
16
17
namespace
MeshLib
18
{
19
class
Element;
20
24
struct
CoordinateSystemType
final
25
{
26
enum
type
27
{
28
X
= 0x01,
29
Y
= 0x02,
30
Z
= 0x04
31
};
32
};
33
39
class
CoordinateSystem
final
40
{
41
public
:
43
explicit
CoordinateSystem
(
unsigned
char
coord) :
_type
(coord) {}
44
46
explicit
CoordinateSystem
(
const
Element
& ele);
47
49
explicit
CoordinateSystem
(
const
GeoLib::AABB
& bbox);
50
52
unsigned
char
getType
()
const
{
return
_type
; }
53
55
unsigned
getDimension
()
const
56
{
57
if
(
hasZ
())
58
{
59
return
3;
60
}
61
if
(
hasY
())
62
{
63
return
2;
64
}
65
66
return
1;
67
}
68
70
bool
hasX
()
const
{
return
(
_type
&
CoordinateSystemType::type::X
) != 0; }
71
73
bool
hasY
()
const
{
return
(
_type
&
CoordinateSystemType::type::Y
) != 0; }
74
76
bool
hasZ
()
const
{
return
(
_type
&
CoordinateSystemType::type::Z
) != 0; }
77
78
private
:
79
unsigned
char
_type
;
80
};
81
82
}
// namespace MeshLib
GeoLib::AABB
Class AABB is an axis aligned bounding box around a given set of geometric points of (template) type ...
Definition
AABB.h:56
MeshLib::CoordinateSystem
Coordinate systems.
Definition
CoordinateSystem.h:40
MeshLib::CoordinateSystem::getType
unsigned char getType() const
get this coordinate type
Definition
CoordinateSystem.h:52
MeshLib::CoordinateSystem::CoordinateSystem
CoordinateSystem(unsigned char coord)
User provided coordinate system.
Definition
CoordinateSystem.h:43
MeshLib::CoordinateSystem::hasY
bool hasY() const
has Y dimension
Definition
CoordinateSystem.h:73
MeshLib::CoordinateSystem::_type
unsigned char _type
Definition
CoordinateSystem.h:79
MeshLib::CoordinateSystem::getDimension
unsigned getDimension() const
get dimension size
Definition
CoordinateSystem.h:55
MeshLib::CoordinateSystem::hasX
bool hasX() const
has X dimension
Definition
CoordinateSystem.h:70
MeshLib::CoordinateSystem::hasZ
bool hasZ() const
has z dimension
Definition
CoordinateSystem.h:76
MeshLib::Element
Definition
Element.h:34
GeoLib
Definition
ProjectData.h:36
MeshLib
Definition
ProjectData.h:41
MeshLib::CoordinateSystemType
Coordinate system type.
Definition
CoordinateSystem.h:25
MeshLib::CoordinateSystemType::type
type
Definition
CoordinateSystem.h:27
MeshLib::CoordinateSystemType::X
@ X
Definition
CoordinateSystem.h:28
MeshLib::CoordinateSystemType::Y
@ Y
Definition
CoordinateSystem.h:29
MeshLib::CoordinateSystemType::Z
@ Z
Definition
CoordinateSystem.h:30
MeshLib
CoordinateSystem.h
Generated by
1.12.0