19#ifndef _EM_INTERFACE_H
20#define _EM_INTERFACE_H
36 Real m_transmission = 1.;
37 std::vector<Real>
const *m_txMap =
nullptr;
38 bool m_fullyOpaque =
false;
39 bool m_fullyTransparent =
true;
42 unsigned int m_cols = 0;
43 unsigned int m_rows = 0;
44 unsigned int m_stride = 0;
50 snell(
Vec3 &u,
Vec3 const &normal, Real muIORatio)
52 Vec3 nXu = muIORatio * normal.cross(u);
53 u = -normal.cross(nXu) - normal * sqrt(1 - nXu * nXu);
57 snell(
Vec3 const &u,
Vec3 const &normal, Real muIORatio)
59 Vec3 nXu = muIORatio * normal.cross(u);
61 return -normal.cross(nXu) - normal * sqrt(1 - nXu * nXu);
65 reflection(
Vec3 &u,
Vec3 const &normal)
67 u -= 2 * (u * normal) * normal;
71 reflection(
Vec3 const &u,
Vec3 const &normal)
73 return u - 2 * (u * normal) * normal;
77 constRandState()
const
89 mustTransmitRay(
const RayBeam *beam, uint64_t i)
91 return beam->hasRay(i) && beam->isIntercepted(i);
97 void setTransmission(Real);
101 std::vector<Real>
const &map,
104 unsigned int stride);
106 virtual std::string name()
const = 0;
Definition: EMInterface.h:34
Definition: RayBeam.h:261