DGtal
1.5.beta
|
This class implements various intersection predicates between a ray and a triangle, a quad or a surfel in dimension 3. More...
#include <DGtal/geometry/tools/RayIntersectionPredicates.h>
Public Types | |
typedef TPoint | Point |
Type of point. More... | |
typedef TPoint | Vector |
Type of vector. More... | |
typedef TPoint::Component | Component |
Type of point coordinates. More... | |
Public Member Functions | |
BOOST_STATIC_ASSERT (TPoint::dimension==3) | |
Only in dimension 3. More... | |
RayIntersectionPredicate (const Point &origin, const Vector &dest) | |
bool | operator() (const Point &v1, const Point &v2, const Point &v3) const |
bool | operator() (const Point &v1, const Point &v2, const Point &v3, const Point &v4) const |
template<typename Surfel > | |
bool | operator() (const Surfel &aSurfel) const |
Data Fields | |
Point | myOrigin |
Point | myDest |
This class implements various intersection predicates between a ray and a triangle, a quad or a surfel in dimension 3.
Few details:
For the later case, this predicate is useful to get the surfel (an iterator on a surfel) of a digital surface intersected by the ray using for instance:
TPoint | type of points. |
Definition at line 81 of file RayIntersectionPredicates.h.
typedef TPoint::Component DGtal::RayIntersectionPredicate< TPoint >::Component |
Type of point coordinates.
Definition at line 94 of file RayIntersectionPredicates.h.
typedef TPoint DGtal::RayIntersectionPredicate< TPoint >::Point |
Type of point.
Definition at line 88 of file RayIntersectionPredicates.h.
typedef TPoint DGtal::RayIntersectionPredicate< TPoint >::Vector |
Type of vector.
Definition at line 91 of file RayIntersectionPredicates.h.
|
inline |
Constructor from a ray
origin | Origin of the ray |
dest | vector to represent the direction of the ray |
Definition at line 105 of file RayIntersectionPredicates.h.
DGtal::RayIntersectionPredicate< TPoint >::BOOST_STATIC_ASSERT | ( | TPoint::dimension | = =3 | ) |
Only in dimension 3.
|
inline |
Ray-Triangle intersection predicate (no back-face culling test, i.e., the order of vertices does not matter).
v1 | first vertex of the triangle |
v2 | second vertex of the triangle |
v3 | third vertex of the triangle |
Definition at line 125 of file RayIntersectionPredicates.h.
References DGtal::RayIntersectionPredicate< TPoint >::myDest, and DGtal::RayIntersectionPredicate< TPoint >::myOrigin.
Referenced by DGtal::RayIntersectionPredicate< TPoint >::operator()().
|
inline |
Ray-Quad intersection predicate (calls two ray-triangle intersections).
v1 | first vertex of the quad |
v2 | second vertex of the quad |
v3 | third vertex of the quad |
v4 | fourth vertex of the quad |
Definition at line 217 of file RayIntersectionPredicates.h.
|
inline |
Ray-Surfel intersection predicate (calls two ray-triangle intersections).
aSurfel | a Khalimsky surfel |
Definition at line 240 of file RayIntersectionPredicates.h.
References DGtal::NumberTraitsImpl< std::decay< T >::type >::castToInt64_t(), DGtal::RayIntersectionPredicate< TPoint >::operator()(), and DGtal::SignedKhalimskyCell< dim, TInteger >::preCell().
Point DGtal::RayIntersectionPredicate< TPoint >::myDest |
Definition at line 283 of file RayIntersectionPredicates.h.
Referenced by DGtal::RayIntersectionPredicate< TPoint >::operator()().
Point DGtal::RayIntersectionPredicate< TPoint >::myOrigin |
Definition at line 282 of file RayIntersectionPredicates.h.
Referenced by DGtal::RayIntersectionPredicate< TPoint >::operator()().