-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPhotonMappingUtils.cs
82 lines (63 loc) · 1.75 KB
/
PhotonMappingUtils.cs
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
public class PhotonMappingUtils
{
// ----- Raytracing Globals -----
bool objectIntersect = false; //For Latest Raytracing Call... Was Anything Intersected by the Ray?
int objectType; //... Type of the Intersected Object (Sphere or Plane)
int objectIdx; //... Index of the Intersected Object (Which Sphere/Plane Was It?)
float objSquareDistance;
float objDistance = -1.0f; //... Distance from Ray Origin to Intersection
float[] intersectPoint = {0.0f, 0.0f, 0.0f}; //... Point At Which the Ray Intersected the Object
float[] worldOrigin = {0.0f,0.0f,0.0f};
public PhotonMappingUtils (bool interset, int type, int index, float sqDistance, float distance, float[] point)
{
setIntersect (interset);
setType (type);
setIndex (index);
setSqDistance (sqDistance);
setDistance (distance);
setPoint (point);
}
public void setIntersect(bool intersect) {
objectIntersect = intersect;
}
public bool getIntersect() {
return objectIntersect;
}
public void setType(int type) {
objectType = type;
}
public int getType() {
return objectType;
}
public void setIndex(int index) {
objectIdx = index;
}
public int getIndex(){
return objectIdx;
}
public void setSqDistance(float sqDistance) {
objSquareDistance = sqDistance;
}
public float getSqDistance() {
return objSquareDistance;
}
public void setDistance(float distance) {
objDistance = distance;
}
public float getDistance() {
return objDistance;
}
public void setPoint(float[] point) {
intersectPoint = point;
}
public float[] getPoint() {
return intersectPoint;
}
public void setWorldOrigin(float[] o) {
worldOrigin = o;
}
public float[] getWorldOrigin() {
return worldOrigin;
}
}