17#ifndef RESONANCE_AUDIO_GEOMETRICAL_ACOUSTICS_SPHERE_H_
18#define RESONANCE_AUDIO_GEOMETRICAL_ACOUSTICS_SPHERE_H_
20#include "embree2/rtcore.h"
21#include "embree2/rtcore_ray.h"
26struct RTCORE_ALIGN(16) Sphere {
34 unsigned int geometry_id;
44inline void SphereBounds(
const Sphere& sphere, RTCBounds* output_bounds) {
45 output_bounds->lower_x = sphere.center[0] - sphere.radius;
46 output_bounds->lower_y = sphere.center[1] - sphere.radius;
47 output_bounds->lower_z = sphere.center[2] - sphere.radius;
48 output_bounds->upper_x = sphere.center[0] + sphere.radius;
49 output_bounds->upper_y = sphere.center[1] + sphere.radius;
50 output_bounds->upper_z = sphere.center[2] + sphere.radius;
65void SphereIntersection(
const Sphere& sphere, RTCRay* ray);