Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IRayMeshIntersection Class Referenceabstract

Calculation of the intersection between a set of segments and the surface of a mesh. More...

#include <arcane/core/IRayMeshIntersection.h>

Inheritance diagram for Arcane::IRayMeshIntersection:
Collaboration diagram for Arcane::IRayMeshIntersection:

Public Member Functions

virtual ~IRayMeshIntersection ()=default
 Frees resources.
virtual void build ()=0
 Builds the instance.
virtual void compute (Real3ConstArrayView segments_position, Real3ConstArrayView segments_direction, Int32ConstArrayView orig_faces_local_id, Int32ArrayView user_values, Real3ArrayView intersections, RealArrayView distances, Int32ArrayView faces_local_id)=0
 Calculates the intersection.
virtual void compute (IItemFamily *ray_family, VariableParticleReal3 &rays_position, VariableParticleReal3 &rays_direction, VariableParticleInt32 &rays_orig_face, VariableParticleInt32 &user_values, VariableParticleReal3 &intersections, VariableParticleReal &distances, VariableParticleInt32 &rays_face)=0
 Calculates the intersection of rays.
virtual void setFaceIntersector (IRayFaceIntersector *intersector)=0
 Sets the intersection callback.
virtual IRayFaceIntersectorfaceIntersector ()=0
 Intersector used (0 if none specified).

Detailed Description

Calculation of the intersection between a set of segments and the surface of a mesh.

Definition at line 69 of file IRayMeshIntersection.h.

Member Function Documentation

◆ build()

virtual void Arcane::IRayMeshIntersection::build ( )
pure virtual

Builds the instance.

Implemented in Arcane::BasicRayMeshIntersection.

◆ compute() [1/2]

virtual void Arcane::IRayMeshIntersection::compute ( IItemFamily * ray_family,
VariableParticleReal3 & rays_position,
VariableParticleReal3 & rays_direction,
VariableParticleInt32 & rays_orig_face,
VariableParticleInt32 & user_values,
VariableParticleReal3 & intersections,
VariableParticleReal & distances,
VariableParticleInt32 & rays_face )
pure virtual

Calculates the intersection of rays.

Calculates the intersection of rays in the family ray_family with the surface of the mesh. The position and direction of the rays are given by the variables rays_position and rays_direction. The array rays_orig_face contains the local ID of the face from which the ray originates. This array is used in the IRayFaceIntersector.

In return, rays_face will contain for each ray the localId() of the intersected face or NULL_ITEM_LOCAL_ID if a ray does not intersect any face. The array rays_intersection returns the position of the intersection point and rays_distance the distance of the intersection point relative to the ray origin. The array user_values is filled in return by the IRayFaceIntersector.

In parallel, the rays in the family are exchanged between sub-domains so that a ray is in the same sub-domain as the owner of the intersected face. If a ray does not intersect any face, it remains in this sub-domain.

Implemented in Arcane::BasicRayMeshIntersection.

◆ compute() [2/2]

virtual void Arcane::IRayMeshIntersection::compute ( Real3ConstArrayView segments_position,
Real3ConstArrayView segments_direction,
Int32ConstArrayView orig_faces_local_id,
Int32ArrayView user_values,
Real3ArrayView intersections,
RealArrayView distances,
Int32ArrayView faces_local_id )
pure virtual

Calculates the intersection.

In return, the array faces_local_id contains the local ID of the intersected face for each segment. If a segment does not intersect any face, the corresponding local_id is NULL_ITEM_LOCAL_ID.

Implemented in Arcane::BasicRayMeshIntersection.

◆ faceIntersector()

virtual IRayFaceIntersector * Arcane::IRayMeshIntersection::faceIntersector ( )
pure virtual

Intersector used (0 if none specified).

Implemented in Arcane::BasicRayMeshIntersection.

◆ setFaceIntersector()

virtual void Arcane::IRayMeshIntersection::setFaceIntersector ( IRayFaceIntersector * intersector)
pure virtual

Sets the intersection callback.

This allows the caller to specify its method for calculating the intersection of a ray with a face. If this method is not called, a default intersector is used.

Implemented in Arcane::BasicRayMeshIntersection.


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