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.
31 lines
928 B
31 lines
928 B
#pragma once
|
|
|
|
#include <base/primitive.hpp>
|
|
#include <subface/simple/sphere_face.hpp>
|
|
|
|
namespace internal
|
|
{
|
|
struct sphere_t final : primitive {
|
|
sphere_t(primitive_data_center_t *data_center_ptr) : primitive(data_center_ptr)
|
|
{
|
|
initialize({identity_model_matrix_ptr}, {false}, stl_vector_mp<const void *>{}, k_aabb_unit);
|
|
}
|
|
|
|
primitive_type get_type() const override { return PRIMITIVE_TYPE_SPHERE; };
|
|
|
|
stl_vector_mp<const void *> get_subface_geometries() const override
|
|
{
|
|
// sphere 没有 descriptor,返回 nullptr
|
|
return {nullptr};
|
|
}
|
|
|
|
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}; }
|
|
|
|
marked_subface_ptr_t<subface> sphere_face{};
|
|
};
|
|
} // namespace internal
|