OpenLexocad
27.1
Ax2.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/Ax1.h
>
25
#include <
Geom/Dir.h
>
26
27
namespace
Geom
28
{
29
class
Ax2;
30
class
Pnt;
31
class
Trsf;
32
class
Vec;
33
34
}
// namespace Geom
35
36
namespace
Geom
37
{
66
67
class
LX_GEOM_EXPORT
Ax2
68
{
69
public
:
71
// //
72
// --------------------- BEGIN API --------------------- //
73
// //
74
// ATTENTION: DO NOT CHANGE ANY SIGNATURES IN THE API ! //
75
// //
77
78
// Methods PUBLIC
79
//
81
Ax2
() =
default
;
82
89
Ax2
(
const
Geom::Pnt
& P,
const
Geom::Dir
& N,
const
Geom::Dir
& Vx);
90
91
95
Ax2
(
const
Geom::Pnt
& P,
const
Geom::Dir
& V);
96
97
Ax2
(
const
Geom::Pnt
& aP,
const
Geom::Dir
& aZDir,
const
Geom::Dir
& aYDir,
const
Geom::Dir
& aXDir);
98
107
void
setAxis(
const
Geom::Ax1
& A1);
108
109
117
void
setDirection(
const
Geom::Dir
& V);
118
119
121
void
setLocation(
const
Geom::Pnt
& P);
122
123
131
void
setXDirection(
const
Geom::Dir
& Vx);
132
133
142
void
setYDirection(
const
Geom::Dir
& Vy);
143
144
148
double
angle(
const
Ax2
& Other)
const
;
149
152
const
Geom::Ax1
& axis()
const
;
153
155
const
Geom::Dir
& direction()
const
;
156
158
const
Geom::Pnt
& location()
const
;
159
161
const
Geom::Dir
& xDirection()
const
;
162
164
const
Geom::Dir
& yDirection()
const
;
165
166
167
bool
isCoplanar(
const
Ax2
& Other,
const
double
LinearTolerance,
const
double
AngularTolerance)
const
;
168
174
bool
isCoplanar(
const
Geom::Ax1
& A1,
const
double
LinearTolerance,
const
double
AngularTolerance)
const
;
175
176
192
void
mirror(
const
Geom::Pnt
& P);
193
194
210
Ax2
mirrored(
const
Geom::Pnt
& P)
const
;
211
212
228
void
mirror(
const
Geom::Ax1
& A1);
229
230
246
Ax2
mirrored(
const
Geom::Ax1
& A1)
const
;
247
248
265
void
mirror(
const
Ax2
& A2);
266
267
284
Ax2
mirrored(
const
Ax2
& A2)
const
;
285
286
void
rotate(
const
Geom::Ax1
& A1,
const
double
Ang);
287
291
Ax2
rotated(
const
Geom::Ax1
& A1,
const
double
Ang)
const
;
292
293
void
scale(
const
Geom::Pnt
& P,
const
double
S);
294
302
Ax2
scaled(
const
Geom::Pnt
& P,
const
double
S)
const
;
303
304
void
transform
(
const
Geom::Trsf
& T);
305
311
Ax2
transformed(
const
Geom::Trsf
& T)
const
;
312
313
void
translate(
const
Geom::Vec
& V);
314
317
Ax2
translated(
const
Geom::Vec
& V)
const
;
318
319
void
translate(
const
Geom::Pnt
& P1,
const
Geom::Pnt
& P2);
320
323
Ax2
translated(
const
Geom::Pnt
& P1,
const
Geom::Pnt
& P2)
const
;
324
326
// //
327
// ---------------------- END API ---------------------- //
328
// //
330
331
332
bool
isEqual(
const
Ax2
& Other,
const
double
tolerance)
const
;
333
334
335
private
:
336
Ax1
myaxis =
Ax1
({0,0,0}, {0,0,1});
337
Dir
vydir =
Dir
({0,1,0});
338
Dir
vxdir =
Dir
({1,0,0});
339
};
340
341
}
// namespace Geom
Geom
Definition:
Variant.h:60
Geom::Pnt
Defines a non-persistent 3D Cartesian point.
Definition:
Pnt.h:43
Dir.h
Base::transform
void transform(Container container, OutputIt out, BinaryFunction function)
Definition:
Algorithms.h:29
Geom::Ax2
Definition:
Ax2.h:67
Geom::Trsf
Definition:
Trsf.h:57
Geom::Dir
Definition:
Dir.h:45
Ax1.h
Geom::Ax1
Definition:
Ax1.h:50
Geom::Vec
Defines a non-persistent vector in 3D space.
Definition:
Vec.h:44
lexocad
Geom
include
Geom
Ax2.h
Generated by
1.8.15