1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// RayCaster.cpp

#include "RayCaster.h"
#include <iostream>
using namespace std;
RayCaster::RayCaster()
{
	m_LightDirection[0] = 1.0f;
	m_LightDirection[1] = 0.0f;
	m_LightDirection[2] = 0.0f;
	m_LightDirection[3] = 0.0f;


//	m_LightIntensity = 1.0f;


//	m_SampleDistance = 1.0f;   
	m_SampleDistance = 1.0f;   

	

}
RayCaster::~RayCaster()
{

}



void RayCaster::MakeReference()
{
	m_OldLightDirection=m_LightDirection;
}

void RayCaster::RotateLightDirection(const Matrix4x4& matrix)
{
	m_LightDirection=matrix*m_OldLightDirection;
}