52 #ifndef CGAL_AFF_TRANSFORMATIONS2_H
53 #define CGAL_AFF_TRANSFORMATIONS2_H
62 #if defined(CGAL_CFG_INCOMPLETE_TYPE_BUG_1) && \
63 !defined(CGAL_NO_LINE_TRANSFORM_IN_AT)
64 #define CGAL_NO_LINE_TRANSFORM_IN_AT
65 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_1
98 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
100 general_form()
const = 0;
116 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
129 template <
class FT >
143 const FT& m21,
const FT& m22)
149 const FT& m21,
const FT& m22,
const FT& m23)
189 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
244 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
269 case 0:
return FT(0);
270 case 1:
return FT(0);
271 case 2:
return FT(1);
277 virtual std::ostream&
print(std::ostream &os)
const
279 os <<
"Aff_transformationS2(" <<
t11 <<
" " <<
t12 <<
" " <<
t13 << std::endl;
280 os <<
" " <<
t21 <<
" " <<
t22 <<
" " <<
t23 <<
")";
289 template <
class FT >
317 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
381 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
396 if (j==i)
return FT(1);
401 virtual std::ostream&
print(std::ostream &os)
const
412 template <
class FT >
472 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
530 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
545 case 2:
return FT(0);
551 case 2:
return FT(0);
555 case 0:
return FT(0);
556 case 1:
return FT(0);
557 case 2:
return FT(1);
563 virtual std::ostream&
print(std::ostream &os)
const
565 os <<
"Aff_transformationS2(" <<
_sinus <<
", " <<
_cosinus <<
")";
574 template <
class FT >
607 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
660 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
674 if (i!=j)
return FT(0);
678 virtual std::ostream&
print(std::ostream &os)
const
689 template <
class FT >
709 const FT&
den = FT(1));
713 const FT& cosine_rho,
714 const FT& hw = FT(1));
719 const FT& w = FT(1));
728 const FT& w = FT(1));
731 const FT& m21,
const FT & m22,
732 const FT& w = FT(1));
745 #ifndef CGAL_NO_LINE_TRANSFORM_IN_AT
748 #endif // CGAL_NO_LINE_TRANSFORM_IN_AT
760 #ifdef CGAL_CFG_INCOMPLETE_TYPE_BUG_3
764 return ptr()->general_form();
789 return (*
ptr()) * (*t.
ptr());
792 #endif // CGAL_CFG_INCOMPLETE_TYPE_BUG_3
794 std::ostream &
print(std::ostream &os)
const;
806 template <
class FT >
810 template <
class FT >
814 template <
class FT >
820 template <
class FT >
833 template <
class FT >
838 template <
class FT >
846 template <
class FT >
858 template <
class FT >
871 template <
class FT >
873 const FT& m11,
const FT & m12,
const FT & m13,
874 const FT& m21,
const FT & m22,
const FT & m23,
879 m21/w, m22/w, m23/w);
885 template <
class FT >
890 template <
class FT >
893 {
return ptr()->transform(p); }
895 template <
class FT >
899 {
return transform(p); }
901 template <
class FT >
904 {
return ptr()->transform(p); }
906 template <
class FT >
910 {
return transform(p); }
912 template <
class FT >
915 {
return ptr()->transform(d); }
917 template <
class FT >
921 {
return transform(d); }
923 #ifndef CGAL_NO_LINE_TRANSFORM_IN_AT
924 template <
class FT >
933 template <
class FT >
937 {
return transform(l); }
938 #endif // CGAL_NO_LINE_TRANSFORM_IN_AT
940 template <
class FT >
944 return ptr()->inverse();
948 template <
class FT >
952 return ! (ptr()->is_even());
956 template <
class FT >
965 #ifndef CGAL_NO_OSTREAM_INSERT_AFF_TRANSFORMATIONS2
966 template <
class FT >
968 operator<<(std::ostream& os, const Aff_transformationS2<FT>& t)
973 #endif // CGAL_NO_OSTREAM_INSERT_AFF_TRANSFORMATIONS2
975 #ifndef CGAL_NO_ISTREAM_EXTRACT_AFF_TRANSFORMATIONS2
976 #endif // CGAL_NO_ISTREAM_EXTRACT_AFF_TRANSFORMATIONS2
982 #endif // CGAL_AFF_TRANSFORMATIONS2_H
virtual FT cartesian(int i, int j) const
Rotation_repS2(const FT &sinus, const FT &cosinus)
DirectionS2< FT > direction() const
Translation_repS2(const VectorS2< FT > &tv)
virtual std::ostream & print(std::ostream &os) const
virtual Aff_transformationS2< FT > compose(const Scaling_repS2< FT > &t) const
DirectionS2< FT > transform(const DirectionS2< FT > &d) const
PointS2< FT > transform(const PointS2< FT > &p) const
Aff_transformationS2< FT > operator*(const Aff_transformation_rep_baseS2< FT > &t)
virtual Aff_transformationS2< FT > compose(const Rotation_repS2< FT > &t) const
Aff_transformationS2< FT > compose(const Translation_repS2< FT > &t) const
CGAL_BEGIN_NAMESPACE Sign sign_of_determinant2x2(const FT &a00, const FT &a01, const FT &a10, const FT &a11)
virtual Aff_transformationS2< FT > compose(const Aff_transformation_repS2< FT > &t) const
Aff_transformationS2< FT > inverse() const
virtual Aff_transformationS2< FT > compose(const Aff_transformation_repS2< FT > &t) const
VectorS2< FT > transform(const VectorS2< FT > &v) const
virtual Aff_transformationS2< FT > compose(const Scaling_repS2< FT > &t) const
Aff_transformationS2< FT > compose(const Translation_repS2< FT > &t) const
virtual FT cartesian(int i, int j) const
CGAL_BEGIN_NAMESPACE void const NT NT NT & cos_num
virtual bool is_even() const
VectorS2< FT > transform(const VectorS2< FT > &v) const
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE typedef Leda_like_handle Handle
DirectionS2< FT > transform(const DirectionS2< FT > &d) const
PointS2< FT > point(int i) const
VectorS2< FT > _translationvector
virtual Aff_transformationS2< FT > compose(const Scaling_repS2< FT > &t) const
VectorS2< FT > vector() const
virtual bool is_even() const
Aff_transformationS2< FT > inverse() const
Aff_transformationS2< FT > compose(const Translation_repS2< FT > &t) const
void rational_rotation_approximation(const double &angle, NT &sin_num, NT &cos_num, NT &denom, const NT &eps_num, const NT &eps_den)
PointS2< FT > transform(const PointS2< FT > &p) const
Aff_transformationS2< FT > operator*(const Aff_transformation_rep_baseS2< FT > &t)
PointS2< FT > transform(const PointS2< FT > &p) const
CGAL_BEGIN_NAMESPACE void const NT NT NT NT const NT const NT & eps_den
double det(const Matrix3D &A)
DirectionS2< FT > transform(const DirectionS2< FT > &d) const
Rotation_repS2(const DirectionS2< FT > &d, const FT &eps_num, const FT &eps_den=FT(1))
Aff_transformationS2< FT > inverse() const
Scaling_repS2(const FT &scalefactor)
virtual std::ostream & print(std::ostream &os) const
CGAL_BEGIN_NAMESPACE void const NT NT & sin_num
virtual std::ostream & print(std::ostream &os) const
#define CGAL_BEGIN_NAMESPACE
virtual FT cartesian(int i, int j) const
virtual bool is_even() const
virtual Aff_transformationS2< FT > compose(const Rotation_repS2< FT > &t) const
virtual Aff_transformationS2< FT > compose(const Aff_transformation_repS2< FT > &t) const
CGAL_BEGIN_NAMESPACE void const NT NT NT NT & denom
#define CGAL_END_NAMESPACE
virtual Aff_transformationS2< FT > compose(const Rotation_repS2< FT > &t) const
Aff_transformationS2< FT > operator*(const Aff_transformation_rep_baseS2< FT > &t)
CGAL_BEGIN_NAMESPACE void const NT NT NT NT const NT & eps_num
VectorS2< FT > transform(const VectorS2< FT > &p) const