public AddNewSceneObject ( SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates ) : bool | ||
sceneObject | SceneObjectGroup | |
attachToBackup | bool | /// If true, the object is made persistent into the scene. /// If false, the object will not persist over server restarts /// |
sendClientUpdates | bool | /// If true, updates for the new scene object are sent to all viewers in range. /// If false, it is left to the caller to schedule the update /// |
return | bool |
public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
{
return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
}
Scene::AddNewSceneObject ( SceneObjectGroup sceneObject, bool attachToBackup ) : bool | |
Scene::AddNewSceneObject ( SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel ) : bool |
public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) { XmlDocument doc = new XmlDocument(); XmlNode rootNode; if (fileName.StartsWith("http:") || File.Exists(fileName)) { XmlTextReader reader = new XmlTextReader(fileName); reader.WhitespaceHandling = WhitespaceHandling.None; doc.Load(reader); reader.Close(); rootNode = doc.FirstChild; foreach (XmlNode aPrimNode in rootNode.ChildNodes) { SceneObjectGroup obj = SceneObjectSerializer.FromOriginalXmlFormat(aPrimNode.OuterXml); if (newIDS) { obj.ResetIDs(); } //if we want this to be a import method then we need new uuids for the object to avoid any clashes //obj.RegenerateFullIDs(); scene.AddNewSceneObject(obj, true); } } else { throw new Exception("Could not open file " + fileName + " for reading"); } }