aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
blob: 03432bc003a5ecc6d211580f4d97d4e66b1a0b75 (plain)
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
using OpenMetaverse;
using OpenSim.Region.Framework.Scenes;

namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
    class SPAvatar : IAvatar
    {
        private readonly Scene m_rootScene;
        private readonly UUID m_ID;

        public SPAvatar(Scene scene, UUID ID)
        {
            m_rootScene = scene;
            m_ID = ID;
        }

        private ScenePresence GetSP()
        {
            return m_rootScene.GetScenePresence(m_ID);
        }

        public string Name
        {
            get { return GetSP().Name; }
        }

        public UUID GlobalID
        {
            get { return m_ID; }
        }

        public Vector3 Position
        {
            get { return GetSP().AbsolutePosition; }
        }
    }
}