diff options
author | gareth | 2007-02-27 23:00:49 +0000 |
---|---|---|
committer | gareth | 2007-02-27 23:00:49 +0000 |
commit | 09dd4bd6834861791008e66652826a66724efa0e (patch) | |
tree | ae2b10c3b6ce3fab4c516c6710d4fa0adafedb77 /src/world/Primitive.cs | |
parent | Removed old trunk code (diff) | |
download | opensim-SC-09dd4bd6834861791008e66652826a66724efa0e.zip opensim-SC-09dd4bd6834861791008e66652826a66724efa0e.tar.gz opensim-SC-09dd4bd6834861791008e66652826a66724efa0e.tar.bz2 opensim-SC-09dd4bd6834861791008e66652826a66724efa0e.tar.xz |
Brought in code from branches/gareth
Diffstat (limited to 'src/world/Primitive.cs')
-rw-r--r-- | src/world/Primitive.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/world/Primitive.cs b/src/world/Primitive.cs new file mode 100644 index 0000000..143fa55 --- /dev/null +++ b/src/world/Primitive.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.types; | ||
5 | |||
6 | namespace OpenSim.world | ||
7 | { | ||
8 | public class Primitive : Entity | ||
9 | { | ||
10 | protected float mesh_cutbegin; | ||
11 | protected float mesh_cutend; | ||
12 | |||
13 | public Primitive() | ||
14 | { | ||
15 | mesh_cutbegin = 0.0f; | ||
16 | mesh_cutend = 1.0f; | ||
17 | } | ||
18 | |||
19 | public override Mesh getMesh() | ||
20 | { | ||
21 | Mesh mesh = new Mesh(); | ||
22 | Triangle tri = new Triangle( | ||
23 | new Axiom.MathLib.Vector3(0.0f, 1.0f, 1.0f), | ||
24 | new Axiom.MathLib.Vector3(1.0f, 0.0f, 1.0f), | ||
25 | new Axiom.MathLib.Vector3(1.0f, 1.0f, 0.0f)); | ||
26 | |||
27 | mesh.AddTri(tri); | ||
28 | mesh += base.getMesh(); | ||
29 | |||
30 | return mesh; | ||
31 | } | ||
32 | } | ||
33 | } | ||