-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrustum.java
More file actions
45 lines (37 loc) · 1.19 KB
/
Frustum.java
File metadata and controls
45 lines (37 loc) · 1.19 KB
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
class Frustum {
Point[] points = new Point[8];
public Frustum(Point[] points1) {
for (int i = 0; i < 8; i++) {
points[i] = points1[i];
}
}
public Frustum(Frustum frustum) {
for (int i = 0; i < 8; i++) {
points[i] = new Point(frustum.points[i].GetExX(), frustum.points[i].GetExY(), frustum.points[i].GetExZ());
}
}
public void RotateCounterClockwiseAboutYAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateCounterClockwiseAboutYAxis(p, degrees);
}
public void RotateClockwiseAboutYAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateClockwiseAboutYAxis(p, degrees);
}
public void RotateCounterClockwiseAboutXAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateCounterClockwiseAboutXAxis(p, degrees);
}
public void RotateClockwiseAboutXAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateClockwiseAboutXAxis(p, degrees);
}
public void RotateCounterClockwiseAboutZAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateCounterClockwiseAboutZAxis(p, degrees);
}
public void RotateClockwiseAboutZAxis(Point p, float degrees) {
for (Point p1 : points)
p1.RotateClockwiseAboutZAxis(p, degrees);
}
}