ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Plane3D.h
Go to the documentation of this file.
1
2
// //
3
// Copyright (c) 2003-2013 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.opensource.org/licenses/osl-3.0.php //
10
// //
12
13
#ifndef __PLANE3D_H
14
#define __PLANE3D_H
15
16
//-- Project includes --
17
#include "
Foundation/vec3.h
"
18
28
class
Plane3D
29
{
30
protected
:
31
Vec3
U
,
V
;
32
bool
force3D
;
33
Vec3
Dir
;
34
Vec3
Pos
;
35
36
void
Create
() ;
37
public
:
38
Plane3D
();
39
Plane3D
(
const
Vec3
& iDir,
const
Vec3
& iPos);
40
Plane3D
(
const
Vec3
& iU,
const
Vec3
& iV,
const
Vec3
& iPos);
41
42
virtual
~Plane3D
() {}
43
44
virtual
double
sep
(
const
Vec3
&)
const
;
45
virtual
double
dist
(
const
Vec3
&) ;
// signed separation according to Direction of the normal
46
virtual
Vec3
ToClosest
(
const
Vec3
& M) {
return
dist
(M)*
Dir
; } ;
// return the vector PM where P is the closest point to M on the surface.
47
48
inline
Vec3
GetU
()
const
{
return
U
; } ;
// return U (for planes in a 2D space (ie. line) U is in the space)
49
inline
Vec3
GetV
()
const
{
return
V
; } ;
// V is null if this is a 2D space.
50
inline
const
Vec3
&
GetW
()
const
{
return
Dir
; } ;
// The normal
51
inline
Vec3
getNormal
()
const
{
return
Dir
; } ;
52
inline
const
Vec3
&
GetO
()
const
{
return
Pos
; } ;
53
inline
Vec3
getPos
()
const
{
return
Pos
; } ;
54
} ;
55
56
namespace
esys
57
{
58
namespace
lsm
59
{
60
typedef ::Plane3D
Plane3D
;
61
}
62
}
63
64
#endif // __PLANE3D_H
Geometry
Plane3D.h
Generated on Mon May 6 2013 23:26:29 for ESyS-Particle by
1.8.3.1