MBSim

Project Page
Public Member Functions | Protected Member Functions | Protected Attributes
MBSim::PolynomialFrustum Class Reference

Frustum contour with a polynomial radius over height course. More...

#include <polynomial_frustum.h>

Inheritance diagram for MBSim::PolynomialFrustum:
MBSim::RigidContour MBSim::Contour MBSim::Element

List of all members.

Public Member Functions

 PolynomialFrustum (const std::string &name, const fmatvec::Vec &param_)
 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
double getHeight ()
 return height of frustum
double getHeight () const
 return height of frustum
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

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

Detailed Description

Frustum contour with a polynomial radius over height course.

Author:
Kilian Grundl, Tingting Sun
Date:
09.10.2012

Constructor & Destructor Documentation

MBSim::PolynomialFrustum::PolynomialFrustum ( const std::string &  name,
const fmatvec::Vec &  param_ 
)

Constructor.

Parameters:
nameName of the contour
param_

Member Function Documentation

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

Parameters:
x_0,:starting point of the polynomial domain
x_end,:end point of the polynomial domain
P,:the given point
Returns:
: a dimension 3 vector, vec[0] storing the dis, vec[1] and vec[2] for the 2D position of the closest point on the curve

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]

Returns:
the radius of the circumsphere
std::string MBSim::PolynomialFrustum::getType ( ) const [inline, virtual]
Returns:
std::string representation

Reimplemented from MBSim::RigidContour.

void MBSim::PolynomialFrustum::setHeight ( const double &  height_)

set height of frustum

Parameters:
heightheight of the frustum

The documentation for this class was generated from the following file: