SCM Repository
[diderot] Annotation of /branches/pure-cfg/test/vr.diderot
Annotation of /branches/pure-cfg/test/vr.diderot
Parent Directory
|
Revision Log
Revision 38 -
(view)
(download)
Original Path: trunk/test/vr.diderot
1 : |
jhr |
36 |
// vr.diderot
|
2 : |
|
|
//
|
3 : |
|
|
// volume rendering example in Diderot
|
4 : |
|
|
//
|
5 : |
|
|
|
6 : |
jhr |
38 |
input string dataFile; // name of dataset
|
7 : |
|
|
input real stepSz; // size of steps
|
8 : |
jhr |
36 |
|
9 : |
|
|
image<3> img = load (dataFile);
|
10 : |
|
|
|
11 : |
jhr |
38 |
actor RayCast (int row, int col)
|
12 : |
|
|
{
|
13 : |
|
|
vec<3> dir = (real(row), real(col));
|
14 : |
|
|
vec<3> pos = (0.0, 0.0);
|
15 : |
|
|
vec<3> t = 0.0;
|
16 : |
|
|
|
17 : |
|
|
update
|
18 : |
|
|
{
|
19 : |
|
|
pos = pos + t*dir;
|
20 : |
|
|
}
|
21 : |
|
|
|
22 : |
|
|
}
|