v2.0.0
Loading...
Searching...
No Matches
meshfactory.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef MESHFACTORY_H
37#define MESHFACTORY_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
44
45#include <QVector3D>
46#include <QMatrix4x4>
47#include <QColor>
48#include <Eigen/Core>
49#include <memory>
50
51class BrainSurface;
52
53//=============================================================================================================
62{
63public:
64 MeshFactory() = delete; // Static-only class
65
66 //=========================================================================================================
76 static std::shared_ptr<BrainSurface> createSphere(const QVector3D &center,
77 float radius,
78 const QColor &color,
79 int subdivisions = 1);
80
81 //=========================================================================================================
91 static std::shared_ptr<BrainSurface> createPlate(const QVector3D &center,
92 const QMatrix4x4 &orientation,
93 const QColor &color,
94 float size);
95
96 //=========================================================================================================
107 static std::shared_ptr<BrainSurface> createBarbell(const QVector3D &center,
108 const QMatrix4x4 &orientation,
109 const QColor &color,
110 float size);
111
112 //=========================================================================================================
125 static std::shared_ptr<BrainSurface> createBatchedSpheres(const QVector<QVector3D> &positions,
126 float radius,
127 const QColor &color,
128 int subdivisions = 1);
129
130 //=========================================================================================================
137 static int sphereVertexCount(int subdivisions = 1);
138
139private:
140 //=========================================================================================================
148 static void buildIcosphere(QVector<Eigen::Vector3f> &vertices,
149 QVector<Eigen::Vector3i> &faces,
150 int subdivisions);
151};
152
153#endif // MESHFACTORY_H
disp3D_rhi library export/import macros.
#define DISP3DRHISHARED_EXPORT
MeshFactory()=delete
static std::shared_ptr< BrainSurface > createPlate(const QVector3D &center, const QMatrix4x4 &orientation, const QColor &color, float size)
static std::shared_ptr< BrainSurface > createBatchedSpheres(const QVector< QVector3D > &positions, float radius, const QColor &color, int subdivisions=1)
static std::shared_ptr< BrainSurface > createBarbell(const QVector3D &center, const QMatrix4x4 &orientation, const QColor &color, float size)
static int sphereVertexCount(int subdivisions=1)
static std::shared_ptr< BrainSurface > createSphere(const QVector3D &center, float radius, const QColor &color, int subdivisions=1)
Renderable cortical surface mesh with per-vertex color, curvature data, and GPU buffer management.