2D Cartesian Domain¶
Specification¶
The 2D Cartesian domain (tracktable::domain::cartesian2d
) concerns
points in a flat 2D space. These points are located with respect to
the origin. Unlike the terrestrial domain, there are no
discontinuities or distinguished points apart from the origin.
Units¶
Position in 2D Cartesian space is denoted (x, y). You, the user, can decide what those axes mean. Without a tie to some underlying physical domain they are purely abstract. Distances in this space are measured in dimensionless units. Speed is measured in units per second.
Module Contents¶
-
class
CartesianPoint2D
: public tracktable::PointCartesian<2>¶ Bare point in flat 2D space.
This class defines a point in 2D Euclidean space using Cartesian coordinates. Units have no real-world interpretation and (unlike the surface of the globe) space is isotropic.
Use this class instead of instantiating the PointCartesian template yourself.
Public Types
-
typedef PointCartesian<2>
Superclass
¶
Public Functions
-
CartesianPoint2D
()¶ Create an uninitialized point.
Assume that the coordinates will be initialized to garbage values when you use this constructor.
-
CartesianPoint2D
(double x, double y)¶ Initialize a point with x, y coordinates.
The coordinates will be initialized to whatever values you specify.
-
CartesianPoint2D
(CartesianPoint2D const &other)¶ Copy constructor: make this point like another.
-
CartesianPoint2D
(Superclass const &other)¶ Initialize this point from its superclass.
If you happen to have PointCartesian<2> instances sitting around, this lets you use them as if they were CartesianPoint2D instances. This is more for the compiler’s benefit than the user’s.
-
virtual
~CartesianPoint2D
()¶ Empty destructor.
All of our resources are on the stack. We don’t have any real work to do here.
-
CartesianPoint2D &
operator=
(CartesianPoint2D const &other)¶ Assignment operator.
We delegate this explicitly to the superclass so that the compiler won’t try to do anything clever like copying pointers.
-
typedef PointCartesian<2>
-
class
CartesianTrajectoryPoint2D
: public tracktable::TrajectoryPoint<CartesianPoint2D>¶ Trajectory point in flat 2D space.
This class defines a point in 2D Euclidean space along with an object ID, timestamp and named properties. Units have no real-world interpretation and (unlike the surface of the globe) space is isotropic.
Use this class instead of instantiating the TrajectoryPoint template yourself. That way the library can present you with a consistent set of units. Also remember that you inherit all the methods of TrajectoryPoint.
Public Types
-
typedef TrajectoryPoint<CartesianPoint2D>
Superclass
¶
Public Functions
-
CartesianTrajectoryPoint2D
()¶ Create an uninitialized point.
Assume that the coordinates will be initialized to garbage values when you use this constructor. The object ID, timestamp and properties will all be empty.
-
CartesianTrajectoryPoint2D
(double x, double y)¶ Initialize a point with x, y, z coordinates.
The coordinates will be initialized to whatever values you specify.
-
CartesianTrajectoryPoint2D
(CartesianTrajectoryPoint2D const &other)¶ Copy constructor: make this point like another.
-
CartesianTrajectoryPoint2D
(Superclass const &other)¶ Initialize this point from its superclass.
If you happen to have TrajectoryPoint<PointCartesian<2>> instances sitting around, this lets you use them as if they were CartesianTrajectoryPoint2D objects. This is more for the compiler’s benefit than the user’s.
-
virtual
~CartesianTrajectoryPoint2D
()¶ Empty destructor.
All of our resources are on the stack. We don’t have any real work to do here.
-
CartesianTrajectoryPoint2D &
operator=
(CartesianTrajectoryPoint2D const &other)¶ Assignment operator.
We delegate this explicitly to the superclass so that the compiler won’t try to do anything clever like copying pointers.
-
typedef TrajectoryPoint<CartesianPoint2D>