MoCSI API Reference
Loading...
Searching...
No Matches
VtkRayCasting.h
Go to the documentation of this file.
1#ifndef VTK_RAY_CASTING_H
2#define VTK_RAY_CASTING_H
3
4#ifdef VTK_PRESENT
5#include <vtkActor.h>
6#include <vtkBYUReader.h>
7#include <vtkCamera.h>
8#include <vtkCellCenters.h>
9#include <vtkCellData.h>
10#include <vtkDoubleArray.h>
11#include <vtkIdList.h>
12#include <vtkMeshQuality.h>
13#include <vtkOBBTree.h>
14#include <vtkOBJReader.h>
15#include <vtkPLYReader.h>
16#include <vtkPoints.h>
17#include <vtkPolyDataMapper.h>
18#include <vtkPolyDataNormals.h>
19#include <vtkPolyDataReader.h>
20#include <vtkProperty.h>
21#include <vtkRenderWindow.h>
22#include <vtkRenderWindowInteractor.h>
23#include <vtkRenderer.h>
24#include <vtkSTLReader.h>
25#include <vtkSmartPointer.h>
26#include <vtkSphereSource.h>
27#include <vtkXMLPolyDataReader.h>
28
29#include <algorithm>
30#include <array>
31#include <cmath>
32#include <fstream>
33#include <iomanip>
34#include <numbers>
35#include <ostream>
36#include <random>
37#include <string>
38#include <vector>
39#include <vtksys/SystemTools.hxx>
40
41#include "CsrMatrix.h"
42
59class VtkRayCasting
60{
61 private:
62 int m_rows{};
63 int m_cols{};
65 int m_starting_facet{0};
66 int m_num_local_facets{0};
67 std::vector<double> m_solar_irradiation;
73
74 static void vectorSub(const double vector_1[3], const double vector_2[3], double res[3]);
75 static void vectorAdd(const double vector_1[3], const double vector_2[3], double res[3]);
76 static void vectorMult(const double vector_1[3], double mult, double res[3]);
77 static double dotProduct(const double vector_1[3], const double vector_2[3]);
78 static double dotProductInv(const double vector_1[3], const double vector_2[3]);
79 static double l2Norm(double vector_1[3], double vector_2[3]);
80 static void vectorDirection(double vector_1[3], double vector_2[3], double direction[3]);
89 double sol_vec[3], double Q_0, std::vector<double>& Q_sol);
90
92
93 public:
97
99 const std::vector<double>& getSolarIrradiation(double sol_vec[3], double Q_0);
100 int getFacetNumber() const { return m_rows; };
102 std::vector<std::vector<double>> getVertices();
103 std::vector<std::vector<int>> getFaces();
104 std::vector<std::vector<double>> getNormals();
105 std::vector<double> getAreas();
106};
107#endif
108
109#endif
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:37
int getNonZeroElementNumber() const
Definition CsrMatrix.h:80
CsrSparseMatrix()
Constructor for an empty CsrSparseMatrix object. Leaves all storage arrays empty but sets the flag to...
Definition CsrMatrix.h:94
int m_rows
Definition GenericMatrix.h:21
int m_cols
Definition GenericMatrix.h:22