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

#include <vec.h>

+ Inheritance diagram for point:

Public Member Functions

virtual void down (const abssyscoor *fasc)
 
virtual void up (const abssyscoor *fasc)
 
virtual void shift (const vec &dir)
 
 point (void)
 
 point (const vec &fv)
 
 point (const vfloat &fex, const vfloat &fey, const vfloat &fez)
 
pointoperator= (const point &fp)
 
vec operator- (const point &pp) const
 
point operator+ (const vec &fv) const
 
 AnyType_copy (point, point)
 
virtual void print (std::ostream &file, int l) const
 
virtual ~point ()
 

Public Attributes

vec v
 

Friends

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

Detailed Description

Definition at line 477 of file vec.h.

Constructor & Destructor Documentation

◆ point() [1/3]

point::point ( void  )
inline

Definition at line 501 of file vec.h.

501 : v() {
502 ;
503 } // v is not inited
vec v
Definition: vec.h:479

Referenced by operator+().

◆ point() [2/3]

point::point ( const vec fv)
inline

Definition at line 504 of file vec.h.

504: v(fv) { ; }

◆ point() [3/3]

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

Definition at line 505 of file vec.h.

506 : v(fex, fey, fez) {
507 ;
508 }

◆ ~point()

virtual point::~point ( )
inlinevirtual

Definition at line 533 of file vec.h.

533{}

Member Function Documentation

◆ AnyType_copy()

point::AnyType_copy ( point  ,
point   
)

◆ down()

void point::down ( const abssyscoor fasc)
virtual

Definition at line 546 of file vec.cpp.

546 {
547 v.down(fasc);
548 shift(fasc->Gapiv()->v);
549}
virtual const point * Gapiv(void) const =0
virtual void shift(const vec &dir)
Definition: vec.h:497
void down(const basis *fabas)
Definition: vec.cpp:247

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

◆ operator+()

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

Definition at line 517 of file vec.h.

517{ return point(v + fv); }
point(void)
Definition: vec.h:501

◆ operator-()

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

Definition at line 515 of file vec.h.

515{ return v - pp.v; }

◆ operator=()

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

Definition at line 511 of file vec.h.

511 {
512 v = fp.v;
513 return *this;
514 }

◆ print()

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

Definition at line 555 of file vec.cpp.

555{ file << (*this); }

◆ shift()

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

Definition at line 497 of file vec.h.

497 {
498 v += dir;
499 } // not defined for vectors, but

Referenced by down(), and up().

◆ up()

void point::up ( const abssyscoor fasc)
virtual

Definition at line 550 of file vec.cpp.

550 {
551 shift(-fasc->Gapiv()->v);
552 v.up(fasc);
553}
void up(const basis *fabas_new)
Definition: vec.cpp:269

Referenced by macro_copy_body_not_defined().

Friends And Related Function Documentation

◆ apeq

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

Definition at line 524 of file vec.h.

524 {
525 return apeq(p1.v, p2.v, prec);
526 }
friend int apeq(const point &p1, const point &p2, vfloat prec)
Definition: vec.h:524

◆ not_apeq

int not_apeq ( const point p1,
const point p2,
vfloat  prec 
)
friend

Definition at line 527 of file vec.h.

527 {
528 return not_apeq(p1.v, p2.v, prec);
529 }
friend int not_apeq(const point &p1, const point &p2, vfloat prec)
Definition: vec.h:527

◆ operator!=

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

Definition at line 521 of file vec.h.

521 {
522 return p1.v != p2.v ? 1 : 0;
523 }

◆ operator<<

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

Definition at line 557 of file vec.cpp.

557 {
558 Ifile << "point:\n";
559 indn.n += 2;
560 file << p.v;
561 indn.n -= 2;
562 return file;
563}
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

◆ operator==

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

Definition at line 518 of file vec.h.

518 {
519 return p1.v == p2.v ? 1 : 0;
520 }

Member Data Documentation

◆ v


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