Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IRayMeshIntersection.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IRayMeshIntersection.h (C) 2000-2025 */
9/* */
10/* Calculation of the intersection between segments and the surface of a */
11/* mesh. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_IRAYMESHINTERSECTION_H
14#define ARCANE_CORE_IRAYMESHINTERSECTION_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
33{
34 public:
35
36 virtual ~IRayFaceIntersector() {}
37
38 public:
39
54 virtual bool computeIntersection(Real3 origin, Real3 direction,
55 Int32 orig_face_local_id,
56 Int32 face_local_id,
57 Real3ConstArrayView face_nodes,
58 Int32* user_value,
59 Real* distance, Real3* intersection_position) = 0;
60};
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
70{
71 public:
72
74 virtual ~IRayMeshIntersection() = default;
75
76 public:
77
79 virtual void build() = 0;
80
81 public:
82
90 virtual void compute(Real3ConstArrayView segments_position,
91 Real3ConstArrayView segments_direction,
92 Int32ConstArrayView orig_faces_local_id,
93 Int32ArrayView user_values,
94 Real3ArrayView intersections,
95 RealArrayView distances,
96 Int32ArrayView faces_local_id) = 0;
97
123 virtual void compute(IItemFamily* ray_family,
124 VariableParticleReal3& rays_position,
125 VariableParticleReal3& rays_direction,
126 VariableParticleInt32& rays_orig_face,
127 VariableParticleInt32& user_values,
128 VariableParticleReal3& intersections,
129 VariableParticleReal& distances,
130 VariableParticleInt32& rays_face) = 0;
131
139 virtual void setFaceIntersector(IRayFaceIntersector* intersector) = 0;
140
143};
144
145/*---------------------------------------------------------------------------*/
146/*---------------------------------------------------------------------------*/
147
148} // namespace Arcane
149
150/*---------------------------------------------------------------------------*/
151/*---------------------------------------------------------------------------*/
152
153#endif
Declarations of Arcane's general types.
Interface of an entity family.
Definition IItemFamily.h:83
Generic interface for calculating the intersection of a ray with a face.
virtual bool computeIntersection(Real3 origin, Real3 direction, Int32 orig_face_local_id, Int32 face_local_id, Real3ConstArrayView face_nodes, Int32 *user_value, Real *distance, Real3 *intersection_position)=0
Calculates the intersection between a ray and a face.
Calculation of the intersection between a set of segments and the surface of a mesh.
virtual ~IRayMeshIntersection()=default
Frees resources.
virtual void build()=0
Builds the instance.
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 IRayFaceIntersector * faceIntersector()=0
Intersector used (0 if none specified).
virtual void setFaceIntersector(IRayFaceIntersector *intersector)=0
Sets the intersection callback.
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.
Class managing a 3-dimensional real vector.
Definition Real3.h:132
MeshVariableScalarRefT< Particle, Real3 > VariableParticleReal3
Coordinate type particle quantity.
MeshVariableScalarRefT< Particle, Int32 > VariableParticleInt32
Particle quantity of 32-bit integer type.
MeshVariableScalarRefT< Particle, Real > VariableParticleReal
Real type particle quantity.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Real3 > Real3ConstArrayView
C equivalent of a 1D array of Real3.
Definition UtilsTypes.h:496
ArrayView< Real3 > Real3ArrayView
C equivalent of a 1D array of Real3.
Definition UtilsTypes.h:467
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453
double Real
Type representing a real number.
ArrayView< Real > RealArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:459
std::int32_t Int32
Signed integer type of 32 bits.