Main Page
Modules
Namespaces
Classes
Files
File List
File Members
sm
apps
raytracer
simplemap.h
Go to the documentation of this file.
1
#ifndef MAPAC_H
2
#define MAPAC_H
3
4
#include <iostream>
5
#include <vector>
6
#include <string>
7
8
namespace
RayTracer
{
9
10
using namespace
std
;
11
12
struct
Material
{
13
string
name
;
14
15
/* 0: transparent; 1: solid; in between: randomly */
16
double
infrared_solid
;
17
};
18
19
struct
Stuff
{
20
int
group
;
21
22
Material
*
material
;
23
25
virtual
bool
ray_tracing(
const
double
p
[2],
const
double
direction,
double
& out_distance,
double
&out_alpha)
const
= 0;
26
virtual
~Stuff
(){};
27
};
28
29
struct
Segment
:
public
Stuff
{
30
double
p0[2], p1[2];
31
32
Segment
() {}
33
virtual
~Segment
(){};
34
35
Segment
(
double
x0,
double
y0,
double
x1,
double
y1) {
36
p0[0] = x0; p0[1] = y0;
37
p1[0] = x1; p1[1] = y1;
38
}
39
40
41
bool
ray_tracing(
const
double
p
[2],
const
double
direction,
double
& out_distance,
double
&out_alpha)
const
;
42
};
43
44
struct
Circle
:
public
Stuff
{
45
virtual
~Circle
(){};
46
47
double
p
[2], radius;
48
49
bool
ray_tracing(
const
double
p[2],
const
double
direction,
double
& out_distance,
double
&out_alpha)
const
;
50
};
51
52
struct
Environment
{
53
std::vector<Stuff*>
stuff
;
54
55
bool
ray_tracing(
const
double
p
[2],
const
double
direction,
double
& out_distance,
double
&out_alpha,
int
*stuff_id)
const
;
56
57
};
58
59
60
61
}
62
63
#endif
RayTracer::Environment::stuff
std::vector< Stuff * > stuff
Definition:
simplemap.h:53
RayTracer::Stuff::~Stuff
virtual ~Stuff()
Definition:
simplemap.h:26
RayTracer::Segment
Definition:
simplemap.h:29
RayTracer::Segment::~Segment
virtual ~Segment()
Definition:
simplemap.h:33
RayTracer::Material::name
string name
Definition:
simplemap.h:13
RayTracer::Segment::Segment
Segment(double x0, double y0, double x1, double y1)
Definition:
simplemap.h:35
RayTracer::Stuff
Definition:
simplemap.h:19
std
RayTracer::Stuff::group
int group
Definition:
simplemap.h:20
RayTracer::Circle::~Circle
virtual ~Circle()
Definition:
simplemap.h:45
RayTracer
Definition:
simplemap.cpp:3
RayTracer::Material::infrared_solid
double infrared_solid
Definition:
simplemap.h:16
RayTracer::Material
Definition:
simplemap.h:12
p
struct @0 p
RayTracer::Environment
Definition:
simplemap.h:52
RayTracer::Segment::Segment
Segment()
Definition:
simplemap.h:32
RayTracer::Circle
Definition:
simplemap.h:44
RayTracer::Stuff::material
Material * material
Definition:
simplemap.h:22
csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23