18#include <lagrange/MeshGeometry.h>
19#include <lagrange/common.h>
20#include <lagrange/utils/safe_cast.h>
23template <
typename _VertexArray,
typename _FacetArray>
28 using VertexArray =
typename Parent::VertexArray;
29 using FacetArray =
typename Parent::FacetArray;
30 using VertexType =
typename Parent::VertexType;
31 using Scalar =
typename Parent::Scalar;
32 using Index =
typename Parent::Index;
35 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
38 : m_vertices(vertices)
44 virtual Index get_dim()
const override {
return safe_cast<Index>(m_vertices.cols()); }
46 virtual Index get_num_vertices()
const override {
return safe_cast<Index>(m_vertices.rows()); }
48 virtual Index get_num_facets()
const override {
return safe_cast<Index>(m_facets.rows()); }
50 virtual Index get_vertex_per_facet()
const override
52 return safe_cast<Index>(m_facets.cols());
55 virtual const VertexArray& get_vertices()
const override {
return m_vertices; }
57 virtual const FacetArray& get_facets()
const override {
return m_facets; }
59 virtual VertexArray& get_vertices_ref()
override {
return m_vertices; }
61 virtual FacetArray& get_facets_ref()
override {
return m_facets; }
64 VertexArray& get_vertices() {
return m_vertices; }
66 FacetArray& get_facets() {
return m_facets; }
69 VertexArray m_vertices;
73template <
typename _VertexArray,
typename _FacetArray,
typename Archive>
77 geometry = std::make_shared<GenuineMeshGeometry<_VertexArray, _FacetArray>>();
79 geometry->serialize_impl(ar);
Definition: GenuineMeshGeometry.h:25
Definition: MeshGeometry.h:25
Main namespace for Lagrange.
Definition: AABBIGL.h:30