![]() |
Radium Engine
1.7.0
|
#include <Core/Geometry/PolyLine.hpp>
Collaboration diagram for Ra::Core::Geometry::PolyLine:Public Member Functions | |
| PolyLine (const Vector3Array &pt) | |
| Create a polyline from a given set of points. | |
| const Vector3Array & | getPoints () const |
| Get the point vector. | |
| void | getSegment (uint segment, Vector3 &aOut, Vector3 &abOut) const |
| Get the ith segment AB as starting point A and vector AB. | |
| const Vector3Array & | getSegmentVectors () const |
| Get the segment vector ( Pi+1 - Pi) | |
| Aabb | aabb () const |
| Get the aabb of the polyline. | |
| Scalar | length () const |
| Get the total length of the line . | |
| void | setPoints (const Vector3Array &pt) |
| Update the points of the polyline. | |
| Scalar | squaredDistance (const Vector3 &p) const |
| Return the squared distance between the line and a given point p. | |
| Scalar | distance (const Vector3 &p) const |
| Return the distance between the line and a given point p. | |
| Scalar | projectOnSegment (const Vector3 &p, uint segment) const |
| uint | getNearestSegment (const Vector3 &p) const |
| Returns the index of the nearest segment. | |
| uint | getSegmentIndex (Scalar t) const |
| Returns the index of the segment to which t belons. | |
| Scalar | project (const Vector3 &p) const |
| Vector3 | f (Scalar t) const |
Protected Member Functions | |
| void | update () |
| Update the precomputed values after new points have been set. | |
| Scalar | getLineParameter (uint segment, Scalar tSegment) const |
A parametrized polyline, i.e. a continuous polygonal chain of segments. Points go from P0 to Pn. The ith segments joins Pi and Pi+1.
Definition at line 14 of file PolyLine.hpp.
|
explicit |
Create a polyline from a given set of points.
Definition at line 27 of file PolyLine.cpp.
Here is the call graph for this function:
|
inline |
Get the aabb of the polyline.
Definition at line 89 of file PolyLine.hpp.
Here is the call graph for this function:| Scalar Ra::Core::Geometry::PolyLine::distance | ( | const Vector3 & | p | ) | const |
Return the distance between the line and a given point p.
Definition at line 45 of file PolyLine.cpp.
Here is the call graph for this function:| Vector3 Ra::Core::Geometry::PolyLine::f | ( | Scalar | t | ) | const |
Return a point on the line corresponding to parameter t in [0;1]. Values of t below 0 map to the first point, and values above 1 to the last.
Definition at line 97 of file PolyLine.cpp.
Here is the call graph for this function:
|
inlineprotected |
Given a point on one of the segments identified by parameter tSegment in [0,1] and segment number, return the t in [0,1] corresponding to the same point in the whole line parametrization.
Definition at line 97 of file PolyLine.hpp.
Here is the call graph for this function:| uint Ra::Core::Geometry::PolyLine::getNearestSegment | ( | const Vector3 & | p | ) | const |
Returns the index of the nearest segment.
Definition at line 115 of file PolyLine.cpp.
Here is the call graph for this function:
|
inline |
Get the point vector.
Definition at line 81 of file PolyLine.hpp.
|
inline |
Get the ith segment AB as starting point A and vector AB.
Definition at line 104 of file PolyLine.hpp.
|
inline |
Returns the index of the segment to which t belons.
Definition at line 114 of file PolyLine.hpp.
Here is the call graph for this function:
|
inline |
Get the segment vector ( Pi+1 - Pi)
Definition at line 110 of file PolyLine.hpp.
|
inline |
Get the total length of the line .
Definition at line 85 of file PolyLine.hpp.
Here is the call graph for this function:| Scalar Ra::Core::Geometry::PolyLine::project | ( | const Vector3 & | p | ) | const |
Returns the parameter t in [0,1] corresponding to the point on the line which is the closest point from p.
Definition at line 55 of file PolyLine.cpp.
Here is the call graph for this function:| Scalar Ra::Core::Geometry::PolyLine::projectOnSegment | ( | const Vector3 & | p, |
| uint | segment ) const |
Returns the parameter t in [0,1] corresponding to the point on the ith segment closest from point p.
Definition at line 49 of file PolyLine.cpp.
Here is the call graph for this function:| void Ra::Core::Geometry::PolyLine::setPoints | ( | const Vector3Array & | pt | ) |
Update the points of the polyline.
Definition at line 31 of file PolyLine.cpp.
Here is the call graph for this function:| Scalar Ra::Core::Geometry::PolyLine::squaredDistance | ( | const Vector3 & | p | ) | const |
Return the squared distance between the line and a given point p.
Definition at line 36 of file PolyLine.cpp.
Here is the call graph for this function:
|
protected |
Update the precomputed values after new points have been set.
Definition at line 13 of file PolyLine.cpp.
Here is the call graph for this function: