diff options
author | gareth | 2007-03-07 19:07:00 +0000 |
---|---|---|
committer | gareth | 2007-03-07 19:07:00 +0000 |
commit | 2159b3079ec8df2a7337a9d4ea54810b7028c4e1 (patch) | |
tree | 5473123011f7a302e63f89ec6ccb4477032fd1db /src/types | |
parent | Imported branch (diff) | |
download | opensim-SC-2159b3079ec8df2a7337a9d4ea54810b7028c4e1.zip opensim-SC-2159b3079ec8df2a7337a9d4ea54810b7028c4e1.tar.gz opensim-SC-2159b3079ec8df2a7337a9d4ea54810b7028c4e1.tar.bz2 opensim-SC-2159b3079ec8df2a7337a9d4ea54810b7028c4e1.tar.xz |
fixed last screwup
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/Mesh.cs | 28 | ||||
-rw-r--r-- | src/types/Triangle.cs | 28 |
2 files changed, 56 insertions, 0 deletions
diff --git a/src/types/Mesh.cs b/src/types/Mesh.cs new file mode 100644 index 0000000..3e00c91 --- /dev/null +++ b/src/types/Mesh.cs | |||
@@ -0,0 +1,28 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.types | ||
6 | { | ||
7 | // TODO: This will need some performance tuning no doubt. | ||
8 | public class Mesh | ||
9 | { | ||
10 | public List<Triangle> mesh; | ||
11 | |||
12 | public Mesh() | ||
13 | { | ||
14 | mesh = new List<Triangle>(); | ||
15 | } | ||
16 | |||
17 | public void AddTri(Triangle tri) | ||
18 | { | ||
19 | mesh.Add(tri); | ||
20 | } | ||
21 | |||
22 | public static Mesh operator +(Mesh a, Mesh b) | ||
23 | { | ||
24 | a.mesh.AddRange(b.mesh); | ||
25 | return a; | ||
26 | } | ||
27 | } | ||
28 | } | ||
diff --git a/src/types/Triangle.cs b/src/types/Triangle.cs new file mode 100644 index 0000000..8dfea6e --- /dev/null +++ b/src/types/Triangle.cs | |||
@@ -0,0 +1,28 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using Axiom.MathLib; | ||
5 | |||
6 | namespace OpenSim.types | ||
7 | { | ||
8 | public class Triangle | ||
9 | { | ||
10 | Vector3 a; | ||
11 | Vector3 b; | ||
12 | Vector3 c; | ||
13 | |||
14 | public Triangle() | ||
15 | { | ||
16 | a = new Vector3(); | ||
17 | b = new Vector3(); | ||
18 | c = new Vector3(); | ||
19 | } | ||
20 | |||
21 | public Triangle(Vector3 A, Vector3 B, Vector3 C) | ||
22 | { | ||
23 | a = A; | ||
24 | b = B; | ||
25 | c = C; | ||
26 | } | ||
27 | } | ||
28 | } | ||