Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73089794
subtraction.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
Thu, Jul 18, 10:36
Size
2 KB
Mime Type
text/x-c++
Expires
Sat, Jul 20, 10:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19139410
Attached To
rCADDMESH CADD_mesher
subtraction.hh
View Options
/**
* @file subtraction.hh
* @author Till Junge <till.junge@epfl.ch>
* @date Thu Jul 10 15:31:43 2014
*
* @brief Defines a geometry as a subtraction of one geometry from another
*
* @section LICENSE
*
* <insert lisence here>
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __SUBTRACTION_HH__
#define __SUBTRACTION_HH__
#include "common.hh"
#include "geometry.hh"
template <Uint DIM>
class Subtraction: public Geometry<DIM> {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
Subtraction(const Geometry<DIM> & includeGeom,
const Geometry<DIM> & excludeGeom,
std::string name = "");
Subtraction(const Subtraction<DIM> & other);
virtual ~Subtraction();
/* ------------------------------------------------------------------------ */
/* 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> & getIncludeGeom() const {return this->includeGeom;}
const Geometry<DIM> & getExcludeGeom() const {return this->excludeGeom;}
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
Geometry<DIM> & includeGeom;
Geometry<DIM> & excludeGeom;
};
/// standard output stream operator
template<Uint DIM>
inline std::ostream & operator <<(std::ostream & stream, const Subtraction<DIM> & _this)
{
_this.printself(stream);
return stream;
}
#endif /* __SUBTRACTION_HH__ */
Event Timeline
Log In to Comment