star-4v_s

An invariant property of diffuse random walks
git clone git://git.meso-star.fr/star-4v_s.git
Log | Files | Refs | README | LICENSE

s4vs_realization.h (1609B)


      1 /* Copyright (C) 2015-2018, 2021, 2024 |Méso|Star> (contact@meso-star.com)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #ifndef S4V_S_REALIZATION_H
     17 #define S4V_S_REALIZATION_H
     18 
     19 #include <rsys/rsys.h>
     20 
     21 /* forward definition */
     22 struct s3d_hit;
     23 struct s3d_scene_view;
     24 struct ssp_rng;
     25 
     26 struct s4vs_context {
     27   struct s3d_scene_view* view;
     28   double ks;
     29   double g;
     30 };
     31 
     32 /* Hit filter function used to handle auto intersection */
     33 extern int
     34 s4vs_discard_self_hit
     35   (const struct s3d_hit* hit,
     36    const float ray_org[3],
     37    const float ray_dir[3],
     38    const float ray_range[2],
     39    void* ray_data,
     40    void* filter_data);
     41 
     42 /*******************************************************************************
     43  * MC realization function
     44  ******************************************************************************/
     45 extern res_T
     46 s4vs_realization
     47   (void* length,
     48    struct ssp_rng* rng,
     49    const unsigned ithread,
     50    const uint64_t irealisation,
     51    void* context); /* User defined data */
     52 
     53 #endif /* REALIZATION_H */