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

Description

Definition at line 45 of file geometry.h.

Inheritance diagram for GUI::RealSpace::Geometry::Vertices:
[legend]
Collaboration diagram for GUI::RealSpace::Geometry::Vertices:
[legend]

Public Member Functions

void addFan (const Vertices &, const Indices &)
 
void addQuad (const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)
 
void addQuad (const Vertices &, unsigned, unsigned, unsigned, unsigned)
 
void addStrip (const Vertices &, const Indices &)
 
void addTriangle (const Vector3D &, const Vector3D &, const Vector3D &)
 
void addVertex (const Vector3D &, int n=1)
 

Member Function Documentation

◆ addFan()

void GUI::RealSpace::Geometry::Vertices::addFan ( const Vertices vs,
const Indices is 
)

Definition at line 65 of file geometry.cpp.

66 {
67  ASSERT(is.size() >= 3); // at least one triangle
68  const auto& ctr = vs.at(is.at(0));
69  for (unsigned i = 0; i + 2 < is.size(); ++i)
70  addTriangle(ctr, vs.at(is.at(1 + i)), vs.at(is.at(2 + i)));
71 }
void addTriangle(const Vector3D &, const Vector3D &, const Vector3D &)
Definition: geometry.cpp:35

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

◆ addQuad() [1/2]

void GUI::RealSpace::Geometry::Vertices::addQuad ( const Vector3D v1,
const Vector3D v2,
const Vector3D v3,
const Vector3D v4 
)

◆ addQuad() [2/2]

void GUI::RealSpace::Geometry::Vertices::addQuad ( const Vertices vs,
unsigned  i1,
unsigned  i2,
unsigned  i3,
unsigned  i4 
)

Definition at line 49 of file geometry.cpp.

51 {
52  addQuad(vs.at(i1), vs.at(i2), vs.at(i3), vs.at(i4));
53 }
void addQuad(const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)
Definition: geometry.cpp:42

◆ addStrip()

void GUI::RealSpace::Geometry::Vertices::addStrip ( const Vertices vs,
const Indices is 
)

Definition at line 55 of file geometry.cpp.

56 {
57  ASSERT(is.size() >= 3); // at least one triangle
58  for (unsigned i = 0; i + 2 < is.size(); ++i)
59  if (i % 2)
60  addTriangle(vs.at(is.at(i)), vs.at(is.at(1 + i)), vs.at(is.at(2 + i)));
61  else
62  addTriangle(vs.at(is.at(i)), vs.at(is.at(2 + i)), vs.at(is.at(1 + i)));
63 }

◆ addTriangle()

void GUI::RealSpace::Geometry::Vertices::addTriangle ( const Vector3D v1,
const Vector3D v2,
const Vector3D v3 
)

◆ addVertex()

void GUI::RealSpace::Geometry::Vertices::addVertex ( const Vector3D v,
int  n = 1 
)

Definition at line 29 of file geometry.cpp.

30 {
31  for (int i = 0; i < n; ++i)
32  append(v);
33 }

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


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