16#ifndef ROOT_Math_GenVector_PositionVector2D
17#define ROOT_Math_GenVector_PositionVector2D 1
49 template <
class CoordSystem,
class Tag = DefaultCoordinateSystemTag >
54 typedef typename CoordSystem::Scalar
Scalar;
93 template <
class ForeignVector>
104 template <
class OtherCoords>
114 template <
class OtherCoords>
125 template <
class ForeignVector>
257 template<
class OtherCoords >
259 return X()*
v.x() +
Y()*
v.y();
270 template <
class OtherCoords>
280 template <
class OtherCoords>
341 static constexpr unsigned int fDimension = CoordinateType::Dimension;
347 template <
class OtherCoords,
class OtherTag>
350 template <
class OtherCoords,
class OtherTag>
353 template <
class OtherCoords,
class OtherTag>
356 template <
class OtherCoords,
class OtherTag>
359 template <
class OtherCoords,
class OtherTag>
362 template <
class OtherCoords,
class OtherTag>
381 template <
class CoordSystem,
class U>
398 template <
class CoordSystem1,
class CoordSystem2,
class U>
400 DisplacementVector2D<CoordSystem1,U>
413 template <
class CoordSystem1,
class CoordSystem2,
class U>
415 PositionVector2D<CoordSystem2,U>
426 template <
class CoordSystem1,
class CoordSystem2,
class U>
428 PositionVector2D<CoordSystem2,U>
439 template <
class CoordSystem1,
class CoordSystem2,
class U>
441 PositionVector2D<CoordSystem2,U>
451 template<
class char_t,
class traits_t,
class T,
class U >
453 std::basic_ostream<char_t,traits_t> &
454 operator << ( std::basic_ostream<char_t,traits_t> & os
455 , PositionVector2D<T,U>
const &
v
460 typename T::Scalar
a,
b;
465 typedef GenVector_detail::BitReproducible BR;
480 template<
class char_t,
class traits_t,
class T,
class U >
482 std::basic_istream<char_t,traits_t> &
489 typename T::Scalar
a,
b;
504 v.SetCoordinates(
a,
b);
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint angle
Class describing a 2D cartesian coordinate system (x, y coordinates)
Class describing a generic displacement vector in 2 dimensions.
Class describing a generic position vector (point) in 2 dimensions.
PositionVector2D< CoordSystem, Tag > & SetX(Scalar a)
Change X - Cartesian2D coordinates only.
Scalar Mag2() const
Magnitute squared ( r^2 in spherical coordinate)
bool operator!=(const PositionVector2D &rhs) const
PositionVector2D & operator-=(const DisplacementVector2D< OtherCoords, OtherTag > &)
void GetCoordinates(Scalar &a, Scalar &b) const
get internal data into 2 Scalar numbers.
PositionVector2D & operator=(const PositionVector2D< OtherCoords, Tag > &v)
Assignment operator from a position vector of arbitrary type.
Scalar R() const
Polar R, converting if necessary from internal coordinate system.
constexpr PositionVector2D(const Scalar &a, const Scalar &b)
Construct from three values of type Scalar.
constexpr PositionVector2D(const DisplacementVector2D< T, Tag > &p)
Construct from an arbitrary displacement vector.
PositionVector2D & operator=(const DisplacementVector2D< OtherCoords, OtherTag > &)
void Rotate(Scalar angle)
Rotate by an angle.
Scalar Dot(const DisplacementVector2D< OtherCoords, Tag > &v) const
Return the scalar (Dot) product of this with a displacement vector in any coordinate system,...
PositionVector2D & operator=(const PositionVector2D< OtherCoords, OtherTag > &)
const CoordSystem & Coordinates() const
Retrieve a copy of the coordinates object.
PositionVector2D< CoordSystem, Tag > & SetY(Scalar a)
Change Y - Cartesian2D coordinates only.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
PositionVector2D< CoordSystem, Tag > & SetPhi(Scalar ang)
Change Phi - Polar2D coordinates.
PositionVector2D< CoordSystem, Tag > & SetXY(Scalar a, Scalar b)
set the values of the vector from the cartesian components (x,y) (if the vector is held in polar coor...
PositionVector2D< CoordSystem, Tag > & SetCoordinates(Scalar a, Scalar b)
Set internal data based on 2 Scalar numbers.
PositionVector2D operator*(Scalar a) const
Multiply a vector by a real number.
PositionVector2D operator/(Scalar a) const
Division of a vector with a real number.
PositionVector2D & operator-=(const DisplacementVector2D< OtherCoords, Tag > &v)
Self Difference with a displacement vector.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
unsigned int Dimension() const
Dimension.
PositionVector2D & operator+=(const DisplacementVector2D< OtherCoords, OtherTag > &)
static constexpr unsigned int fDimension
constexpr PositionVector2D(const DisplacementVector2D< OtherCoords, OtherTag > &)
constexpr PositionVector2D(const ForeignVector &v)
Construct from a foreign 2D vector type, for example, Hep2Vector Precondition: v must implement metho...
PositionVector2D & operator/=(Scalar a)
divide this vector by a scalar quantity
bool operator==(const PositionVector2D &rhs) const
Exact equality.
Scalar Phi() const
Polar phi, converting if necessary from internal coordinate system.
PositionVector2D< CoordSystem, Tag > & SetR(Scalar a)
Change R - Polar2D coordinates only.
PositionVector2D & operator+=(const DisplacementVector2D< OtherCoords, Tag > &v)
Self Addition with a displacement vector.
CoordSystem CoordinateType
CoordSystem::Scalar Scalar
constexpr PositionVector2D(const PositionVector2D< T, Tag > &v)
Construct from a position vector expressed in different coordinates, or using a different Scalar type...
PositionVector2D & operator*=(Scalar a)
multiply this vector by a scalar quantity
constexpr PositionVector2D()
Default constructor.
constexpr PositionVector2D(const PositionVector2D< OtherCoords, OtherTag > &)
Namespace for new Math classes and functions.
char_t get_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m)
std::basic_istream< char_t, traits_t > & require_delim(std::basic_istream< char_t, traits_t > &is, manip_t m)
void set_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m, char_t ch)
std::basic_istream< char_t, traits_t > & operator>>(std::basic_istream< char_t, traits_t > &is, DisplacementVector2D< T, U > &v)
DisplacementVector2D< CoordSystem1, U > operator+(DisplacementVector2D< CoordSystem1, U > v1, const DisplacementVector2D< CoordSystem2, U > &v2)
Addition of DisplacementVector2D vectors.
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
AxisAngle operator*(RotationX const &r1, AxisAngle const &r2)
Multiplication of an axial rotation by an AxisAngle.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...