MBSim |
Project Page |
Frustum contour with a polynomial radius over height course. More...
#include <polynomial_frustum.h>
Public Member Functions | |
| PolynomialFrustum (const std::string &name, const fmatvec::Vec ¶m_) | |
| Constructor. | |
| virtual | ~PolynomialFrustum () |
| Destructor. | |
| std::string | getType () const |
| virtual void | init (InitStage stage) |
| TODO. | |
| virtual fmatvec::Vec2 | computeLagrangeParameter (const fmatvec::Vec3 &WrPoint) |
| returns the two lagrange parameters index 0: x, height coordinate of frustum index 1: phi, angle of point | |
| void | setHeight (const double &height_) |
| set height of frustum height height of the frustum | |
| double | getHeight () |
| double | getHeight () const |
| double | getValue (const double &x) |
| get value at position of 0 derivative | |
| double | getValue (const double &x) const |
| get value at position of 0 derivative | |
| double | getValueD1 (const double &x) |
| get value at position of first derivative | |
| double | getValueD1 (const double &x) const |
| get value at position of first derivative | |
| double | getValueD2 (const double &x) |
| get value at position of second derivative | |
| double | getValueD2 (const double &x) const |
| get value at position of second derivative | |
| double | getXPolyMax () |
| get inner peak value of the polynomial | |
| double | getEnclosingSphereRadius () |
| take the largest one among the distance from ((a+b)/2,0) to (a,f(a)),(b,f(b)) and (x,f(x)) where f(x) achieves maximum at x within[a,b] | |
| fmatvec::Vec3 | getEnclosingSphereCenter () |
| return the center of the enclosing sphere | |
| const fmatvec::Vec & | getPolynomialParameters () |
| get coefficient vector of the polynomial | |
| fmatvec::Vec3 | computePoint (const double &x, const double &phi) |
| returns the point in local coordinates of the frustum at the position (x, phi) | |
| fmatvec::Vec3 | computeNormal (const double &x, const double &phi) |
| returns the normal in local coordinates of the frustum at the position (x, phi) | |
| fmatvec::Vec3 | computeTangentRadial (const double &x, const double &phi) |
| returns the tangent in radial direction in local coordinates of the frustum at the position (x, phi) | |
| fmatvec::Vec3 | computeTangentAzimuthal (const double &x, const double &phi) |
| returns the tangent in azimuthal direction in local coordinates of the frustum at the point x, phi | |
| fmatvec::Vec3 | CP_toP_onPolycurve2D (double x_0, double x_end, fmatvec::Vec2 P) |
| in 2D plane, given a point outside a polynomial curve, search for the closest point on the curve to the point x_0: starting point of the polynomial domain x_end: end point of the polynomial domain P: the given point | |
Protected Member Functions | |
| void | computeEnclosingSphere () |
Protected Attributes | |
| fmatvec::Vec | parameters |
| vector holding our parameters of the polynom describing the frustum (radius over height) parameters=[a0,a1,a2,...an] | |
| double | height |
| height of the frustum | |
| double | sphereRadius |
| radius of the enclosing sphere | |
Frustum contour with a polynomial radius over height course.
| MBSim::PolynomialFrustum::PolynomialFrustum | ( | const std::string & | name, |
| const fmatvec::Vec & | param_ | ||
| ) |
Constructor.
| name | Name of the contour |
| param_ |
| void MBSim::PolynomialFrustum::computeEnclosingSphere | ( | ) | [protected] |
a sphere that totally encloses the frustum
| fmatvec::Vec3 MBSim::PolynomialFrustum::CP_toP_onPolycurve2D | ( | double | x_0, |
| double | x_end, | ||
| fmatvec::Vec2 | P | ||
| ) |
in 2D plane, given a point outside a polynomial curve, search for the closest point on the curve to the point x_0: starting point of the polynomial domain x_end: end point of the polynomial domain P: the given point
take the largest one among the distance from ((a+b)/2,0) to (a,f(a)),(b,f(b)) and (x,f(x)) where f(x) achieves maximum at x within[a,b]
| std::string MBSim::PolynomialFrustum::getType | ( | ) | const [inline, virtual] |
Reimplemented from MBSim::RigidContour.
1.8.0