94 virtual bool generateTest(std::vector<vec3>& succededTest, std::vector<vec3>& failTest,
95 unsigned int nbResponses);
102 #ifdef _ALLOW_TARGETING_
104 virtual bool generateResponse(std::vector<vec3>& responses,
unsigned int nbResponses);
void computeDTheta()
Compute the angle step between two responses in function of the aperture angle and the number of resp...
decimal getAngleOuverture()
Get the aperture angle of the cone of Keller.
virtual void setNbResponseLeft(int _nbResponseLeft)
Set the number of remaining rays to launch.
Repere localRepere
Local frame.
decimal getDeltaTheta() const
Get the angle between 2 consecutive responses.
virtual bool getResponse(vec3 &r, bool force=false)
Computes the next response of the event in function of the number of responses left.
virtual ~Diffraction()
Destructor.
decimal delta_theta
Angle step between two rays to send.
decimal angleArrive
Incident ray angle.
virtual bool generateTest(std::vector< vec3 > &succededTest, std::vector< vec3 > &failTest, unsigned int nbResponses)
bool(* responseValidator)(const vec3 &, const vec3 &, const vec3 &, vec3 &)
Filter generated response (or not)
void computeAngle()
Compute the angle between the incident ray and the diffraction edge.
void buildRepere()
Build local frame.
virtual double getAngle()
Get the angle between the incident ray and the diffraction edge.
void(* getTheta)(const decimal &, const decimal &, const decimal &, decimal &)
virtual const Repere & getRepere() const
Get the local frame.
void setAngleOuverture(decimal angle)
Set the aperture angle of the cone of Keller.
Diffraction(const vec3 &position=vec3(0.0, 0.0, 0.0), const vec3 &incomingDirection=vec3(0.0, 0.0, 0.0), Cylindre *c=NULL)
Constructor.
decimal angleOuverture
Angle formed by the two faces of the diffraction edge.
Class describing an event (reflection, diffraction, ...)
int nbResponseLeft
Number of remaining rays to launch.
int initialNbResponse
Number of rays to launch after event.
virtual bool generateResponse(std::vector< vec3 > &responses, unsigned int nbResponses)
virtual bool appendTarget(vec3 target, bool force=false)
virtual bool isAcceptableResponse(vec3 &test)
Return true if the ray direction vector in response of the event is acceptable.
base_vec3< decimal > vec3