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;
std::unordered_map< GeometricID::Key, GeometryRef, GeometricID::KeyHash > m_geometries
GeometryHandle getGeometry(GeometricID::Key)
void deletingGeometry(Geometry const *)
void geometryDeleted(Geometry const &)
static Mesh makeMesh(const Vertices &vs, Vertices const *ns=nullptr)
QVector< Vert_Normal > Mesh
static Mesh meshColumn(float ratio_Rt_Rb, float numSides)
static Mesh meshBipyramid4(float rH, float alpha, float H)
static Mesh meshTruncBox(float tD)
Geometry(GeometricID::Key)
static Mesh meshDodecahedron()
static Mesh meshIcosahedron()
static Mesh meshSphere(float cut, float baseShift=0.0f, float removedTop=0.0f)
std::vector< unsigned > Indices
static Mesh meshRipple(float numSides, float ratio_asymmetry_W)
Defines namespace GUI::RealSpace::GeometricID.
std::shared_ptr< Geometry > GeometryHandle
GeometryStore & geometryStore()
Real shapes will be parameterized by BaseShape enum and possibly two floats.
void addTriangle(const Vector3D &, const Vector3D &, const Vector3D &)
void addStrip(const Vertices &, const Indices &)
void addQuad(const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)
void addVertex(const Vector3D &, int n=1)
void addFan(const Vertices &, const Indices &)