Garfield++ 4.0
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 = 0.
 
float y = 0.
 
float z = 0.
 

Detailed Description

Definition at line 11 of file TetrahedralTree.hh.

Constructor & Destructor Documentation

◆ Vec3() [1/2]

Garfield::Vec3::Vec3 ( )
inline

Definition at line 14 of file TetrahedralTree.hh.

14{}

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

◆ Vec3() [2/2]

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

Definition at line 15 of file TetrahedralTree.hh.

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

Member Function Documentation

◆ operator*()

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

Definition at line 39 of file TetrahedralTree.hh.

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

◆ operator+()

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

Definition at line 17 of file TetrahedralTree.hh.

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

◆ operator+=()

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

Definition at line 25 of file TetrahedralTree.hh.

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

◆ operator-()

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

Definition at line 21 of file TetrahedralTree.hh.

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

◆ operator-=()

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

Definition at line 32 of file TetrahedralTree.hh.

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

◆ operator/()

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

Definition at line 41 of file TetrahedralTree.hh.

41{ 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: