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.
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <base/primitive.hpp>
|
|
|
|
#include <subface/simple/sphere_face.hpp>
|
|
|
|
|
|
|
|
namespace internal
|
|
|
|
{
|
|
|
|
struct sphere_t final : primitive {
|
|
|
|
primitive_type get_type() const override { return PRIMITIVE_TYPE_SPHERE; };
|
|
|
|
|
|
|
|
span<marked_subface_ptr_t<subface>> get_subfaces() const override
|
|
|
|
{
|
|
|
|
return {const_cast<marked_subface_ptr_t<subface> *>(&sphere_face), 1};
|
|
|
|
}
|
|
|
|
|
|
|
|
stl_vector_mp<surface_type> get_subface_types() const override { return {surface_type::sphere}; }
|
|
|
|
|
|
|
|
stl_vector_mp<internal::paired_model_matrix_ptr_t> get_subface_init_model_matrices() const override
|
|
|
|
{
|
|
|
|
return {identity_model_matrix_ptr};
|
|
|
|
}
|
|
|
|
|
|
|
|
marked_subface_ptr_t<subface> sphere_face{};
|
|
|
|
};
|
|
|
|
} // namespace internal
|