#pragma once #include #include "primitive/simple/sphere.hpp" #include "primitive/simple/cylinder.hpp" template using surface_container_t = tagged_hashed_refcount_hive_mp; using plane_container_t = surface_container_t; using sphere_container_t = surface_container_t; using cylinder_container_t = surface_container_t; EXTERN_C struct PE_API primitive_data_center_t { primitive_data_center_t() noexcept; ~primitive_data_center_t() noexcept; hashed_refcount_hive_mp transform_blocks{}; // all other data depend on cached transform_blocks using surface_containers = std::variant; std::array(surface_type::max_count)> surfaces{}; auto require_transform_block(const internal::paired_model_matrix& matrix) -> internal::paired_model_matrix_ptr_t; void require_surface(surface_type type, const internal::paired_model_matrix_ptr_t& matrix, marked_subface_ptr_t& subface); void release_transform_block(const internal::paired_model_matrix& matrix); void release_surface(surface_type type, const marked_subface_ptr_t& subface); }; namespace internal { PE_API primitive* new_primitive(primitive_type type); PE_API primitive* copy_primitive(primitive* ptr); } // namespace internal