|
| 1 | +/* |
| 2 | + * Copyright (c) 2019 - 2025 Geode-solutions |
| 3 | + * |
| 4 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | + * of this software and associated documentation files (the "Software"), to deal |
| 6 | + * in the Software without restriction, including without limitation the rights |
| 7 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | + * copies of the Software, and to permit persons to whom the Software is |
| 9 | + * furnished to do so, subject to the following conditions: |
| 10 | + * |
| 11 | + * The above copyright notice and this permission notice shall be included in |
| 12 | + * all copies or substantial portions of the Software. |
| 13 | + * |
| 14 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 | + * SOFTWARE. |
| 21 | + * |
| 22 | + */ |
| 23 | + |
| 24 | +#include <geode/geometry/basic_objects/ellipse.hpp> |
| 25 | + |
| 26 | +namespace geode |
| 27 | +{ |
| 28 | + template < typename PointType, typename FrameType, index_t dimension > |
| 29 | + GenericEllipse< PointType, FrameType, dimension >::GenericEllipse( |
| 30 | + PointType center, FrameType axes ) |
| 31 | + : center_( std::move( center ) ), axes_( std::move( axes ) ) |
| 32 | + { |
| 33 | + } |
| 34 | + template < typename PointType, typename FrameType, index_t dimension > |
| 35 | + GenericEllipse< PointType, FrameType, dimension >::GenericEllipse( |
| 36 | + const GenericEllipse< PointType, FrameType, dimension >& ) = default; |
| 37 | + template < typename PointType, typename FrameType, index_t dimension > |
| 38 | + GenericEllipse< PointType, FrameType, dimension >& |
| 39 | + GenericEllipse< PointType, FrameType, dimension >::operator=( |
| 40 | + const GenericEllipse< PointType, FrameType, dimension >& ) = |
| 41 | + default; |
| 42 | + template < typename PointType, typename FrameType, index_t dimension > |
| 43 | + GenericEllipse< PointType, FrameType, dimension >::GenericEllipse( |
| 44 | + GenericEllipse< PointType, FrameType, dimension >&& ) noexcept = |
| 45 | + default; |
| 46 | + |
| 47 | + template < typename PointType, typename FrameType, index_t dimension > |
| 48 | + GenericEllipse< PointType, FrameType, dimension >& |
| 49 | + GenericEllipse< PointType, FrameType, dimension >::operator=( |
| 50 | + GenericEllipse< PointType, FrameType, dimension >&& ) noexcept = |
| 51 | + default; |
| 52 | + |
| 53 | + template < typename PointType, typename FrameType, index_t dimension > |
| 54 | + const Point< dimension >& |
| 55 | + GenericEllipse< PointType, FrameType, dimension >::center() const |
| 56 | + { |
| 57 | + return center_; |
| 58 | + } |
| 59 | + template < typename PointType, typename FrameType, index_t dimension > |
| 60 | + const Frame< dimension >& |
| 61 | + GenericEllipse< PointType, FrameType, dimension >::axes() const |
| 62 | + { |
| 63 | + return axes_; |
| 64 | + } |
| 65 | + |
| 66 | + template < index_t dimension > |
| 67 | + OwnerEllipse< dimension >::OwnerEllipse( |
| 68 | + Point< dimension > center, Frame< dimension > axes ) |
| 69 | + : Base( std::move( center ), std::move( axes ) ) |
| 70 | + { |
| 71 | + } |
| 72 | + template < index_t dimension > |
| 73 | + OwnerEllipse< dimension >::OwnerEllipse( |
| 74 | + const OwnerEllipse< dimension >& ) = default; |
| 75 | + template < index_t dimension > |
| 76 | + OwnerEllipse< dimension >& OwnerEllipse< dimension >::operator=( |
| 77 | + const OwnerEllipse< dimension >& ) = default; |
| 78 | + template < index_t dimension > |
| 79 | + OwnerEllipse< dimension >::OwnerEllipse( |
| 80 | + OwnerEllipse< dimension >&& ) noexcept = default; |
| 81 | + template < index_t dimension > |
| 82 | + OwnerEllipse< dimension >& OwnerEllipse< dimension >::operator=( |
| 83 | + OwnerEllipse< dimension >&& ) noexcept = default; |
| 84 | + |
| 85 | + template < index_t dimension > |
| 86 | + Ellipse< dimension >::Ellipse( |
| 87 | + const Point< dimension >& center, const Frame< dimension >& axes ) |
| 88 | + : Base( center, axes ) |
| 89 | + { |
| 90 | + } |
| 91 | + template < index_t dimension > |
| 92 | + Ellipse< dimension >::Ellipse( const Ellipse< dimension >& ) = default; |
| 93 | + template < index_t dimension > |
| 94 | + Ellipse< dimension >::Ellipse( const OwnerEllipse< dimension >& other ) |
| 95 | + : Base( other.center(), other.axes() ) |
| 96 | + { |
| 97 | + } |
| 98 | + template < index_t dimension > |
| 99 | + Ellipse< dimension >& Ellipse< dimension >::operator=( |
| 100 | + const Ellipse< dimension >& ) = default; |
| 101 | + template < index_t dimension > |
| 102 | + Ellipse< dimension >::Ellipse( Ellipse< dimension >&& ) noexcept = default; |
| 103 | + template < index_t dimension > |
| 104 | + Ellipse< dimension >& Ellipse< dimension >::operator=( |
| 105 | + Ellipse< dimension >&& ) noexcept = default; |
| 106 | + |
| 107 | + template class opengeode_geometry_api |
| 108 | + GenericEllipse< Point< 2 >, Frame< 2 >, 2 >; |
| 109 | + template class opengeode_geometry_api |
| 110 | + GenericEllipse< Point< 3 >, Frame< 3 >, 3 >; |
| 111 | + template class opengeode_geometry_api |
| 112 | + GenericEllipse< RefPoint< 2 >, RefFrame< 2 >, 2 >; |
| 113 | + template class opengeode_geometry_api |
| 114 | + GenericEllipse< RefPoint< 3 >, RefFrame< 3 >, 3 >; |
| 115 | + template class opengeode_geometry_api OwnerEllipse< 2 >; |
| 116 | + template class opengeode_geometry_api OwnerEllipse< 3 >; |
| 117 | + template class opengeode_geometry_api Ellipse< 2 >; |
| 118 | + template class opengeode_geometry_api Ellipse< 3 >; |
| 119 | +} // namespace geode |
0 commit comments