# Detail of project Visionaray

## 1. Presentation

The project Visionaray is develop by SEARIS. It is cross platform ray tracing library. The codes are based on language C++.

The interesting part for us is : visionaray/include/visionaray/math/ (github.com/szellmann/visionaray/tree/master/include/visionaray/math). It detail the mathematical tools.

## 2. General Structure

The repository is composed by folder :

• include/visionaray : regroup the heart of code ( a tools to trait the surface, create ray …​ )

• include/visionaray/math : regroup the mathematical tools (Most important part for the stage)

• src/ :

## 3. Interseption of ray

The most important part is the script intercept.h (in include/visionaray/math/), wich detail when a ray (represented by a origin $O$ point and directional vector $\mathbf{v}$) is intercept by a geometrical object in space of three dimension.

See Visionaray Method to detail the theorical geometry. In this section we have some algebric condition to verify to have interception or not.

List of case of interception :

 The code of visionarray doesn’t take into account the sens of ray. The intersection is not with semi-right but with right. In geometrical tools, we take into account the sens of ray.

It introduce the class hit_record<basic_ray<T>, …​.>, it represent the intersection or not of a ray and geometrical object, it composed by :

• mask_type hit : 1 if it intersect, 0 if not

• prim_id : represent the type of primitive of geometrical object

• geom_id : represent the type of geometrical object

• some arguments usefull to calculate the intersection or not

The function hit_record<basic_ray<T>, basic_aabb<U>> intersect calculates the conditon of intersection and return a correspond hit_record.

## 4. References

• Visionaray, Zellman, github.com/szellmann/visionaray

• Visionaray: A Cross-Platform Ray Tracing Template Library, Zellmann, Stefan and Wickeroth, Daniel and Lang, Ulrich, Proceedings of the 10th Workshop on Software Engineering and Architectures for Realtime Interactive Systems (IEEE SEARIS 2017), 2017