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

Namespaces

 GeometricID
 
 Paracrystal2D
 
 Particles
 

Classes

class  Buffer
 GL buffer. More...
 
class  Buffer3DAxes
 Buffer for drawing 3D Coordinate Axes on canvas. More...
 
class  BuilderUtils
 
class  Camera
 
class  Canvas
 
class  Geometry
 
class  GeometryStore
 
class  Layer
 Particle layer: a transparent box. More...
 
class  Model
 
class  Object
 A geometric object. More...
 
class  Program
 
struct  Range
 Range of float. More...
 
struct  Vector3D
 
struct  VectorRange
 Range of coordinates. More...
 
class  Widget3D
 

Typedefs

using GeometryHandle = std::shared_ptr< Geometry >
 
using GeometryRef = std::weak_ptr< Geometry >
 

Functions

Vector3D cross (const Vector3D &v1, const Vector3D &v2)
 
float dot (const Vector3D &v1, const Vector3D &v2)
 
GeometryStoregeometryStore ()
 
Vector3D operator* (const Vector3D &v, float f)
 
Vector3D operator+ (const Vector3D &_1, const Vector3D &_2)
 
Vector3D operator+ (const Vector3D &v)
 
Vector3D operator- (const Vector3D &_1, const Vector3D &_2)
 
Vector3D operator- (const Vector3D &v)
 

Variables

QColor const clrObject = Qt::black
 
const float DodecahedronL2R = 4.f / std::sqrt(3.f) / (1.f + std::sqrt(5.f))
 
const float GoldenRatio = (1.f + std::sqrt(5.f)) / 2.f
 
const float IcosahedronL2R = 4.f / (10.f + 2.f * std::sqrt(5.f))
 
const Vector3D LIGHT1 = Vector3D(0.5f, 1.0f, 1.0f) * 1000.0f
 
const Vector3D LIGHT2 = Vector3D(1.0f, 0.0f, 1.0f) * 1000.0f
 
const Vector3D LIGHT3 = Vector3D(1.0f, 1.0f, 0.0f) * 1000.0f
 

Typedef Documentation

◆ GeometryHandle

using GUI::RealSpace::GeometryHandle = typedef std::shared_ptr<Geometry>

Definition at line 27 of file geometry_inc.h.

◆ GeometryRef

using GUI::RealSpace::GeometryRef = typedef std::weak_ptr<Geometry>

Definition at line 28 of file geometry_inc.h.

Function Documentation

◆ cross()

Vector3D GUI::RealSpace::cross ( const Vector3D v1,
const Vector3D v2 
)

◆ dot()

float GUI::RealSpace::dot ( const Vector3D v1,
const Vector3D v2 
)

Definition at line 72 of file def.cpp.

73 {
74  return QVector3D::dotProduct(v1, v2);
75 }

Referenced by GUI::RealSpace::Canvas::horizontalCameraTurn(), and GUI::RealSpace::Canvas::verticalCameraTurn().

◆ geometryStore()

GeometryStore & GUI::RealSpace::geometryStore ( )

Definition at line 176 of file geometry.cpp.

177 {
178  static GeometryStore gs;
179  return gs;
180 }

Referenced by GUI::RealSpace::Canvas::Canvas(), GUI::RealSpace::Geometry::~Geometry(), and GUI::RealSpace::Object::draw().

◆ operator*()

Vector3D GUI::RealSpace::operator* ( const Vector3D v,
float  f 
)

Definition at line 87 of file def.cpp.

88 {
89  return Vector3D(v.x * f, v.y * f, v.z * f);
90 }

References GUI::RealSpace::Vector3D::x, GUI::RealSpace::Vector3D::y, and GUI::RealSpace::Vector3D::z.

◆ operator+() [1/2]

Vector3D GUI::RealSpace::operator+ ( const Vector3D _1,
const Vector3D _2 
)

Definition at line 92 of file def.cpp.

93 {
94  return Vector3D(_1.x + _2.x, _1.y + _2.y, _1.z + _2.z);
95 }

References GUI::RealSpace::Vector3D::x, GUI::RealSpace::Vector3D::y, and GUI::RealSpace::Vector3D::z.

◆ operator+() [2/2]

Vector3D GUI::RealSpace::operator+ ( const Vector3D v)

Definition at line 77 of file def.cpp.

78 {
79  return v;
80 }

◆ operator-() [1/2]

Vector3D GUI::RealSpace::operator- ( const Vector3D _1,
const Vector3D _2 
)

Definition at line 97 of file def.cpp.

98 {
99  return Vector3D(_1.x - _2.x, _1.y - _2.y, _1.z - _2.z);
100 }

References GUI::RealSpace::Vector3D::x, GUI::RealSpace::Vector3D::y, and GUI::RealSpace::Vector3D::z.

◆ operator-() [2/2]

Vector3D GUI::RealSpace::operator- ( const Vector3D v)

Definition at line 82 of file def.cpp.

83 {
84  return Vector3D::_0 - v;
85 }

References GUI::RealSpace::Vector3D::_0.

Variable Documentation

◆ clrObject

QColor const GUI::RealSpace::clrObject = Qt::black

Definition at line 33 of file object.cpp.

◆ DodecahedronL2R

const float GUI::RealSpace::DodecahedronL2R = 4.f / std::sqrt(3.f) / (1.f + std::sqrt(5.f))

◆ GoldenRatio

const float GUI::RealSpace::GoldenRatio = (1.f + std::sqrt(5.f)) / 2.f

Definition at line 22 of file geometry_inc.cpp.

Referenced by GUI::RealSpace::Geometry::meshDodecahedron().

◆ IcosahedronL2R

const float GUI::RealSpace::IcosahedronL2R = 4.f / (10.f + 2.f * std::sqrt(5.f))

Definition at line 23 of file geometry_inc.cpp.

Referenced by GUI::RealSpace::Model::newParticle().

◆ LIGHT1

const Vector3D GUI::RealSpace::LIGHT1 = Vector3D(0.5f, 1.0f, 1.0f) * 1000.0f

Definition at line 19 of file camera.cpp.

◆ LIGHT2

const Vector3D GUI::RealSpace::LIGHT2 = Vector3D(1.0f, 0.0f, 1.0f) * 1000.0f

Definition at line 20 of file camera.cpp.

◆ LIGHT3

const Vector3D GUI::RealSpace::LIGHT3 = Vector3D(1.0f, 1.0f, 0.0f) * 1000.0f

Definition at line 21 of file camera.cpp.