|
| | RayTriangle3DIntersection (ITraceMng *tm) |
| void | setRays (Real3ConstArrayView origins, Real3ConstArrayView directions) |
| | Positions the list of rays for which intersection is desired.
|
| void | setTriangles (Real3ConstArrayView coordinates, Int32ConstArrayView indexes) |
| | Positions the list of triangles for which intersection is desired with the rays. The array indexes contains for each triangle the indices in the coordinates array of each vertex. For example, indexes[0..2] contains the indices of the vertices of the 1st triangle, indexes[3..5] those of the second.
|
| void | compute () |
| | Calculates the intersection of each ray with the list of triangles. If a ray intersects multiple triangles, we keep the one whose distance from the ray origin is the smallest.
|
| RealConstArrayView | distances () |
| | Distance from the origin of a ray to its intersection point. Distance (expressed relative to the norm of directions) of a ray's intersection point relative to its origin. For ray i, its intersection point is therefore given by the formula (origins[i] + distances[i]*directions[i]). The distance is negative if the ray does not intersect any triangle. This array is filled when compute() is called.
|
| Int32ConstArrayView | intersectedTriangleIndexes () |
| | Indices of intersected triangles. Index in the array provided by setTriangles() of the triangle intersected by each ray. This index is -1 if a ray does not intersect a triangle. This array is filled when compute() is called.
|
| Real | checkIntersection (Real3 origin, Real3 direction, Real3 p0, Real3 p1, Real3 p2) |
| | Calculates the intersection of the half-line [origin,direction) with the triangle (p0,p1,p2).
|
| | TraceAccessor (ITraceMng *m) |
| | Constructs an accessor via the trace manager m.
|
| | TraceAccessor (const TraceAccessor &rhs) |
| | Copy constructor.
|
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| | Copy assignment operator.
|
| virtual | ~TraceAccessor () |
| | Frees resources.
|
| ITraceMng * | traceMng () const |
| | Trace manager.
|
| TraceMessage | info () const |
| | Flow for an information message.
|
| TraceMessage | pinfo () const |
| | Flow for a parallel information message.
|
| TraceMessage | info (char category) const |
| | Flow for an information message of a given category.
|
| TraceMessage | pinfo (char category) const |
| | Flow for a parallel information message of a given category.
|
| TraceMessage | info (bool v) const |
| | Flow for an information message.
|
| TraceMessage | warning () const |
| | Flow for a warning message.
|
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| | Flow for an error message.
|
| TraceMessage | perror () const |
| TraceMessage | log () const |
| | Flow for a log message.
|
| TraceMessage | plog () const |
| | Flow for a log message.
|
| TraceMessage | logdate () const |
| | Flow for a log message preceded by the date.
|
| TraceMessage | fatal () const |
| | Flow for a fatal error message.
|
| TraceMessage | pfatal () const |
| | Flow for a parallel fatal error message.
|
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| | Flow for a debug message.
|
| Trace::eDebugLevel | configDbgLevel () const |
| | Debug level of the configuration file.
|
| TraceMessage | info (Int32 verbose_level) const |
| | Flow for an information message of a given level.
|
| TraceMessage | linfo () const |
| | Flow for an information message with the local information level of this instance.
|
| TraceMessage | linfo (Int32 relative_level) const |
| | Flow for an information message with the local information level of this instance.
|
| void | fatalMessage (const StandaloneTraceMessage &o) const |
Calculates the intersection of a ray with a set of triangles in 3D.
A ray is a half-line and is defined by its origin and direction. You must position the rays (via setRays()) and the list of triangles (via setTriangles()) then call the compute() method. In return, you can retrieve the distance (distances()) and the intersected triangle (intersectedTriangleIndexes()).
The views passed as arguments (setRays() and setTriangles()) must not be modified while the instance exists.
Definition at line 56 of file BasicRayMeshIntersection.cc.
Calculates the intersection of the half-line [origin,direction) with the triangle (p0,p1,p2).
The direction does not need to be normalized.
The position of the intersection point is P = origin + t * direction where t is the value returned by this function. This value is negative if no intersection point is found.
Definition at line 202 of file BasicRayMeshIntersection.cc.
References Arcane::math::dot(), and Arcane::math::vecMul().