![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
interior_typeBoost , Chapter 1. Geometry , Core Metafunctions
|
Параметр |
Описание |
---|---|
Имя типа Геометрия | Тип, заполняющий концепцию многоугольника. |
Либо
#include <boost/geometry.hpp>
Либо
#include <boost/geometry/core/interior_type.hpp>
Время компиляции
Как использовать метафункцию Interior_type
#include <iostream> #include <typeinfo> #include <boost/geometry.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/geometries/ring.hpp> #include <boost/geometry/geometries/adapted/boost_array.hpp> BOOST_GEOMETRY_REGISTER_BOOST_ARRAY_CS(cs::cartesian) int main() { // Define a polygon storing points in a deque and storing interior rings // in a list (note that std::list is not supported by most algorithms // because not supporting a random access iterator) typedef boost::geometry::model::polygon < boost::array<short, 3>, true, true, std::deque, std::list > polygon; std::cout << typeid(boost::geometry::interior_type<polygon>::type).name() << std::endl; return 0; }
Выход (с использованием MSVC) - это длинная история (часть вручную заменена эллипсом):
class std::list<class boost::geometry::model::ring<class boost::array<short,3>,1,1,class std::deque,class std::allocator>,class std::allocator<...> > >
Статья interior_type раздела Chapter 1. Geometry Core Metafunctions может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.
:: Главная :: Core Metafunctions ::
реклама |