From 7daa3955bc3a1918e40962851f9e8d38597a245e Mon Sep 17 00:00:00 2001 From: gareth Date: Thu, 22 Mar 2007 10:11:15 +0000 Subject: brought zircon branch into trunk --- OpenSim.RegionServer/world/Entity.cs | 67 ++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 OpenSim.RegionServer/world/Entity.cs (limited to 'OpenSim.RegionServer/world/Entity.cs') diff --git a/OpenSim.RegionServer/world/Entity.cs b/OpenSim.RegionServer/world/Entity.cs new file mode 100644 index 0000000..780f3a0 --- /dev/null +++ b/OpenSim.RegionServer/world/Entity.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Axiom.MathLib; +using OpenSim.types; +using libsecondlife; + +namespace OpenSim.world +{ + public class Entity + { + public libsecondlife.LLUUID uuid; + public uint localid; + public LLVector3 position; + public LLVector3 velocity; + public Quaternion rotation; + protected string name; + protected List children; + + public Entity() + { + uuid = new libsecondlife.LLUUID(); + localid = 0; + position = new LLVector3(); + velocity = new LLVector3(); + rotation = new Quaternion(); + name = "(basic entity)"; + children = new List(); + } + public virtual void addForces() + { + foreach (Entity child in children) + { + child.addForces(); + } + } + public virtual void update() { + // Do any per-frame updates needed that are applicable to every type of entity + foreach (Entity child in children) + { + child.update(); + } + } + + public virtual string getName() + { + return name; + } + + public virtual Mesh getMesh() + { + Mesh mesh = new Mesh(); + + foreach (Entity child in children) + { + mesh += child.getMesh(); + } + + return mesh; + } + + public virtual void BackUp() + { + + } + } +} -- cgit v1.1