Classes | Namespaces | Functions
narrowphase.cpp File Reference
#include "fcl/narrowphase/narrowphase.h"
#include "fcl/shape/geometric_shapes_utility.h"
#include <boost/math/constants/constants.hpp>
#include <vector>
Include dependency graph for narrowphase.cpp:

Go to the source code of this file.

Classes

struct  fcl::details::ContactPoint

Namespaces

namespace  fcl
 

Main namespace.


namespace  fcl::details
 

FCL internals. Ignore this :) unless you are God.


Functions

int fcl::details::boxBox2 (const Vec3f &side1, const Matrix3f &R1, const Vec3f &T1, const Vec3f &side2, const Matrix3f &R2, const Vec3f &T2, Vec3f &normal, FCL_REAL *depth, int *return_code, int maxc, std::vector< ContactPoint > &contacts)
bool fcl::details::boxBoxIntersect (const Box &s1, const Transform3f &tf1, const Box &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth_, Vec3f *normal_)
bool fcl::details::boxHalfspaceIntersect (const Box &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2)
 box half space, a, b, c = +/- edge size n^T * (R(o + a v1 + b v2 + c v3) + T) <= d so (R^T n) (a v1 + b v2 + c v3) + n * T <= d check whether d - n * T - (R^T n) (a v1 + b v2 + c v3) >= 0 for some a, b, c the max value of left side is d - n * T + |(R^T n) (a v1 + b v2 + c v3)|, check that is enough
bool fcl::details::boxHalfspaceIntersect (const Box &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::boxPlaneIntersect (const Box &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
 box half space, a, b, c = +/- edge size n^T * (R(o + a v1 + b v2 + c v3) + T) ~ d so (R^T n) (a v1 + b v2 + c v3) + n * T ~ d check whether d - n * T - (R^T n) (a v1 + b v2 + c v3) >= 0 for some a, b, c and <=0 for some a, b, c so need to check whether |d - n * T| <= |(R^T n)(a v1 + b v2 + c v3)|, the reason is as follows: (R^T n) (a v1 + b v2 + c v3) can get |(R^T n) (a v1 + b v2 + c v3)| for one a, b, c. if |d - n * T| <= |(R^T n)(a v1 + b v2 + c v3)| then can get both positive and negative value on the right side.
bool fcl::details::capsuleHalfspaceIntersect (const Capsule &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::capsulePlaneIntersect (const Capsule &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2)
bool fcl::details::capsulePlaneIntersect (const Capsule &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::coneHalfspaceIntersect (const Cone &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::conePlaneIntersect (const Cone &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::convexHalfspaceIntersect (const Convex &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::convexPlaneIntersect (const Convex &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
static void fcl::details::cullPoints2 (int n, FCL_REAL p[], int m, int i0, int iret[])
bool fcl::details::cylinderHalfspaceIntersect (const Cylinder &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::cylinderPlaneIntersect (const Cylinder &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2)
 cylinder-plane intersect n^T (R (r * cosa * v1 + r * sina * v2 + h * v3) + T) ~ d need one point to be positive and one to be negative (n^T * v3) * h + n * T -d + r * (cosa * (n^T * R * v1) + sina * (n^T * R * v2)) ~ 0 (n^T * v3) * h + r * (cosa * (n^T * R * v1) + sina * (n^T * R * v2)) + n * T - d ~ 0
bool fcl::details::cylinderPlaneIntersect (const Cylinder &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::halfspaceIntersect (const Halfspace &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f &p, Vec3f &d, Halfspace &s, FCL_REAL &penetration_depth, int &ret)
template<typename T >
fcl::details::halfspaceIntersectTolerance ()
template<>
float fcl::details::halfspaceIntersectTolerance ()
bool fcl::details::halfspacePlaneIntersect (const Halfspace &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Plane &pl, Vec3f &p, Vec3f &d, FCL_REAL &penetration_depth, int &ret)
bool fcl::details::halfspaceTriangleIntersect (const Halfspace &s1, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
static int fcl::details::intersectRectQuad2 (FCL_REAL h[2], FCL_REAL p[8], FCL_REAL ret[16])
static void fcl::details::lineClosestApproach (const Vec3f &pa, const Vec3f &ua, const Vec3f &pb, const Vec3f &ub, FCL_REAL *alpha, FCL_REAL *beta)
bool fcl::details::planeHalfspaceIntersect (const Plane &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Plane &pl, Vec3f &p, Vec3f &d, FCL_REAL &penetration_depth, int &ret)
 return whether plane collides with halfspace if the separation plane of the halfspace is parallel with the plane return code 1, if the plane's normal is the same with halfspace's normal and plane is inside halfspace, also return plane in pl return code 2, if the plane's normal is oppositie to the halfspace's normal and plane is inside halfspace, also return plane in pl plane is outside halfspace, collision-free if not parallel return the intersection ray, return code 3. ray origin is p and direction is d
bool fcl::details::planeIntersect (const Plane &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
template<typename T >
fcl::details::planeIntersectTolerance ()
template<>
double fcl::details::planeIntersectTolerance< double > ()
template<>
float fcl::details::planeIntersectTolerance< float > ()
bool fcl::details::planeTriangleIntersect (const Plane &s1, const Transform3f &tf1, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::projectInTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3, const Vec3f &normal, const Vec3f &p)
 Whether a point's projection is in a triangle.
FCL_REAL fcl::details::segmentSqrDistance (const Vec3f &from, const Vec3f &to, const Vec3f &p, Vec3f &nearest)
 the minimum distance from a point to a line
bool fcl::details::sphereHalfspaceIntersect (const Sphere &s1, const Transform3f &tf1, const Halfspace &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::spherePlaneIntersect (const Sphere &s1, const Transform3f &tf1, const Plane &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::sphereSphereDistance (const Sphere &s1, const Transform3f &tf1, const Sphere &s2, const Transform3f &tf2, FCL_REAL *dist)
bool fcl::details::sphereSphereIntersect (const Sphere &s1, const Transform3f &tf1, const Sphere &s2, const Transform3f &tf2, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal)
bool fcl::details::sphereTriangleDistance (const Sphere &sp, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, FCL_REAL *dist)
bool fcl::details::sphereTriangleIntersect (const Sphere &s, const Transform3f &tf, const Vec3f &P1, const Vec3f &P2, const Vec3f &P3, Vec3f *contact_points, FCL_REAL *penetration_depth, Vec3f *normal_)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


fcl
Author(s): Jia Pan
autogenerated on Tue Jan 15 2013 16:05:31