diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 115 |
1 files changed, 1 insertions, 114 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5e770ba..e6e3ad0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -47,57 +47,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
47 | 47 | ||
48 | public delegate void ChangedBackupDelegate(SceneObjectGroup sog); | 48 | public delegate void ChangedBackupDelegate(SceneObjectGroup sog); |
49 | 49 | ||
50 | |||
51 | public enum ObjectChangeWhat : uint | ||
52 | { | ||
53 | // bits definitions | ||
54 | Position = 0x01, | ||
55 | Rotation = 0x02, | ||
56 | Scale = 0x04, | ||
57 | Group = 0x08, | ||
58 | UniformScale = 0x10, | ||
59 | |||
60 | // macros from above | ||
61 | // single prim | ||
62 | primP = 0x01, | ||
63 | primR = 0x02, | ||
64 | primPR = 0x03, | ||
65 | primS = 0x04, | ||
66 | primPS = 0x05, | ||
67 | primRS = 0x06, | ||
68 | primPSR = 0x07, | ||
69 | |||
70 | primUS = 0x14, | ||
71 | primPUS = 0x15, | ||
72 | primRUS = 0x16, | ||
73 | primPUSR = 0x17, | ||
74 | |||
75 | // group | ||
76 | groupP = 0x09, | ||
77 | groupR = 0x0A, | ||
78 | groupPR = 0x0B, | ||
79 | groupS = 0x0C, | ||
80 | groupPS = 0x0D, | ||
81 | groupRS = 0x0E, | ||
82 | groupPSR = 0x0F, | ||
83 | |||
84 | groupUS = 0x1C, | ||
85 | groupPUS = 0x1D, | ||
86 | groupRUS = 0x1E, | ||
87 | groupPUSR = 0x1F, | ||
88 | |||
89 | PRSmask = 0x07 | ||
90 | } | ||
91 | |||
92 | public struct ObjectChangeData | ||
93 | { | ||
94 | public Quaternion rotation; | ||
95 | public Vector3 position; | ||
96 | public Vector3 scale; | ||
97 | public ObjectChangeWhat what; | ||
98 | } | ||
99 | |||
100 | |||
101 | /// <summary> | 50 | /// <summary> |
102 | /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components | 51 | /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components |
103 | /// should be migrated out over time. | 52 | /// should be migrated out over time. |
@@ -1352,75 +1301,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1352 | { | 1301 | { |
1353 | if (m_parentScene.Permissions.CanEditObject(grp.UUID, remoteClient.AgentId)) | 1302 | if (m_parentScene.Permissions.CanEditObject(grp.UUID, remoteClient.AgentId)) |
1354 | { | 1303 | { |
1355 | // part.StoreUndoState(data.what | ObjectChangeWhat.PRSmask); // for now save all to keep previus behavour ??? | 1304 | part.StoreUndoState(data.change); // lets test only saving what we changed |
1356 | part.StoreUndoState(data.what); // lets test only saving what we changed | ||
1357 | grp.doChangeObject(part, (ObjectChangeData)data); | 1305 | grp.doChangeObject(part, (ObjectChangeData)data); |
1358 | } | 1306 | } |
1359 | } | 1307 | } |
1360 | } | 1308 | } |
1361 | } | 1309 | } |
1362 | 1310 | ||
1363 | /* moved to SOG | ||
1364 | protected internal void doChangeObject(SceneObjectPart part, ObjectChangeData data) | ||
1365 | { | ||
1366 | if (part != null && part.ParentGroup != null) | ||
1367 | { | ||
1368 | ObjectChangeWhat what = data.what; | ||
1369 | bool togroup = ((what & ObjectChangeWhat.Group) != 0); | ||
1370 | // bool uniform = ((what & ObjectChangeWhat.UniformScale) != 0); not in use | ||
1371 | |||
1372 | SceneObjectGroup group = part.ParentGroup; | ||
1373 | PhysicsActor pha = group.RootPart.PhysActor; | ||
1374 | |||
1375 | if (togroup) | ||
1376 | { | ||
1377 | // related to group | ||
1378 | if ((what & ObjectChangeWhat.Position) != 0) | ||
1379 | group.AbsolutePosition = data.position; | ||
1380 | if ((what & ObjectChangeWhat.Rotation) != 0) | ||
1381 | group.RootPart.UpdateRotation(data.rotation); | ||
1382 | if ((what & ObjectChangeWhat.Scale) != 0) | ||
1383 | { | ||
1384 | if (pha != null) | ||
1385 | pha.Building = true; | ||
1386 | group.GroupResize(data.scale); | ||
1387 | if (pha != null) | ||
1388 | pha.Building = false; | ||
1389 | } | ||
1390 | } | ||
1391 | else | ||
1392 | { | ||
1393 | // related to single prim in a link-set ( ie group) | ||
1394 | if (pha != null) | ||
1395 | pha.Building = true; | ||
1396 | |||
1397 | // must deal with root part specially for position and rotation | ||
1398 | // so parts offset positions or rotations are fixed | ||
1399 | |||
1400 | if (part == group.RootPart) | ||
1401 | { | ||
1402 | if ((what & ObjectChangeWhat.Position) != 0) | ||
1403 | group.UpdateRootPosition(data.position); | ||
1404 | if ((what & ObjectChangeWhat.Rotation) != 0) | ||
1405 | group.UpdateRootRotation(data.rotation); | ||
1406 | } | ||
1407 | else | ||
1408 | { | ||
1409 | if ((what & ObjectChangeWhat.Position) != 0) | ||
1410 | part.OffsetPosition = data.position; | ||
1411 | if ((what & ObjectChangeWhat.Rotation) != 0) | ||
1412 | part.UpdateRotation(data.rotation); | ||
1413 | } | ||
1414 | |||
1415 | if ((what & ObjectChangeWhat.Scale) != 0) | ||
1416 | part.Resize(data.scale); | ||
1417 | |||
1418 | if (pha != null) | ||
1419 | pha.Building = false; | ||
1420 | } | ||
1421 | } | ||
1422 | } | ||
1423 | */ | ||
1424 | /// <summary> | 1311 | /// <summary> |
1425 | /// Update the scale of an individual prim. | 1312 | /// Update the scale of an individual prim. |
1426 | /// </summary> | 1313 | /// </summary> |