RobWorkProject  23.9.11-
Static Public Member Functions | List of all members
IntersectUtil Class Reference

utility class for calculating intersection points between geometry primitives More...

#include <IntersectUtil.hpp>

Static Public Member Functions

static rw::math::Vector3D< double > closestPt (const rw::math::Vector3D< double > &point, const Line &line)
 closest point tests More...
 
static rw::math::Vector3D< double > closestPtPointRay (const rw::math::Vector3D< double > &point, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2)
 finds the point on a ray (infinite in all directions) which is closest to the point point
 
static rw::math::Vector3D< double > closestPtPointLine (const rw::math::Vector3D< double > &point, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2)
 finds the point on a line which is closest to the point point
 
static bool intersetPtRayPlane (const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const Plane &p, rw::math::Vector3D< double > &dst)
 finds the point on a line which is closest to the point point More...
 
static bool intersetPtRayPlane (const rw::math::Vector3D< double > &ray1, const rw::math::Vector3D< double > &ray2, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::math::Vector3D< double > &p3, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the implicit plane defined by the three points p1 p2 p3. If they intersect, true is returned and intersection point is set in dst
 
static bool intersetPtRayTri (const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::geometry::Triangle< double > &tri, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the triangle. If they intersect true is returned and intersection point is set in dst
 
static bool intersetPtRayTri (const rw::math::Vector3D< double > &ray1, const rw::math::Vector3D< double > &ray2, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::math::Vector3D< double > &p3, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the triangle defined by the three points p1 p2 p3. If they intersect, true is returned and intersection point is set in dst
 
static bool intersetPtLinePlane (const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const Plane &p, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the plane. If they intersect true is returned and intersection point is set in dst
 
static bool intersetPtLinePlane (const rw::math::Vector3D< double > &ray1, const rw::math::Vector3D< double > &ray2, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::math::Vector3D< double > &p3, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the implicit plane defined by the three points p1 p2 p3. If they intersect, true is returned and intersection point is set in dst
 
static bool intersetPtLineTri (const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::geometry::Triangle< double > &tri, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the ray and the triangle. If they intersect true is returned and intersection point is set in dst
 
static bool intersetPtLineTri (const rw::math::Vector3D< double > &ray1, const rw::math::Vector3D< double > &ray2, const rw::math::Vector3D< double > &p1, const rw::math::Vector3D< double > &p2, const rw::math::Vector3D< double > &p3, rw::math::Vector3D< double > &dst)
 calculates the intersection point between the line segment and the triangle defined by the three points p1 p2 p3. If they intersect, true is returned and intersection point is set in dst
 
static bool intersetPtTriTri (const rw::geometry::Triangle< double > &triA, const rw::geometry::Triangle< double > &triB, rw::math::Vector3D< double > &dst1, rw::math::Vector3D< double > &dst2)
 calculates the intersection point between the triangle triA and the triangle triB. If they intersect, true is returned and two intersection points are set in dst1 and dst2 More...
 

Detailed Description

utility class for calculating intersection points between geometry primitives

Member Function Documentation

◆ closestPt()

static rw::math::Vector3D<double> closestPt ( const rw::math::Vector3D< double > &  point,
const Line line 
)
static

closest point tests

finds the point on a line which is closest to the point point

◆ intersetPtRayPlane()

static bool intersetPtRayPlane ( const rw::math::Vector3D< double > &  p1,
const rw::math::Vector3D< double > &  p2,
const Plane p,
rw::math::Vector3D< double > &  dst 
)
static

finds the point on a line which is closest to the point point

closest point pair tests

finds the closest points between two line segments

finds the closest points between a line segment and a triangle

finds the closest points between a ray and a triangle intersection tests

calculates the intersection point between the ray and the plane. If they intersect true is returned and intersection point is set in dst

◆ intersetPtTriTri()

static bool intersetPtTriTri ( const rw::geometry::Triangle< double > &  triA,
const rw::geometry::Triangle< double > &  triB,
rw::math::Vector3D< double > &  dst1,
rw::math::Vector3D< double > &  dst2 
)
static

calculates the intersection point between the triangle triA and the triangle triB. If they intersect, true is returned and two intersection points are set in dst1 and dst2

Note
this is not an optimized method

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