Class with methods for projection of vectors on a plane. More...
#include <Decomposer.h>
Public Types | |
using | AffinePlaneBase_t = AffinePlaneBase< Vector, Point > |
using | DecomposedVector_t = DecomposedVector< ProjVector > |
Type of decomposed vector. More... | |
using | Point_t = typename AffinePlaneBase_t::Point_t |
Type for a point. More... | |
using | Vector_t = typename AffinePlaneBase_t::Vector_t |
Type for a vector. More... | |
using | Projection_t = typename DecomposedVector_t::Projection_t |
Type representing the projection vector. More... | |
using | Distance_t = typename DecomposedVector_t::Distance_t |
Type representing the signed distance from the projection plane. More... | |
Public Member Functions | |
PlaneDecomposer () | |
Default constructor: projection on (x,y) with origin (0, 0, 0) More... | |
PlaneDecomposer (AffinePlaneBase_t &&base) | |
Constructor: specifies a base (an origin and two direction vectors) More... | |
PlaneDecomposer (AffinePlaneBase_t const &base) | |
Constructor: specifies a base (an origin and two direction vectors) More... | |
Setters | |
void | SetBase (AffinePlaneBase_t &&base) |
Change projection base. More... | |
void | SetBase (AffinePlaneBase_t const &base) |
Change projection base. More... | |
void | SetOrigin (Point_t const &point) |
Change the 3D point of the reference frame origin. More... | |
void | SetMainDir (Vector_t const &dir) |
Change the main direction of the projection base. More... | |
void | SetSecondaryDir (Vector_t const &dir) |
Change the secondary direction of the projection base. More... | |
Reference point and base | |
Point_t | ReferencePoint () const |
Returns the reference point for the plane coordinate, as a 3D point. More... | |
Vector_t const & | MainDir () const |
Returns the plane main axis direction. More... | |
Vector_t const & | SecondaryDir () const |
Returns the plane secondary axis direction. More... | |
AffinePlaneBase_t const & | Base () const |
Returns the complete base representation. More... | |
Projection coordinate access | |
These methods act on 2D (vector) projections. | |
auto | MainComponent (Projection_t const &v) const |
Returns the main component of a projection vector. More... | |
auto | SecondaryComponent (Projection_t const &v) const |
Returns the secondary component of a projection vector. More... | |
Projection on plane | |
auto | PointMainComponent (Point_t const &point) const |
Returns the main component of a 3D point. More... | |
auto | PointSecondaryComponent (Point_t const &point) const |
Returns the secondary component of a 3D point. More... | |
Projection_t | PointProjection (Point_t const &point) const |
Returns the projection of the specified point on the plane. More... | |
auto | VectorMainComponent (Vector_t const &v) const |
Returns the main component of a projection vector. More... | |
auto | VectorSecondaryComponent (Vector_t const &v) const |
Returns the secondary component of a projection vector. More... | |
Projection_t | VectorProjection (Vector_t const &v) const |
Returns the projection of the specified vector on the plane. More... | |
double | Angle (Vector_t const &v) const |
Returns the angle of the projection from main direction. More... | |
Composition from plane to 3D | |
Vector_t | ComposeVector (Projection_t const &projection) const |
Returns the 3D vector from the specified projection. More... | |
Point_t | ComposePoint (Projection_t const &projection) const |
Returns the 3D point from the specified projection. More... | |
Private Attributes | |
AffinePlaneBase_t | fPlaneBase |
Reference base. More... | |
Class with methods for projection of vectors on a plane.
Vector | type to represent 3D vectors |
Point | type to represent 3D points |
ProjVector | type to represent 2D projection on plane |
These methods deal with projection of points and vectors on a plane.
The plane is defined in a 3D space, with two axes, the "main" and the "auxiliary" one, which are orthogonal.
Definition at line 179 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::AffinePlaneBase_t = AffinePlaneBase<Vector, Point> |
Definition at line 183 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::DecomposedVector_t = DecomposedVector<ProjVector> |
Type of decomposed vector.
Definition at line 186 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::Distance_t = typename DecomposedVector_t::Distance_t |
Type representing the signed distance from the projection plane.
Definition at line 198 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::Point_t = typename AffinePlaneBase_t::Point_t |
Type for a point.
Definition at line 189 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::Projection_t = typename DecomposedVector_t::Projection_t |
Type representing the projection vector.
Definition at line 195 of file Decomposer.h.
using geo::PlaneDecomposer< Vector, Point, ProjVector >::Vector_t = typename AffinePlaneBase_t::Vector_t |
Type for a vector.
Definition at line 192 of file Decomposer.h.
|
inline |
Default constructor: projection on (x,y) with origin (0, 0, 0)
Definition at line 202 of file Decomposer.h.
|
inline |
Constructor: specifies a base (an origin and two direction vectors)
Definition at line 211 of file Decomposer.h.
|
inline |
Constructor: specifies a base (an origin and two direction vectors)
Definition at line 214 of file Decomposer.h.
|
inline |
Returns the angle of the projection from main direction.
v | vector to get the angle of |
The projection on the plane is taken, and its angle from the main direction is returned. That angle is defined in the range , so that it is 0 for a projection matching the main direction and for one matching the secondary direction.
Definition at line 328 of file Decomposer.h.
|
inline |
Returns the complete base representation.
Definition at line 250 of file Decomposer.h.
|
inline |
Returns the 3D point from the specified projection.
projection | the projection vector on the plane |
The returned point is the 3D representation in space of the point of the plane described by the specified projection. The null projection is composed into the reference point returned by ReferencePoint().
Definition at line 369 of file Decomposer.h.
|
inline |
Returns the 3D vector from the specified projection.
projection | the projection vector on the plane |
The returned vector is the 3D representation in space of the point of the plane described by the specified projection. The null projection is composed into a null vector.
Definition at line 351 of file Decomposer.h.
|
inline |
Returns the main component of a projection vector.
Definition at line 262 of file Decomposer.h.
|
inline |
Returns the plane main axis direction.
Definition at line 244 of file Decomposer.h.
|
inline |
Returns the main component of a 3D point.
Definition at line 274 of file Decomposer.h.
|
inline |
Returns the projection of the specified point on the plane.
point | the 3D point to be projected, in world coordinates |
The returned vector is a 2D vector expressing the projection of the point (from world coordinates) on the plane. The vector is expressed as , components following the main and the secondary direction, respectively. The origin point is the one returned by ReferencePoint()
.
Definition at line 292 of file Decomposer.h.
|
inline |
Returns the secondary component of a 3D point.
Definition at line 278 of file Decomposer.h.
|
inline |
Returns the reference point for the plane coordinate, as a 3D point.
Definition at line 241 of file Decomposer.h.
|
inline |
Returns the secondary component of a projection vector.
Definition at line 265 of file Decomposer.h.
|
inline |
Returns the plane secondary axis direction.
Definition at line 247 of file Decomposer.h.
|
inline |
Change projection base.
Definition at line 220 of file Decomposer.h.
|
inline |
Change projection base.
Definition at line 223 of file Decomposer.h.
|
inline |
Change the main direction of the projection base.
Definition at line 229 of file Decomposer.h.
|
inline |
Change the 3D point of the reference frame origin.
Definition at line 226 of file Decomposer.h.
|
inline |
Change the secondary direction of the projection base.
Definition at line 232 of file Decomposer.h.
|
inline |
Returns the main component of a projection vector.
Definition at line 297 of file Decomposer.h.
|
inline |
Returns the projection of the specified vector on the plane.
v | the 3D vector to be projected, in world units |
The returned vector is a 2D vector expressing the projection of the vector (from world units) on the plane. The vector is expressed as , components following the main and the secondary direction, respectively.
Definition at line 314 of file Decomposer.h.
|
inline |
Returns the secondary component of a projection vector.
Definition at line 301 of file Decomposer.h.
|
private |
Reference base.
Definition at line 375 of file Decomposer.h.