Garfield++ v2r0
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

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 shift (const vec &dir)
 
 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 374 of file vec.h.

Constructor & Destructor Documentation

◆ point() [1/3]

Heed::point::point ( )
inline

Default constructor (coordinates are not initialised).

Definition at line 390 of file vec.h.

390: v() {}
vec v
Definition: vec.h:376

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

◆ point() [2/3]

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

Constructor from vector.

Definition at line 392 of file vec.h.

392: v(fv) {}

◆ point() [3/3]

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

Constructor from coordinates.

Definition at line 394 of file vec.h.

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

◆ ~point()

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

Definition at line 415 of file vec.h.

415{}

Member Function Documentation

◆ copy()

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

Definition at line 413 of file vec.h.

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

◆ down()

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

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}
virtual void shift(const vec &dir)
Definition: vec.h:385
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 402 of file vec.h.

402{ return point(v + fv); }

◆ operator-()

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

Definition at line 400 of file vec.h.

400{ return v - pp.v; }

◆ operator=()

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

Definition at line 396 of file vec.h.

396 {
397 v = fp.v;
398 return *this;
399 }

◆ print()

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

Definition at line 427 of file vec.cpp.

427{ file << (*this); }

◆ shift()

virtual void Heed::point::shift ( const vec dir)
inlinevirtual

Reimplemented from Heed::absref.

Definition at line 385 of file vec.h.

385 {
386 // not defined for vectors, but defined for points
387 v += dir;
388 }

Referenced by down(), and up().

◆ up()

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

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

409 {
410 return apeq(p1.v, p2.v, prec);
411 }
friend bool apeq(const point &p1, const point &p2, vfloat prec)
Definition: vec.h:409

◆ operator!=

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

Definition at line 406 of file vec.h.

406 {
407 return p1.v != p2.v ? 1 : 0;
408 }

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

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

Member Data Documentation

◆ v


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