add quadmesh

This commit is contained in:
AndreaRigoni
2026-03-14 10:28:16 +00:00
parent 6bf9eaf309
commit 20d4967356
13 changed files with 600 additions and 14 deletions

57
src/Math/QuadMesh.h Normal file
View File

@@ -0,0 +1,57 @@
/*//////////////////////////////////////////////////////////////////////////////
// CMT Cosmic Muon Tomography project //////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
All rights reserved
Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
------------------------------------------------------------------
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library.
//////////////////////////////////////////////////////////////////////////////*/
#ifndef QUADMESH_H
#define QUADMESH_H
#include <vector>
#include "Math/Dense.h"
namespace uLib {
class QuadMesh
{
public:
void PrintSelf(std::ostream &o);
void AddPoint(const Vector3f &pt);
void AddQuad(const Id_t *id);
void AddQuad(const Vector4i &id);
inline std::vector<Vector3f> & Points() { return this->m_Points; }
inline std::vector<Vector4i> & Quads() { return this->m_Quads; }
private:
std::vector<Vector3f> m_Points;
std::vector<Vector4i> m_Quads;
};
}
#endif // QUADMESH_H