![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
2D Vector More...
#include <CVGeom.h>

Public Member Functions | |
| std::size_t | rows () const |
| std::size_t | dimensions () const |
| Type * | data () |
| const Type * | data () const |
| Vector2Tpl (Type s=0) | |
| Default constructor. More... | |
| Vector2Tpl (Type _x, Type _y) | |
| Constructor from a couple of coordinates. More... | |
| Type | norm2 () const |
| Returns vector square norm. More... | |
| Type | norm () const |
| Returns vector norm. More... | |
| void | normalize () |
| Sets vector norm to unity. More... | |
| Type | dot (const Vector2Tpl &v) const |
| Dot product. More... | |
| Type | cross (const Vector2Tpl &v) const |
| Cross product. More... | |
| Vector2Tpl & | operator- () |
| Inverse operator. More... | |
| Vector2Tpl & | operator+= (const Vector2Tpl &v) |
| In-place addition operator. More... | |
| Vector2Tpl & | operator-= (const Vector2Tpl &v) |
| In-place subtraction operator. More... | |
| Vector2Tpl & | operator*= (Type v) |
| In-place multiplication (by a scalar) operator. More... | |
| Vector2Tpl & | operator/= (Type v) |
| In-place division (by a scalar) operator. More... | |
| Vector2Tpl | operator+ (const Vector2Tpl &v) const |
| Addition operator. More... | |
| Vector2Tpl | operator- (const Vector2Tpl &v) const |
| Subtraction operator. More... | |
| Vector2Tpl | operator* (Type s) const |
| Multiplication operator. More... | |
| Vector2Tpl | operator/ (Type s) const |
| Division operator. More... | |
| Type & | operator[] (unsigned i) |
| Direct coordinate access. More... | |
| const Type & | operator[] (unsigned i) const |
| Direct coordinate access (const) More... | |
Public Attributes | |
| union { | |
| struct { | |
| Type x | |
| Type y | |
| } | |
| Type u [2] | |
| }; | |
|
inlineexplicit |
Default constructor.
Inits vector to (0,0).
| s | default init value for both coordinates |
Definition at line 51 of file CVGeom.h.
Referenced by Vector2Tpl< Type >::operator*(), Vector2Tpl< Type >::operator+(), Vector2Tpl< Type >::operator-(), and Vector2Tpl< Type >::operator/().
|
inline |
|
inline |
Cross product.
Definition at line 76 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by cloudViewer::PointProjectionTools::segmentIntersect().
|
inline |
Definition at line 44 of file CVGeom.h.
References Vector2Tpl< Type >::u.
|
inline |
Definition at line 45 of file CVGeom.h.
References Vector2Tpl< Type >::u.
|
inline |
Definition at line 42 of file CVGeom.h.
Referenced by Vector2Tpl< Type >::rows().
|
inline |
Dot product.
Definition at line 71 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by Classifier::classify2D_checkcondnum(), cloudViewer::DistanceComputationTools::ComputeSquareDistToSegment(), DilateClassifier(), FindNearestCandidate(), and cloudViewer::PointProjectionTools::segmentIntersect().
|
inline |
Returns vector norm.
Definition at line 63 of file CVGeom.h.
References Vector2Tpl< Type >::norm2().
Referenced by Classifier::classify2D_checkcondnum(), and cloudViewer::PointProjectionTools::segmentIntersect().
|
inline |
Returns vector square norm.
Definition at line 61 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
Referenced by Classifier::classify2D_checkcondnum(), cloudViewer::DistanceComputationTools::ComputeSquareDistToSegment(), FindNearestCandidate(), Vector2Tpl< Type >::norm(), and Vector2Tpl< Type >::normalize().
|
inline |
Sets vector norm to unity.
Definition at line 65 of file CVGeom.h.
References Vector2Tpl< Type >::norm2().
Referenced by Classifier::classify2D_checkcondnum(), DilateClassifier(), and qCanupoTools::TrainClassifier().
|
inline |
Multiplication operator.
Definition at line 117 of file CVGeom.h.
References Vector2Tpl< Type >::Vector2Tpl(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
In-place multiplication (by a scalar) operator.
Definition at line 97 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
Addition operator.
Definition at line 109 of file CVGeom.h.
References Vector2Tpl< Type >::Vector2Tpl(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
In-place addition operator.
Definition at line 85 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
Inverse operator.
Definition at line 79 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
Subtraction operator.
Definition at line 113 of file CVGeom.h.
References Vector2Tpl< Type >::Vector2Tpl(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
In-place subtraction operator.
Definition at line 91 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
Division operator.
Definition at line 121 of file CVGeom.h.
References Vector2Tpl< Type >::Vector2Tpl(), Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
In-place division (by a scalar) operator.
Definition at line 103 of file CVGeom.h.
References Vector2Tpl< Type >::x, and Vector2Tpl< Type >::y.
|
inline |
Direct coordinate access.
Definition at line 125 of file CVGeom.h.
References Vector2Tpl< Type >::u.
|
inline |
Direct coordinate access (const)
Definition at line 127 of file CVGeom.h.
References Vector2Tpl< Type >::u.
|
inline |
Definition at line 41 of file CVGeom.h.
References Vector2Tpl< Type >::dimensions().
| union { ... } |
| Type Vector2Tpl< Type >::u[2] |
Definition at line 38 of file CVGeom.h.
Referenced by ccRasterGrid::computeCellCenter(), Vector2Tpl< Type >::data(), and Vector2Tpl< Type >::operator[]().
| Type Vector2Tpl< Type >::x |
Definition at line 36 of file CVGeom.h.
Referenced by cloudViewer::Delaunay2dMesh::buildMesh(), Classifier::checkRefPoints(), Classifier::classify2D_checkcondnum(), DistanceMapGenerationTool::CreateMap(), Vector2Tpl< Type >::cross(), cloudViewer::GeometricalAnalysisTools::DetectCircle(), DilateClassifier(), Vector2Tpl< Type >::dot(), ccContourExtractor::ExtractConcaveHull2D(), cloudViewer::PointProjectionTools::extractConcaveHull2D(), FindNearestCandidate(), cloudViewer::ManualSegmentationTools::isPointInsidePoly(), Landau_Smith(), LexicographicSort(), ProfileLoader::Load(), Classifier::Load(), ecvGenericCameraTool::CameraInfo::loadConfig(), Vector2Tpl< Type >::norm2(), Vector2Tpl< Type >::operator*(), Vector2Tpl< Type >::operator*=(), Vector2Tpl< Type >::operator+(), Vector2Tpl< Type >::operator+=(), Vector2Tpl< Type >::operator-(), Vector2Tpl< Type >::operator-=(), Vector2Tpl< Type >::operator/(), Vector2Tpl< Type >::operator/=(), Classifier::project(), cloudViewer::geometry::pybind_primitives(), Classifier::save(), MascaretFilter::saveToFile(), PdmsTools::PdmsObjects::Vertex::setPosition(), ToLocalAbscissa(), ecvGenericCameraTool::CameraInfo::toString(), qCanupo2DViewDialog::trainClassifier(), and qCanupoTools::TrainClassifier().
| Type Vector2Tpl< Type >::y |
Definition at line 36 of file CVGeom.h.
Referenced by cloudViewer::Delaunay2dMesh::buildMesh(), Classifier::checkRefPoints(), Classifier::classify2D_checkcondnum(), DistanceMapGenerationTool::CreateMap(), Vector2Tpl< Type >::cross(), cloudViewer::GeometricalAnalysisTools::DetectCircle(), DilateClassifier(), Vector2Tpl< Type >::dot(), ccContourExtractor::ExtractConcaveHull2D(), cloudViewer::PointProjectionTools::extractConcaveHull2D(), FindNearestCandidate(), cloudViewer::ManualSegmentationTools::isPointInsidePoly(), Landau_Smith(), LexicographicSort(), ProfileLoader::Load(), Classifier::Load(), ecvGenericCameraTool::CameraInfo::loadConfig(), Vector2Tpl< Type >::norm2(), Vector2Tpl< Type >::operator*(), Vector2Tpl< Type >::operator*=(), Vector2Tpl< Type >::operator+(), Vector2Tpl< Type >::operator+=(), Vector2Tpl< Type >::operator-(), Vector2Tpl< Type >::operator-=(), Vector2Tpl< Type >::operator/(), Vector2Tpl< Type >::operator/=(), Classifier::project(), cloudViewer::geometry::pybind_primitives(), Classifier::save(), MascaretFilter::saveToFile(), PdmsTools::PdmsObjects::Vertex::setPosition(), ToLocalAbscissa(), ecvGenericCameraTool::CameraInfo::toString(), qCanupo2DViewDialog::trainClassifier(), and qCanupoTools::TrainClassifier().