-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathObjects.cs
69 lines (55 loc) · 1.36 KB
/
Objects.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
using System;
public class Objects
{
float[][] sphereObject = new float[4][];
float[][] planeObject = new float[5][];
int numberOfSpheres = 0;
int numberOfPlanes = 0;
int numberOfObjectTypes = 2;
public int[] objectsPerType = new int[2];
public Objects ()
{
objectsPerType [0] = 2;
objectsPerType [1] = 5;
}
public int getNumberOfObjectTypes() {
return numberOfObjectTypes;
}
public int getObjectsPerType(int type) {
return objectsPerType [type];
}
public void incrementObjectsPerType(int type) {
objectsPerType [type]++;
}
public void addSphere(float x, float y, float z, float radius) {
float[] newData = new float[4];
newData [0] = x;
newData [1] = y;
newData [2] = z;
newData [3] = radius;
sphereObject[numberOfSpheres] = newData;
numberOfSpheres++;
}
public void addPlane(float axis, float size) {
float[] newData = new float[2];
newData [0] = axis;
newData [1] = size;
planeObject [numberOfPlanes] = newData;
numberOfPlanes++;
}
public float getSphereData(int i, int j) {
return sphereObject [i] [j];
}
public void setSphereData(int i, int j, float data) {
sphereObject [i] [j] = data;
}
public float[] getSphereObject(int i) {
return sphereObject [i];
}
public float getPlaneData(int i, int j) {
return planeObject [i] [j];
}
public float[] getPlaneObject(int i) {
return planeObject [i];
}
}