15 #ifndef BORNAGAIN_GUI_BA3D_MODEL_GEOMETRY_H
16 #define BORNAGAIN_GUI_BA3D_MODEL_GEOMETRY_H
21 #include <unordered_map>
46 using QVector::append;
47 using QVector::QVector;
48 using QVector::reserve;
49 using QVector::resize;
50 using QVector::operator[];
66 using Mesh = QVector<Vert_Normal>;
81 static Mesh meshSphere(
float cut,
float baseShift = 0.0f,
float removedTop = 0.0f);
106 std::unordered_map<GeometricID::Key, GeometryRef, GeometricID::KeyHash>
m_geometries;
void deletingGeometry(Geometry const *)
std::unordered_map< GeometricID::Key, GeometryRef, GeometricID::KeyHash > m_geometries
void geometryDeleted(Geometry const &)
GeometryHandle getGeometry(GeometricID::Key)
Geometry(GeometricID::Key)
static Mesh meshTruncBox(float tD)
static Mesh meshSphere(float cut, float baseShift=0.0f, float removedTop=0.0f)
static Mesh meshCuboctahedron(float rH, float alpha, float H)
std::vector< unsigned > Indices
static Mesh meshIcosahedron()
static Mesh makeMesh(const Vertices &vs, Vertices const *ns=nullptr)
static Mesh meshColumn(float ratio_Rt_Rb, float numSides)
static Mesh meshDodecahedron()
QVector< Vert_Normal > Mesh
static Mesh meshRipple(float numSides, float ratio_asymmetry_W)
Defines geometry namespace.
std::shared_ptr< Geometry > GeometryHandle
GeometryStore & geometryStore()
void addVertex(const Vector3D &, int n=1)
void addStrip(const Vertices &, const Indices &)
void addTriangle(const Vector3D &, const Vector3D &, const Vector3D &)
void addFan(const Vertices &, const Indices &)
void addQuad(const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)