OpenLexocad
27.1
Ax2d.h
Go to the documentation of this file.
1
//
3
// Copyright(C) 2013-2016 OpenCascade [www.opencascade.org]
4
//
5
// This library is free software; you can redistribute it and / or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation; either
8
// version 2.1 of the License, or (at your option) any later version.
9
//
10
// This library is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU
13
// Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with this library; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street,
18
// Fifth Floor, Boston, MA 02110 - 1301 USA
19
//
21
22
#pragma once
23
24
#include <
Geom/Dir2d.h
>
25
#include <
Geom/GeomEnums.h
>
26
#include <
Geom/Pnt2d.h
>
27
28
namespace
Geom
29
{
48
class
LX_GEOM_EXPORT
Ax2d
49
{
50
public
:
52
Ax2d
();
53
57
Ax2d
(
const
Pnt2d
& P,
const
Dir2d
& V);
60
double
angle(
const
Ax2d
& Other)
const
;
62
const
Dir2d
& direction()
const
;
63
71
bool
isCoaxial(
const
Ax2d
& Other,
const
double
AngularTolerance,
const
double
LinearTolerance)
const
;
75
bool
isNormal(
const
Ax2d
& Other,
const
double
AngularTolerance)
const
;
80
bool
isOpposite(
const
Ax2d
& Other,
const
double
AngularTolerance)
const
;
85
bool
isParallel(
const
Ax2d
& Other,
const
double
AngularTolerance)
const
;
86
88
const
Pnt2d
& location()
const
;
89
void
mirror(
const
Pnt2d
& P);
90
91
void
mirror(
const
Ax2d
& A);
92
96
Ax2d
mirrored(
const
Pnt2d
& P)
const
;
97
101
Ax2d
mirrored(
const
Ax2d
& A)
const
;
102
104
void
reverse();
105
108
Ax2d
reversed()
const
;
109
110
void
rotate(
const
Pnt2d
& P,
const
double
Ang);
111
115
Ax2d
rotated(
const
Pnt2d
& P,
const
double
Ang)
const
;
116
117
void
scale(
const
Pnt2d
& P,
const
double
S);
118
122
Ax2d
scaled(
const
Pnt2d
& P,
const
double
S)
const
;
123
125
void
setDirection(
const
Dir2d
& V);
127
void
setLocation(
const
Pnt2d
& Locat);
128
void
transform
(
const
Trsf2d
& T);
130
Ax2d
transformed(
const
Trsf2d
& T)
const
;
131
132
void
translate(
const
Vec2d
& V);
133
136
Ax2d
translated(
const
Vec2d
& V)
const
;
137
138
void
translate(
const
Pnt2d
& P1,
const
Pnt2d
& P2);
139
142
Ax2d
translated(
const
Pnt2d
& P1,
const
Pnt2d
& P2)
const
;
143
144
protected
:
145
private
:
146
Pnt2d
_loc;
147
Dir2d
_vdir;
148
};
149
150
}
// namespace Geom
Geom
Definition:
Variant.h:60
Geom::Ax2d
Definition:
Ax2d.h:48
Geom::Dir2d
Definition:
Dir2d.h:38
Base::transform
void transform(Container container, OutputIt out, BinaryFunction function)
Definition:
Algorithms.h:29
Dir2d.h
Geom::Vec2d
Defines a non-persistent vector in 2D space.
Definition:
Vec2d.h:34
Geom::Trsf2d
Definition:
Trsf2d.h:46
Pnt2d.h
GeomEnums.h
Geom::Pnt2d
Defines a non-persistent 2D cartesian point.
Definition:
Pnt2d.h:33
lexocad
Geom
include
Geom
Ax2d.h
Generated by
1.8.15