Simbody
3.7
|
This ContactGeometry subclass represents an object that occupies the entire half-space x>0. More...
Public Member Functions | |
HalfSpace () | |
Create a HalfSpace for contact, with surface passing through the origin and outward normal -XAxis (in its own frame). More... | |
UnitVec3 | getNormal () const |
Return the HalfSpace outward normal in its own frame as a unit vector. More... | |
const Impl & | getImpl () const |
Internal use only. More... | |
Impl & | updImpl () |
Internal use only. More... | |
Public Member Functions inherited from SimTK::ContactGeometry | |
ContactGeometry () | |
Base class default constructor creates an empty handle. More... | |
ContactGeometry (const ContactGeometry &src) | |
Copy constructor makes a deep copy. More... | |
ContactGeometry & | operator= (const ContactGeometry &src) |
Copy assignment makes a deep copy. More... | |
~ContactGeometry () | |
Base class destructor deletes the implementation object. Note that this is not virtual; handles should consist of just a pointer to the implementation. More... | |
DecorativeGeometry | createDecorativeGeometry () const |
Generate a DecorativeGeometry that matches the shape of this ContactGeometry. More... | |
Vec3 | findNearestPoint (const Vec3 &position, bool &inside, UnitVec3 &normal) const |
Given a point, find the nearest point on the surface of this object. More... | |
Vec3 | projectDownhillToNearestPoint (const Vec3 &pointQ) const |
Given a query point Q, find the nearest point P on the surface of this object, looking only down the local gradient. More... | |
bool | trackSeparationFromLine (const Vec3 &pointOnLine, const UnitVec3 &directionOfLine, const Vec3 &startingGuessForClosestPoint, Vec3 &newClosestPointOnSurface, Vec3 &closestPointOnLine, Real &height) const |
Track the closest point between this implicit surface and a given line, or the point of deepest penetration if the line intersects the surface. More... | |
bool | intersectsRay (const Vec3 &origin, const UnitVec3 &direction, Real &distance, UnitVec3 &normal) const |
Determine whether this object intersects a ray, and if so, find the intersection point. More... | |
void | getBoundingSphere (Vec3 ¢er, Real &radius) const |
Get a bounding sphere which completely encloses this object. More... | |
bool | isSmooth () const |
Returns true if this is a smooth surface, meaning that it can provide meaningful curvature information and continuous derivatives with respect to its parameterization. More... | |
void | calcCurvature (const Vec3 &point, Vec2 &curvature, Rotation &orientation) const |
Compute the principal curvatures and their directions, and the surface normal, at a given point on a smooth surface. More... | |
const Function & | getImplicitFunction () const |
Our smooth surfaces define a function f(P)=0 that provides an implicit representation of the surface. More... | |
Real | calcSurfaceValue (const Vec3 &point) const |
Calculate the value of the implicit surface function, at a given point. More... | |
UnitVec3 | calcSurfaceUnitNormal (const Vec3 &point) const |
Calculate the implicit surface outward facing unit normal at the given point. More... | |
Vec3 | calcSurfaceGradient (const Vec3 &point) const |
Calculate the gradient of the implicit surface function, at a given point. More... | |
Mat33 | calcSurfaceHessian (const Vec3 &point) const |
Calculate the hessian of the implicit surface function, at a given point. More... | |
Real | calcGaussianCurvature (const Vec3 &gradient, const Mat33 &Hessian) const |
For an implicit surface, return the Gaussian curvature at the point p whose implicit surface function gradient g(p) and Hessian H(p) are supplied. More... | |
Real | calcGaussianCurvature (const Vec3 &point) const |
This signature is for convenience; use the other one to save time if you already have the gradient and Hessian available for this point. More... | |
Real | calcSurfaceCurvatureInDirection (const Vec3 &point, const UnitVec3 &direction) const |
For an implicit surface, return the curvature k of the surface at a given point p in a given direction tp. More... | |
void | calcSurfacePrincipalCurvatures (const Vec3 &point, Vec2 &curvature, Rotation &R_SP) const |
For an implicit surface at a given point p, return the principal curvatures and principal curvature directions, using only the implicit function and its derivatives. More... | |
bool | isConvex () const |
Returns true if this surface is known to be convex. More... | |
Vec3 | calcSupportPoint (UnitVec3 direction) const |
Given a direction expressed in the surface's frame S, return the point P on the surface that is the furthest in that direction (or one of those points if there is more than one). More... | |
ContactGeometryTypeId | getTypeId () const |
ContactTrackerSubsystem uses this id for fast identification of specific surface shapes. More... | |
ContactGeometry (ContactGeometryImpl *impl) | |
Internal use only. More... | |
bool | isOwnerHandle () const |
Internal use only. More... | |
bool | isEmptyHandle () const |
Internal use only. More... | |
bool | hasImpl () const |
Internal use only. More... | |
const ContactGeometryImpl & | getImpl () const |
Internal use only. More... | |
ContactGeometryImpl & | updImpl () |
Internal use only. More... | |
void | initGeodesic (const Vec3 &xP, const Vec3 &xQ, const Vec3 &xSP, const GeodesicOptions &options, Geodesic &geod) const |
Given two points, find a geodesic curve connecting them. More... | |
void | continueGeodesic (const Vec3 &xP, const Vec3 &xQ, const Geodesic &prevGeod, const GeodesicOptions &options, Geodesic &geod) const |
Given the current positions of two points P and Q moving on this surface, and the previous geodesic curve G' connecting prior locations P' and Q' of those same two points, return the geodesic G between P and Q that is closest in length to the previous one. More... | |
void | makeStraightLineGeodesic (const Vec3 &xP, const Vec3 &xQ, const UnitVec3 &defaultDirectionIfNeeded, const GeodesicOptions &options, Geodesic &geod) const |
Produce a straight-line approximation to the (presumably short) geodesic between two points on this implicit surface. More... | |
void | shootGeodesicInDirectionUntilLengthReached (const Vec3 &xP, const UnitVec3 &tP, const Real &terminatingLength, const GeodesicOptions &options, Geodesic &geod) const |
Compute a geodesic curve starting at the given point, starting in the given direction, and terminating at the given length. More... | |
void | calcGeodesicReverseSensitivity (Geodesic &geodesic, const Vec2 &initSensitivity=Vec2(0, 1)) const |
Given an already-calculated geodesic on this surface connecting points P and Q, fill in the sensitivity of point P with respect to a change of tangent direction at Q. More... | |
void | shootGeodesicInDirectionUntilPlaneHit (const Vec3 &xP, const UnitVec3 &tP, const Plane &terminatingPlane, const GeodesicOptions &options, Geodesic &geod) const |
Compute a geodesic curve starting at the given point, starting in the given direction, and terminating when it hits the given plane. More... | |
void | calcGeodesic (const Vec3 &xP, const Vec3 &xQ, const Vec3 &tPhint, const Vec3 &tQhint, Geodesic &geod) const |
Utility method to find geodesic between P and Q using split geodesic method with initial shooting directions tPhint and -tQhint. More... | |
void | calcGeodesicUsingOrthogonalMethod (const Vec3 &xP, const Vec3 &xQ, const Vec3 &tPhint, Real lengthHint, Geodesic &geod) const |
Utility method to find geodesic between P and Q using the orthogonal method, with initial direction tPhint and initial length lengthHint. More... | |
void | calcGeodesicUsingOrthogonalMethod (const Vec3 &xP, const Vec3 &xQ, Geodesic &geod) const |
This signature makes a guess at the initial direction and length and then calls the other signature. More... | |
Vec2 | calcSplitGeodError (const Vec3 &P, const Vec3 &Q, const UnitVec3 &tP, const UnitVec3 &tQ, Geodesic *geod=0) const |
Utility method to calculate the "geodesic error" between one geodesic shot from P in the direction tP and another geodesic shot from Q in the direction tQ. More... | |
void | shootGeodesicInDirectionUntilLengthReachedAnalytical (const Vec3 &xP, const UnitVec3 &tP, const Real &terminatingLength, const GeodesicOptions &options, Geodesic &geod) const |
Analytically compute a geodesic curve starting at the given point, starting in the given direction, and terminating at the given length. More... | |
void | shootGeodesicInDirectionUntilPlaneHitAnalytical (const Vec3 &xP, const UnitVec3 &tP, const Plane &terminatingPlane, const GeodesicOptions &options, Geodesic &geod) const |
Analytically compute a geodesic curve starting at the given point, starting in the given direction, and terminating when it hits the given plane. More... | |
void | calcGeodesicAnalytical (const Vec3 &xP, const Vec3 &xQ, const Vec3 &tPhint, const Vec3 &tQhint, Geodesic &geod) const |
Utility method to analytically find geodesic between P and Q with initial shooting directions tPhint and tQhint. More... | |
Vec2 | calcSplitGeodErrorAnalytical (const Vec3 &P, const Vec3 &Q, const UnitVec3 &tP, const UnitVec3 &tQ, Geodesic *geod=0) const |
Utility method to analytically calculate the "geodesic error" between one geodesic shot from P in the direction tP and another geodesic shot from Q in the direction tQ. More... | |
const Plane & | getPlane () const |
Get the plane associated with the geodesic hit plane event handler. More... | |
void | setPlane (const Plane &plane) const |
Set the plane associated with the geodesic hit plane event handler. More... | |
const Geodesic & | getGeodP () const |
Get the geodesic for access by visualizer. More... | |
const Geodesic & | getGeodQ () const |
Get the geodesic for access by visualizer. More... | |
const int | getNumGeodesicsShot () const |
Get the plane associated with the geodesic hit plane event handler. More... | |
void | addVizReporter (ScheduledEventReporter *reporter) const |
Get the plane associated with the geodesic hit plane event handler. More... | |
Static Public Member Functions | |
static bool | isInstance (const ContactGeometry &geo) |
Return true if the supplied ContactGeometry object is a halfspace. More... | |
static const HalfSpace & | getAs (const ContactGeometry &geo) |
Cast the supplied ContactGeometry object to a const halfspace. More... | |
static HalfSpace & | updAs (ContactGeometry &geo) |
Cast the supplied ContactGeometry object to a writable halfspace. More... | |
static ContactGeometryTypeId | classTypeId () |
Obtain the unique id for HalfSpace contact geometry. More... | |
Static Public Member Functions inherited from SimTK::ContactGeometry | |
static Vec2 | evalParametricCurvature (const Vec3 &P, const UnitVec3 &nn, const Vec3 &dPdu, const Vec3 &dPdv, const Vec3 &d2Pdu2, const Vec3 &d2Pdv2, const Vec3 &d2Pdudv, Transform &X_EP) |
Calculate surface curvature at a point using differential geometry as suggested by Harris 2006, "Curvature of ellipsoids and other surfaces" Ophthal. More... | |
static void | combineParaboloids (const Rotation &R_SP1, const Vec2 &k1, const UnitVec3 &x2, const Vec2 &k2, Rotation &R_SP, Vec2 &k) |
This utility method is useful for characterizing the relative geometry of two locally-smooth surfaces in contact, in a way that is useful for later application of Hertz compliant contact theory for generating forces. More... | |
static void | combineParaboloids (const Rotation &R_SP1, const Vec2 &k1, const UnitVec3 &x2, const Vec2 &k2, Vec2 &k) |
This is a much faster version of combineParaboloids() for when you just need the curvatures of the difference paraboloid, but not the directions of those curvatures. More... | |
Additional Inherited Members | |
Protected Attributes inherited from SimTK::ContactGeometry | |
ContactGeometryImpl * | impl |
Internal use only. More... | |
This ContactGeometry subclass represents an object that occupies the entire half-space x>0.
This is useful for representing walls and floors. This object has infinite extent.
Create a HalfSpace for contact, with surface passing through the origin and outward normal -XAxis (in its own frame).
Thus the half-space is all of x>0. When this is placed on a Body, a Transform is provided that repositions the half-space to the desired location and orientation in the Body's frame.
UnitVec3 SimTK::ContactGeometry::HalfSpace::getNormal | ( | ) | const |
Return the HalfSpace outward normal in its own frame as a unit vector.
|
inlinestatic |
Return true if the supplied ContactGeometry object is a halfspace.
|
inlinestatic |
Cast the supplied ContactGeometry object to a const halfspace.
|
inlinestatic |
Cast the supplied ContactGeometry object to a writable halfspace.
|
static |
Obtain the unique id for HalfSpace contact geometry.
const Impl& SimTK::ContactGeometry::HalfSpace::getImpl | ( | ) | const |
Internal use only.
Internal use only.
Impl& SimTK::ContactGeometry::HalfSpace::updImpl | ( | ) |
Internal use only.