-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRT.cpp
More file actions
36 lines (30 loc) · 643 Bytes
/
RT.cpp
File metadata and controls
36 lines (30 loc) · 643 Bytes
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
#include "RT.h"
using namespace std;
Test::Test(Generator * _generator, int _sampleCount):sampleCount(_sampleCount), generator(_generator)
{
samples = new int[_sampleCount];
}
Test::~Test()
{
delete [] samples;
}
void Test::drawSamples()
{
for (int i = 0; i < sampleCount; i++)
{
samples[i] = (*generator)();
}
}
void Test::displaySamples(ostream & output)
{
for (int i = 0; i < sampleCount; i++)
{
output << samples[i];
}
}
void Test::setGenerator(int _minimum, int _maximum, int _seed)
{
generator->setMin(_minimum);
generator->setMax(_maximum);
generator->setSeed(_seed);
}