aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/EntityBase.cs
diff options
context:
space:
mode:
authorSean Dague2007-07-16 15:40:11 +0000
committerSean Dague2007-07-16 15:40:11 +0000
commit2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch)
treee3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Region/Environment/Scenes/EntityBase.cs
parent*Trunk compiles now (diff)
downloadopensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip
opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz
opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2
opensim-SC-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz
changed to native line ending encoding
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/EntityBase.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs284
1 files changed, 142 insertions, 142 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 65a0395..04cf595 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -1,142 +1,142 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using Axiom.Math; 2using Axiom.Math;
3using libsecondlife; 3using libsecondlife;
4 4
5namespace OpenSim.Region.Environment.Scenes 5namespace OpenSim.Region.Environment.Scenes
6{ 6{
7 public abstract class EntityBase 7 public abstract class EntityBase
8 { 8 {
9 public LLUUID uuid; 9 public LLUUID uuid;
10 10
11 protected List<EntityBase> children; 11 protected List<EntityBase> children;
12 12
13 protected Scene m_world; 13 protected Scene m_world;
14 protected string m_name; 14 protected string m_name;
15 15
16 /// <summary> 16 /// <summary>
17 /// 17 ///
18 /// </summary> 18 /// </summary>
19 public virtual string Name 19 public virtual string Name
20 { 20 {
21 get { return m_name; } 21 get { return m_name; }
22 set { m_name = value; } 22 set { m_name = value; }
23 } 23 }
24 24
25 protected LLVector3 m_pos; 25 protected LLVector3 m_pos;
26 /// <summary> 26 /// <summary>
27 /// 27 ///
28 /// </summary> 28 /// </summary>
29 public virtual LLVector3 Pos 29 public virtual LLVector3 Pos
30 { 30 {
31 get 31 get
32 { 32 {
33 return m_pos; 33 return m_pos;
34 } 34 }
35 set 35 set
36 { 36 {
37 m_pos = value; 37 m_pos = value;
38 } 38 }
39 } 39 }
40 40
41 public LLVector3 m_velocity; 41 public LLVector3 m_velocity;
42 42
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 public virtual LLVector3 Velocity 46 public virtual LLVector3 Velocity
47 { 47 {
48 get 48 get
49 { 49 {
50 return m_velocity; 50 return m_velocity;
51 } 51 }
52 set 52 set
53 { 53 {
54 m_velocity = value; 54 m_velocity = value;
55 } 55 }
56 } 56 }
57 57
58 protected Quaternion m_rotation = new Quaternion(0,0,1,0); 58 protected Quaternion m_rotation = new Quaternion(0,0,1,0);
59 59
60 public virtual Quaternion Rotation 60 public virtual Quaternion Rotation
61 { 61 {
62 get 62 get
63 { 63 {
64 return m_rotation; 64 return m_rotation;
65 } 65 }
66 set 66 set
67 { 67 {
68 m_rotation = value; 68 m_rotation = value;
69 } 69 }
70 } 70 }
71 71
72 protected uint m_localId; 72 protected uint m_localId;
73 73
74 public uint LocalId 74 public uint LocalId
75 { 75 {
76 get { return m_localId; } 76 get { return m_localId; }
77 set { m_localId = value; } 77 set { m_localId = value; }
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Creates a new Entity (should not occur on it's own) 81 /// Creates a new Entity (should not occur on it's own)
82 /// </summary> 82 /// </summary>
83 public EntityBase() 83 public EntityBase()
84 { 84 {
85 uuid = new LLUUID(); 85 uuid = new LLUUID();
86 86
87 m_pos = new LLVector3(); 87 m_pos = new LLVector3();
88 m_velocity = new LLVector3(); 88 m_velocity = new LLVector3();
89 Rotation = new Quaternion(); 89 Rotation = new Quaternion();
90 m_name = "(basic entity)"; 90 m_name = "(basic entity)";
91 children = new List<EntityBase>(); 91 children = new List<EntityBase>();
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// 95 ///
96 /// </summary> 96 /// </summary>
97 public virtual void updateMovement() 97 public virtual void updateMovement()
98 { 98 {
99 foreach (EntityBase child in children) 99 foreach (EntityBase child in children)
100 { 100 {
101 child.updateMovement(); 101 child.updateMovement();
102 } 102 }
103 } 103 }
104 104
105 /// <summary> 105 /// <summary>
106 /// Performs any updates that need to be done at each frame. This function is overridable from it's children. 106 /// Performs any updates that need to be done at each frame. This function is overridable from it's children.
107 /// </summary> 107 /// </summary>
108 public virtual void update() 108 public virtual void update()
109 { 109 {
110 // Do any per-frame updates needed that are applicable to every type of entity 110 // Do any per-frame updates needed that are applicable to every type of entity
111 foreach (EntityBase child in children) 111 foreach (EntityBase child in children)
112 { 112 {
113 child.update(); 113 child.update();
114 } 114 }
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Called at a set interval to inform entities that they should back themsleves up to the DB 118 /// Called at a set interval to inform entities that they should back themsleves up to the DB
119 /// </summary> 119 /// </summary>
120 public virtual void BackUp() 120 public virtual void BackUp()
121 { 121 {
122 122
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// Copies the entity 126 /// Copies the entity
127 /// </summary> 127 /// </summary>
128 /// <returns></returns> 128 /// <returns></returns>
129 public virtual EntityBase Copy() 129 public virtual EntityBase Copy()
130 { 130 {
131 return (EntityBase)this.MemberwiseClone(); 131 return (EntityBase)this.MemberwiseClone();
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Infoms the entity that the land (heightmap) has changed 135 /// Infoms the entity that the land (heightmap) has changed
136 /// </summary> 136 /// </summary>
137 public virtual void LandRenegerated() 137 public virtual void LandRenegerated()
138 { 138 {
139 139
140 } 140 }
141 } 141 }
142} 142}