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

#include <TetrahedralTree.hh>

Public Member Functions

 Vec3 ()
 
 Vec3 (float _x, float _y, float _z)
 
Vec3 operator+ (const Vec3 &r) const
 
Vec3 operator- (const Vec3 &r) const
 
Vec3operator+= (const Vec3 &r)
 
Vec3operator-= (const Vec3 &r)
 
Vec3 operator* (float r) const
 
Vec3 operator/ (float r) const
 

Public Attributes

float x
 
float y
 
float z
 

Detailed Description

Definition at line 12 of file TetrahedralTree.hh.

Constructor & Destructor Documentation

◆ Vec3() [1/2]

Garfield::Vec3::Vec3 ( )
inline

Definition at line 15 of file TetrahedralTree.hh.

15{}

Referenced by operator*(), operator+(), operator-(), and operator/().

◆ Vec3() [2/2]

Garfield::Vec3::Vec3 ( float  _x,
float  _y,
float  _z 
)
inline

Definition at line 16 of file TetrahedralTree.hh.

16: x(_x), y(_y), z(_z) {}

Member Function Documentation

◆ operator*()

Vec3 Garfield::Vec3::operator* ( float  r) const
inline

Definition at line 40 of file TetrahedralTree.hh.

40{ return Vec3(x * r, y * r, z * r); }

◆ operator+()

Vec3 Garfield::Vec3::operator+ ( const Vec3 r) const
inline

Definition at line 18 of file TetrahedralTree.hh.

18 {
19 return Vec3(x + r.x, y + r.y, z + r.z);
20 }

◆ operator+=()

Vec3 & Garfield::Vec3::operator+= ( const Vec3 r)
inline

Definition at line 26 of file TetrahedralTree.hh.

26 {
27 x += r.x;
28 y += r.y;
29 z += r.z;
30 return *this;
31 }

◆ operator-()

Vec3 Garfield::Vec3::operator- ( const Vec3 r) const
inline

Definition at line 22 of file TetrahedralTree.hh.

22 {
23 return Vec3(x - r.x, y - r.y, z - r.z);
24 }

◆ operator-=()

Vec3 & Garfield::Vec3::operator-= ( const Vec3 r)
inline

Definition at line 33 of file TetrahedralTree.hh.

33 {
34 x -= r.x;
35 y -= r.y;
36 z -= r.z;
37 return *this;
38 }

◆ operator/()

Vec3 Garfield::Vec3::operator/ ( float  r) const
inline

Definition at line 42 of file TetrahedralTree.hh.

42{ return Vec3(x / r, y / r, z / r); }

Member Data Documentation

◆ x

◆ y

◆ z


The documentation for this struct was generated from the following file: