Commit 2d447376 authored by maesius's avatar maesius

Correction sur un cosinus + correction de #define

parent a4115369
......@@ -12,8 +12,8 @@
* Description du fichier ici
*/
#ifndef LrCameraCylindric_H
#define LrCameraCylindric_H
#ifndef LRCAMERACYLINDRIC_H
#define LRCAMERACYLINDRIC_H
#include "LrCamera.h"
......
......@@ -87,11 +87,13 @@ bool operator != (const LrCameraSpheric &lhs, const LrCameraSpheric &rhs)
LrRay LrCameraSpheric::getRay(Real u, Real v) const {
LrVector vectorRay = cos(v * m_angleRadV) * cos(u * m_angleRadH) * m_direction
+ cos(v * m_angleRadV) * sin(u * m_angleRadH) * m_horizontal
Real cosTmp = cos(v * m_angleRadV);
LrVector vectorRay = cosTmp * cos(u * m_angleRadH) * m_direction
+ cosTmp * sin(u * m_angleRadH) * m_horizontal
- sin(v * m_angleRadV) * m_vertical;
vectorRay.normalize();
vectorRay.normalize(); // Par précaution
return LrRay(vectorRay,m_position);
......
......@@ -12,8 +12,8 @@
* Description du fichier ici
*/
#ifndef LrCameraSpheric_H
#define LrCameraSpheric_H
#ifndef LRCAMERASPHERIC_H
#define LRCAMERASPHERIC_H
#include "LrCamera.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment