aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/world/Entity.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/world/Entity.cs65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/world/Entity.cs b/src/world/Entity.cs
deleted file mode 100644
index 7880a46..0000000
--- a/src/world/Entity.cs
+++ /dev/null
@@ -1,65 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using Axiom.MathLib;
5using libsecondlife;
6using OpenSim.types;
7using libsecondlife.Packets;
8
9namespace OpenSim.world
10{
11 public class Entity
12 {
13 protected libsecondlife.LLUUID uuid;
14 protected uint localid;
15 public LLVector3 position;
16 public LLVector3 velocity;
17 protected Quaternion rotation;
18 protected string name;
19 protected List<Entity> children;
20 public bool needupdate;
21
22 public Entity()
23 {
24 uuid = new libsecondlife.LLUUID();
25 localid = 8880000 + (OpenSim_Main.local_world._localNumber++); // FIXME - race condition!
26 position = new LLVector3();
27 velocity = new LLVector3();
28 rotation = new Quaternion();
29 name = "(basic entity)";
30 children = new List<Entity>();
31 }
32
33 public virtual void update() {
34 // Do any per-frame updates needed that are applicable to every type of entity
35 foreach (Entity child in children)
36 {
37 if(child.needupdate)
38 child.update();
39 }
40 this.needupdate=false;
41 }
42
43 public virtual ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateTerseBlock() {
44 return null;
45 }
46
47
48 public virtual string getName()
49 {
50 return name;
51 }
52
53 public virtual Mesh getMesh()
54 {
55 Mesh mesh = new Mesh();
56
57 foreach (Entity child in children)
58 {
59 mesh += child.getMesh();
60 }
61
62 return mesh;
63 }
64 }
65}