Garfield++ 3.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.
 
pointoperator= (const point &fp)
 
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 366 of file vec.h.

Constructor & Destructor Documentation

◆ point() [1/3]

Heed::point::point ( )
inline

Default constructor (coordinates are not initialised).

Definition at line 381 of file vec.h.

381: v() {}
vec v
Definition: vec.h:368

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

◆ point() [2/3]

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

Constructor from vector.

Definition at line 383 of file vec.h.

383: v(fv) {}

◆ point() [3/3]

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

Constructor from coordinates.

Definition at line 385 of file vec.h.

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

◆ ~point()

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

Definition at line 406 of file vec.h.

406{}

Member Function Documentation

◆ copy()

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

Definition at line 404 of file vec.h.

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

◆ 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:377
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 393 of file vec.h.

393{ return point(v + fv); }

◆ operator-()

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

Definition at line 391 of file vec.h.

391{ return v - pp.v; }

◆ operator=()

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

Definition at line 387 of file vec.h.

387 {
388 v = fp.v;
389 return *this;
390 }

◆ 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 377 of file vec.h.

377 {
378 v += dir;
379 }

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 400 of file vec.h.

400 {
401 return apeq(p1.v, p2.v, prec);
402 }
friend bool apeq(const point &p1, const point &p2, vfloat prec)
Definition: vec.h:400

◆ operator!=

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

Definition at line 397 of file vec.h.

397 {
398 return p1.v != p2.v ? 1 : 0;
399 }

◆ 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:196

◆ operator==

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

Definition at line 394 of file vec.h.

394 {
395 return p1.v == p2.v ? 1 : 0;
396 }

Member Data Documentation

◆ v


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