BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
GUI::RealSpace::Vector3D Struct Reference

Description

Definition at line 29 of file def.h.

Collaboration diagram for GUI::RealSpace::Vector3D:
[legend]

Public Member Functions

 Vector3D ()
 
 Vector3D (const Vector3D &)=default
 
 Vector3D (float)
 
 Vector3D (float, float, float)
 
 Vector3D (QVector3D const &)
 
Vector3D interpolateTo (const Vector3D &, float) const
 
float length () const
 
Vector3D normalized () const
 
 operator QVector3D () const
 

Public Attributes

float x
 
float y
 
float z
 

Static Public Attributes

static Vector3D const _0
 
static Vector3D const _1
 
static Vector3D const _x
 
static Vector3D const _y
 
static Vector3D const _z
 

Constructor & Destructor Documentation

◆ Vector3D() [1/5]

GUI::RealSpace::Vector3D::Vector3D ( )

Definition at line 22 of file def.cpp.

23  : Vector3D(0, 0, 0)
24 {
25 }

◆ Vector3D() [2/5]

GUI::RealSpace::Vector3D::Vector3D ( float  v)

Definition at line 27 of file def.cpp.

28  : Vector3D(v, v, v)
29 {
30 }

◆ Vector3D() [3/5]

GUI::RealSpace::Vector3D::Vector3D ( float  x_,
float  y_,
float  z_ 
)

Definition at line 32 of file def.cpp.

33  : x(x_)
34  , y(y_)
35  , z(z_)
36 {
37 }

◆ Vector3D() [4/5]

GUI::RealSpace::Vector3D::Vector3D ( const Vector3D )
default

◆ Vector3D() [5/5]

GUI::RealSpace::Vector3D::Vector3D ( QVector3D const &  v)

Definition at line 39 of file def.cpp.

40  : Vector3D(v.x(), v.y(), v.z())
41 {
42 }

Member Function Documentation

◆ interpolateTo()

Vector3D GUI::RealSpace::Vector3D::interpolateTo ( const Vector3D to,
float  rat 
) const

Definition at line 54 of file def.cpp.

55 {
56  return *this * (1 - rat) + to * rat;
57 }

◆ length()

float GUI::RealSpace::Vector3D::length ( ) const

Definition at line 44 of file def.cpp.

45 {
46  return QVector3D(*this).length();
47 }

Referenced by GUI::RealSpace::VectorRange::length().

◆ normalized()

Vector3D GUI::RealSpace::Vector3D::normalized ( ) const

Definition at line 49 of file def.cpp.

50 {
51  return QVector3D(*this).normalized();
52 }

References normalized().

Referenced by GUI::RealSpace::Canvas::horizontalCameraTurn(), GUI::RealSpace::Geometry::meshColumn(), GUI::RealSpace::Geometry::meshSphere(), normalized(), and GUI::RealSpace::Canvas::verticalCameraTurn().

Here is the call graph for this function:

◆ operator QVector3D()

GUI::RealSpace::Vector3D::operator QVector3D ( ) const

Definition at line 59 of file def.cpp.

60 {
61  return QVector3D(x, y, z);
62 }

Member Data Documentation

◆ _0

Vector3D const GUI::RealSpace::Vector3D::_0
static

◆ _1

Vector3D const GUI::RealSpace::Vector3D::_1
static

Definition at line 46 of file def.h.

◆ _x

Vector3D const GUI::RealSpace::Vector3D::_x
static

Definition at line 46 of file def.h.

◆ _y

Vector3D const GUI::RealSpace::Vector3D::_y
static

Definition at line 46 of file def.h.

◆ _z

◆ x

float GUI::RealSpace::Vector3D::x

◆ y

float GUI::RealSpace::Vector3D::y

◆ z


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