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

Point. More...

#include <vec.h>

+ Inheritance diagram for Heed::point:

Public Member Functions

void down (const abssyscoor *fasc) override
 Convert numbering representation of object to basical system of fasc.
 
void up (const abssyscoor *fasc) override
 Convert numbering representation of objects to new system.
 
void shift (const vec &dir) override
 
 point ()
 Default constructor (coordinates are not initialised).
 
 point (const vec &fv)
 Constructor from vector.

 
 point (const vfloat fex, const vfloat fey, const vfloat fez)
 Constructor from coordinates.
 
 point (const point &p)
 Copy constructor.
 
pointoperator= (const point &fp)
 Assignment operator.
 
vec operator- (const point &pp) const
 
point operator+ (const vec &fv) const
 
virtual pointcopy () const
 
virtual void print (std::ostream &file, int l) const
 
virtual ~point ()
 
- 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)
 

Public Attributes

vec v
 

Friends

int operator== (const point &p1, const point &p2)
 
int operator!= (const point &p1, const point &p2)
 
bool apeq (const point &p1, const point &p2, vfloat prec)
 
std::ostream & operator<< (std::ostream &file, const point &p)
 

Detailed Description

Point.

Definition at line 368 of file vec.h.

Constructor & Destructor Documentation

◆ point() [1/4]

Heed::point::point ( )
inline

Default constructor (coordinates are not initialised).

Definition at line 383 of file vec.h.

383: v() {}
vec v
Definition: vec.h:370

Referenced by copy(), and operator+().

◆ point() [2/4]

Heed::point::point ( const vec fv)
inline

Constructor from vector.

Definition at line 385 of file vec.h.

385: v(fv) {}

◆ point() [3/4]

Heed::point::point ( const vfloat  fex,
const vfloat  fey,
const vfloat  fez 
)
inline

Constructor from coordinates.

Definition at line 387 of file vec.h.

388 : v(fex, fey, fez) {}

◆ point() [4/4]

Heed::point::point ( const point p)
inline

Copy constructor.

Definition at line 390 of file vec.h.

390: v(p.v) {}

◆ ~point()

virtual Heed::point::~point ( )
inlinevirtual

Definition at line 411 of file vec.h.

411{}

Member Function Documentation

◆ copy()

virtual point * Heed::point::copy ( ) const
inlinevirtual

Definition at line 409 of file vec.h.

409{ return new point(*this); }
point()
Default constructor (coordinates are not initialised).
Definition: vec.h:383

◆ down()

void Heed::point::down ( const abssyscoor fasc)
overridevirtual

Convert numbering representation of object to basical system of fasc.

Reimplemented from Heed::absref.

Definition at line 418 of file vec.cpp.

418 {
419 v.down(fasc);
420 shift(fasc->Gapiv()->v);
421}
void shift(const vec &dir) override
Definition: vec.h:379
void down(const basis *fabas)
Definition: vec.cpp:168

Referenced by Heed::straight::vecdistance().

◆ operator+()

point Heed::point::operator+ ( const vec fv) const
inline

Definition at line 398 of file vec.h.

398{ return point(v + fv); }

◆ operator-()

vec Heed::point::operator- ( const point pp) const
inline

Definition at line 396 of file vec.h.

396{ return v - pp.v; }

◆ operator=()

point & Heed::point::operator= ( const point fp)
inline

Assignment operator.

Definition at line 392 of file vec.h.

392 {
393 v = fp.v;
394 return *this;
395 }

◆ print()

void Heed::point::print ( std::ostream &  file,
int  l 
) const
virtual

Definition at line 427 of file vec.cpp.

427{ file << (*this); }

◆ shift()

void Heed::point::shift ( const vec dir)
inlineoverridevirtual

Reimplemented from Heed::absref.

Definition at line 379 of file vec.h.

379 {
380 v += dir;
381 }

Referenced by down(), and up().

◆ up()

void Heed::point::up ( const abssyscoor fasc)
overridevirtual

Convert numbering representation of objects to new system.

Reimplemented from Heed::absref.

Definition at line 422 of file vec.cpp.

422 {
423 shift(-fasc->Gapiv()->v);
424 v.up(fasc);
425}
void up(const basis *fabas_new)
Definition: vec.cpp:190

Referenced by Heed::manip_absvol::m_check_point_inside().

Friends And Related Function Documentation

◆ apeq

bool apeq ( const point p1,
const point p2,
vfloat  prec 
)
friend

Definition at line 405 of file vec.h.

405 {
406 return apeq(p1.v, p2.v, prec);
407 }
friend bool apeq(const point &p1, const point &p2, vfloat prec)
Definition: vec.h:405

◆ operator!=

int operator!= ( const point p1,
const point p2 
)
friend

Definition at line 402 of file vec.h.

402 {
403 return p1.v != p2.v ? 1 : 0;
404 }

◆ operator<<

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

Definition at line 429 of file vec.cpp.

429 {
430 Ifile << "point:\n";
431 indn.n += 2;
432 file << p.v;
433 indn.n -= 2;
434 return file;
435}
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:195

◆ operator==

int operator== ( const point p1,
const point p2 
)
friend

Definition at line 399 of file vec.h.

399 {
400 return p1.v == p2.v ? 1 : 0;
401 }

Member Data Documentation

◆ v


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