extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
928 B

#pragma once
#include <base/primitive.hpp>
#include <subface/simple/plane.hpp>
#include <subface/simple/cylinder_face.hpp>
namespace internal
{
struct cylinder_t final : public primitive {
primitive_type get_type() const override { return PRIMITIVE_TYPE_CYLINDER; };
span<marked_subface_ptr_t<subface>> get_subfaces() const override
{
return {const_cast<marked_subface_ptr_t<subface> *>(subfaces.data()), subfaces.size()};
}
stl_vector_mp<surface_type> get_subface_types() const override
{
return {surface_type::cylinder, surface_type::plane, surface_type::plane};
}
stl_vector_mp<internal::paired_model_matrix_ptr_t> get_subface_init_model_matrices() const override
{
return {plane_to_z_model_matrix_ptr, identity_model_matrix_ptr, plane_to_z_pos_1_model_matrix_ptr};
}
std::array<marked_subface_ptr_t<subface>, 3> subfaces{};
};
} // namespace internal