Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::polyline_pl Class Reference

Polyline in plane. More...

#include <polyline.h>

+ Inheritance diagram for Heed::polyline_pl:

Public Member Functions

plane Gpn () const
 
 polyline_pl ()
 
 polyline_pl (const polyline_pl &pl)
 
 polyline_pl (const plane &fpn, const point *fpt, int fqpt)
 
 polyline_pl (polyline &pl)
 
 polyline_pl (const polyline &pl)
 
polyline_ploperator= (const polyline_pl &fpl)
 
- Public Member Functions inherited from Heed::polyline
int Gqpt () const
 
point Gpt (int n) const
 
int Gqsl () const
 
straight Gsl (int n) const
 
int check_point_in (const point &fpt, vfloat prec) const
 
int cross (const straight &fsl, point *pc, int &qpc, polyline *pl, int &qpl, vfloat prec) const
 
vfloat dist_two_inter (polyline &pl, vfloat prec) const
 Distance between two intervals.
 
vfloat distance (const point &fpt) const
 
vfloat distance (const point &fpt, point &cpt) const
 Distance between two points.
 
 polyline ()
 
 polyline (polyline &pl)
 
 polyline (const polyline &pl)
 
 polyline (const point *fpt, int fqpt)
 
 polyline (const point &fpt1, const point &fpt2)
 
polylineoperator= (const polyline &fpl)
 
 ~polyline ()
 
- Public Member Functions inherited from Heed::absref
virtual ~absref ()
 Destructor.
 
virtual void down (const abssyscoor *fasc)
 Convert numbering representation of object to basical system of fasc.
 
virtual void up (const abssyscoor *fasc)
 Convert numbering representation of objects to new system.
 
virtual void turn (const vec &dir, vfloat angle)
 Turn around axis doing via center of coordinate system along dir.
 
virtual void shift (const vec &dir)
 

Protected Member Functions

virtual void get_components (ActivePtr< absref_transmit > &aref_tran)
 
- Protected Member Functions inherited from Heed::polyline
virtual void get_components (ActivePtr< absref_transmit > &aref_tran)
 
void polyline_init (const point *fpt, int fqpt)
 
void polyline_del ()
 

Protected Attributes

plane pn
 
- Protected Attributes inherited from Heed::polyline
int qpt
 
pointpt
 
int qsl
 
straightsl
 
absref ** aref
 

Static Protected Attributes

static absrefabsref::* aref_pl = (absref absref::*)&polyline_pl::pn
 

Friends

std::ostream & operator<< (std::ostream &file, const polyline_pl &p)
 

Detailed Description

Polyline in plane.

Definition at line 120 of file polyline.h.

Constructor & Destructor Documentation

◆ polyline_pl() [1/5]

Heed::polyline_pl::polyline_pl ( )
inline

Definition at line 132 of file polyline.h.

132: polyline(), pn() { ; }

◆ polyline_pl() [2/5]

Heed::polyline_pl::polyline_pl ( const polyline_pl pl)
inline

Definition at line 133 of file polyline.h.

133: polyline(pl), pn(pl.pn) { ; }

◆ polyline_pl() [3/5]

Heed::polyline_pl::polyline_pl ( const plane fpn,
const point fpt,
int  fqpt 
)
inline

Definition at line 134 of file polyline.h.

135 : polyline(fpt, fqpt), pn(fpn) {}

◆ polyline_pl() [4/5]

Heed::polyline_pl::polyline_pl ( polyline pl)

Definition at line 240 of file polyline.cpp.

240 {
241 mfunname("polyline_pl::polyline_pl( polyline& pl)");
242 if (pl.Gqsl() < 2) {
243 mcerr << "error in polyline_pl(polyline& pl): qsl=" << Gqsl();
244 spexit(mcerr);
245 }
247 pn = plane(pl.Gsl(0).Gpiv(), pl.Gsl(0).Gdir() || pl.Gsl(1).Gdir());
248}
#define spexit(stream)
Definition: FunNameStack.h:256
#define mfunname(string)
Definition: FunNameStack.h:45
polyline & operator=(const polyline &fpl)
Definition: polyline.cpp:43
int Gqsl() const
Definition: polyline.h:40
#define mcerr
Definition: prstream.h:128

◆ polyline_pl() [5/5]

Heed::polyline_pl::polyline_pl ( const polyline pl)

Definition at line 250 of file polyline.cpp.

250 {
251 mfunname("polyline_pl::polyline_pl(const polyline& pl");
252 if (pl.Gqsl() < 2) {
253 mcerr << "error in polyline_pl(polyline& pl): qsl=" << Gqsl();
254 spexit(mcerr);
255 }
257 pn = plane(pl.Gsl(0).Gpiv(), pl.Gsl(0).Gdir() || pl.Gsl(1).Gdir());
258}

Member Function Documentation

◆ get_components()

void Heed::polyline_pl::get_components ( ActivePtr< absref_transmit > &  aref_tran)
protectedvirtual

Reimplemented from Heed::polyline.

Reimplemented in Heed::rectangle, and Heed::spquadr.

Definition at line 236 of file polyline.cpp.

236 {
237 aref_tran.pass(new absref_transmit(1, &aref_pl, qpt + qsl, aref));
238}
static absrefabsref::* aref_pl
Definition: polyline.h:128
absref ** aref
Definition: polyline.h:51

◆ Gpn()

plane Heed::polyline_pl::Gpn ( ) const
inline

Definition at line 125 of file polyline.h.

125{ return pn; }

◆ operator=()

polyline_pl & Heed::polyline_pl::operator= ( const polyline_pl fpl)

Definition at line 260 of file polyline.cpp.

260 {
261 mfunname("polyline_pl& polyline_pl::operator=(const polyline_pl& fpl)");
262 polyline_del();
263 polyline_init(fpl.pt, fpl.qpt);
264 pn = fpl.pn;
265 return *this;
266}
void polyline_init(const point *fpt, int fqpt)
Definition: polyline.cpp:50
void polyline_del()
Definition: polyline.h:76

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  file,
const polyline_pl p 
)
friend

Definition at line 268 of file polyline.cpp.

268 {
269 Ifile << "polyline_pl:\n";
270 indn.n += 2;
271 file << p.pn;
272 // file << statcast(const polyline&, p);
273 file << static_cast<const polyline&>(p);
274 indn.n -= 2;
275 return file;
276}
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:196

Member Data Documentation

◆ aref_pl

absref absref::* Heed::polyline_pl::aref_pl = (absref absref::*)&polyline_pl::pn
staticprotected

Definition at line 128 of file polyline.h.

Referenced by get_components().

◆ pn

plane Heed::polyline_pl::pn
protected

The documentation for this class was generated from the following files: