50#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_TRANSFORMATION_2D_H
51#define LASS_GUARDIAN_OF_INCLUSION_PRIM_TRANSFORMATION_2D_H
68 template <
typename T,
typename Cascade>
69 class Transformation2DStorage:
public util::ArrayStorage<T, Cascade>
72 Transformation2DStorage(): util::ArrayStorage<T, Cascade>() {}
73 Transformation2DStorage(T* p): util::ArrayStorage<T, Cascade>(p) {}
77 impl::deallocateArray(this->pointer(), 9);
89 typedef Point2D<T> TPoint;
90 typedef typename TPoint::TVector TVector;
91 typedef typename util::CallTraits<T>::TValue TValue;
92 typedef typename util::CallTraits<T>::TParam TParam;
93 typedef typename util::CallTraits<T>::TReference TReference;
94 typedef typename util::CallTraits<T>::TConstReference TConstReference;
95 typedef num::NumTraits<T> TNumTraits;
98 enum { dimension = 2 };
100 template <
typename U>
struct Rebind
106 Transformation2D(
const TPoint& origin,
const TVector& baseX,
const TVector& baseY);
107 template <
typename InputIterator>
Transformation2D(InputIterator first, InputIterator last);
113 bool isIdentity()
const;
114 bool isTranslation()
const;
116 void swap(TSelf& other);
120 static const TSelf
scaler(
const T& scale);
126 enum { matrixSize_ = 9 };
128 typedef util::SharedPtr<TValue, impl::Transformation2DStorage> TMatrix;
132 static const TMatrix& getIdentityMatrix();
135 mutable TMatrix inverseMatrix_;
137 static TMatrix identityMatrix_;
142template <
typename T> Transformation2D<T> concatenate(
const Transformation2D<T>& first,
const Transformation2D<T>& second);
144template <
typename T> Vector2D<T> transform(
const Vector2D<T>& subject,
const Transformation2D<T>& transformation);
145template <
typename T> Point2D<T> transform(
const Point2D<T>& subject,
const Transformation2D<T>& transformation);
146template <
typename T> Vector2D<T> normalTransform(
const Vector2D<T>& subject,
const Transformation2D<T>& transformation);
147template <
typename T> std::pair<Vector2D<T>, T> normalTransform(
const std::pair<Vector2D<T>, T>& subject,
const Transformation2D<T>& transformation);
149template<
typename T,
typename Char,
typename Traits>
150std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& stream,
const Transformation2D<T>& transformation);
164#define LASS_PRIM_HAVE_PY_EXPORT_TRAITS_TRANSFORMATION_2D
165#ifdef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_PLUS_H
169#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_H
Output stream for writing a selection of geometric primitives to XML files.
Lean and mean synchronisation object, without OS support.
implementation details of lass::prim
set of geometrical primitives
Library for Assembled Shared Sources.