MBSim

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

class for contact kinematics between convex frustum and an rectangle More...

#include <rectangle_polynomialfrustum.h>

Inheritance diagram for MBSim::ContactKinematicsRectanglePolynomialFrustum:
MBSim::ContactKinematics

List of all members.

Public Member Functions

void assignContours (const std::vector< Contour * > &contour)
 treats ordering of contours
virtual void updateg (fmatvec::Vec &g, ContourPointData *cpData, int index=0)
 compute normal distance, possible contact point positions and orientation (cf.
virtual void updatewb (fmatvec::Vec &wb, const fmatvec::Vec &g, ContourPointData *cpData)
 compute acceleration in terms of contour parameters for event driven integration

Protected Member Functions

void setFrustumOrienationKinematics (const double &x, const double &phi, ContourPointData *cpData)
 set the values for the contact kinematics for the frustum due to the given x and phi
bool cpLocationInRectangle (fmatvec::Vec &g, ContourPointData *cpData)
 check if there is a contact point within the rectangle between the frustum and the rectangle
bool cornerContact (fmatvec::Vec &g, ContourPointData *cpData)
 checks if there is a contact point at one of the corner points
bool edgeContact (fmatvec::Vec &g, ContourPointData *cpData)
 checks if there is a contact on one edge of the rectangle
fmatvec::Vec3 computeContourPointFrustum (const double &x, const fmatvec::Vec3 &n)
 computes the point on the contour of the frustum due to the height-coordinate x and the normal in world coordinates
fmatvec::Vec3 computeContourPoint (const double &x, const fmatvec::Vec3 &n)
 computes the point on the contour of the frustum due to the height-coordinate x and the normal in world coordinates
int checkPossibleContactPoint (const double &x, const fmatvec::Vec3 &n)
 check if frustum point identified by coordinate x is possible contact point
double distance2Rectangle (const fmatvec::Vec3 &point)
 compute distance between given point and rectangle

Protected Attributes

int irectangle
 contour index of rectangle (in cpData)
int ifrustum
 contour index of frustum (in cpData)
Rectangle * rectangle
 pointer to the contour class for the rectangle
PolynomialFrustum * frustum
 pointer to the contour class for the polynomial frustum
double signh
 sign of height-direction
double x1
 save last value to use it again as starting value for equation 1
double x2
 save last value to use it again as starting value for equation 2
fmatvec::Vec3 cornerPoints [4]
 array of the four corner points of the rectangle in the frame of the frustum
projectPointAlongNormal * funcProjectAlongNormal
 function for intersection point
MultiDimensionalNewtonMethod newtonProjectAlongNormal
 newton method for solving the edge contact
projectPointAlongNormalJacobian * jacobianProjectAlongNormal
 Jacobian for newton method.
GlobalResidualCriteriaFunction criteriaProjectAlongNormal
 criteria for newton method
StandardDampingFunction dampingProjectAlongNormal
 damping function for newton method
edgePolyFrustum * funcEdge
 function for intersection point
MultiDimensionalNewtonMethod newtonEdge
 newton method for solving the edge contact
NumericalNewtonJacobianFunction jacobianEdge
 Jacobian for newton method.
edgePolyFrustumCriteria criteriaEdge
 criteria for newton method
StandardDampingFunction dampingEdge
 damping function for newton method
int ilast
 index of last edge contact
fmatvec::Vec xi
 last position of edge contact

Detailed Description

class for contact kinematics between convex frustum and an rectangle

Author:
Kilian Grundl, Tingting Sun
Date:
09.10.2012

Member Function Documentation

void MBSim::ContactKinematicsRectanglePolynomialFrustum::assignContours ( const std::vector< Contour * > &  contour) [virtual]

treats ordering of contours

Parameters:
contourvector

Implements MBSim::ContactKinematics.

int MBSim::ContactKinematicsRectanglePolynomialFrustum::checkPossibleContactPoint ( const double &  x,
const fmatvec::Vec3 &  n 
) [protected]

check if frustum point identified by coordinate x is possible contact point

Parameters:
xheight-coordinate of possible contact point
nnormal vector of the rectangle
fmatvec::Vec3 MBSim::ContactKinematicsRectanglePolynomialFrustum::computeContourPoint ( const double &  x,
const fmatvec::Vec3 &  n 
) [protected]

computes the point on the contour of the frustum due to the height-coordinate x and the normal in world coordinates

Parameters:
xheight coordinate
nnormal of the frustum
Returns:
contour point in world coordinates of the contour point on the frustum
fmatvec::Vec3 MBSim::ContactKinematicsRectanglePolynomialFrustum::computeContourPointFrustum ( const double &  x,
const fmatvec::Vec3 &  n 
) [protected]

computes the point on the contour of the frustum due to the height-coordinate x and the normal in world coordinates

Parameters:
xheight coordinate
nnormal of the frustum
Returns:
contour point in frustum coordinates of the contour point on the frustum
bool MBSim::ContactKinematicsRectanglePolynomialFrustum::cornerContact ( fmatvec::Vec &  g,
ContourPointData *  cpData 
) [protected]

checks if there is a contact point at one of the corner points

Returns:
true (if) or false (if there is no contact at one of the corner points)

check if there is a contact point within the rectangle between the frustum and the rectangle

Returns:
true (if) or false (if there is no contact within the rectangle)

If there is contact the position and the cpData information is setted right away

double MBSim::ContactKinematicsRectanglePolynomialFrustum::distance2Rectangle ( const fmatvec::Vec3 &  point) [protected]

compute distance between given point and rectangle

Parameters:
pointGiven point in world coordinates
bool MBSim::ContactKinematicsRectanglePolynomialFrustum::edgeContact ( fmatvec::Vec &  g,
ContourPointData *  cpData 
) [protected]

checks if there is a contact on one edge of the rectangle

Returns:
true (if) or false (if there is no contact at one of the corner points)
Todo:
: unefficient and only finding (one) intersection point --> There should always be two intersection points and then using the middle or something
virtual void MBSim::ContactKinematicsRectanglePolynomialFrustum::updateg ( fmatvec::Vec &  g,
ContourPointData *  cpData,
int  index = 0 
) [virtual]

compute normal distance, possible contact point positions and orientation (cf.

contact.cc)

Parameters:
gnormal distance
cpDatacontact point parametrisation
indexindex of the contact point that should be updated

Implements MBSim::ContactKinematics.

virtual void MBSim::ContactKinematicsRectanglePolynomialFrustum::updatewb ( fmatvec::Vec &  wb,
const fmatvec::Vec &  g,
ContourPointData *  cpData 
) [inline, virtual]

compute acceleration in terms of contour parameters for event driven integration

Parameters:
accelerationin terms of contour parameters
normaldistance
contactpoint parametrisation

Implements MBSim::ContactKinematics.


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