Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78032480
union.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 17, 23:34
Size
2 KB
Mime Type
text/x-c++
Expires
Mon, Aug 19, 23:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19922743
Attached To
rCADDMESH CADD_mesher
union.hh
View Options
/**
* @file union.hh
* @author Till Junge <till.junge@epfl.ch>
* @date Thu Jul 3 11:10:31 2014
*
* @brief Class defines a geometry as a union of two Geometries
*
* @section LICENSE
*
* <insert lisence here>
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __UNION_HH__
#define __UNION_HH__
#include "common.hh"
#include "geometry.hh"
template
<
Uint
DIM
>
class
Union
:
public
Geometry
<
DIM
>
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
Union
(
const
Geometry
<
DIM
>&
geomA
,
const
Geometry
<
DIM
>&
geomB
,
std
::
string
name
=
""
);
Union
(
const
Union
<
DIM
>
&
other
);
virtual
~
Union
();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
/// function to print the content of the class
virtual
void
printself
(
std
::
ostream
&
stream
,
int
indent
=
0
)
const
;
virtual
void
shift
(
const
PointRef
<
DIM
>
&
offset
);
virtual
Geometry
<
DIM
>
*
resolveType
()
const
;
virtual
bool
is_inside
(
const
Real
*
point
,
Real
tol
)
const
;
virtual
InsideObject
from_border
(
const
Real
*
point
,
Real
tol
)
const
;
virtual
Real
min_in_direction
(
const
Real
*
dir
,
const
Real
&
unit
=
1
)
const
;
virtual
Real
max_in_direction
(
const
Real
*
dir
,
const
Real
&
unit
=
1
)
const
;
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
const
Geometry
<
DIM
>
&
getGeomA
()
const
{
return
this
->
geomA
;}
const
Geometry
<
DIM
>
&
getGeomB
()
const
{
return
this
->
geomB
;}
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private
:
Geometry
<
DIM
>
&
geomA
;
Geometry
<
DIM
>
&
geomB
;
};
/// standard output stream operator
template
<
Uint
DIM
>
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
stream
,
const
Union
<
DIM
>
&
_this
)
{
_this
.
printself
(
stream
);
return
stream
;
}
#endif
/* __UNION_HH__ */
Event Timeline
Log In to Comment