コード例 #1
0
        public void StartTrace(TraceSession parent, OpenMetaverse.AgentManager avatarManager)
        {
            mGridClient = parent.Client;
            mAgentManager = avatarManager;

            mLastUpdate = DateTime.Now;
        }
コード例 #2
0
ファイル: RawPacketTracer.cs プロジェクト: ewencp/sltrace
        public void StartTrace(TraceSession parent)
        {
            mParent = parent;

            mParent.Client.Network.RegisterCallback(
            PacketType.Default,
            new NetworkManager.PacketCallback(this.PacketHandler)
            );
        }
コード例 #3
0
ファイル: ObjectPathTracer.cs プロジェクト: ewencp/sltrace
        public void StartTrace(TraceSession parent)
        {
            mParent = parent;

            // For initial startup info
            mParent.Client.Network.OnSimConnected +=
            new NetworkManager.SimConnectedCallback(this.SimConnectedHandler);

            string renderer_name = "OpenMetaverse.Rendering.Meshmerizer.dll";
            string renderer_path = System.IO.Path.Combine(parent.Config.BinaryPath, renderer_name);
            mRenderer = OpenMetaverse.Rendering.RenderingLoader.LoadRenderer(renderer_path);

            mObjectsByLocalID = new Dictionary<uint, Primitive>();
            mObjectsByID = new Dictionary<UUID, Primitive>();
            mObjectParents = new Dictionary<UUID, uint>();

            mParent.Client.Objects.OnObjectDataBlockUpdate +=
            new ObjectManager.ObjectDataBlockUpdateCallback(this.ObjectDataBlockUpdateHandler);

            mParent.Client.Objects.OnNewAvatar +=
            new ObjectManager.NewAvatarCallback(this.NewAvatarHandler);

            mParent.Client.Objects.OnNewPrim +=
            new ObjectManager.NewPrimCallback(this.NewPrimHandler);

            mParent.Client.Objects.OnNewAttachment +=
            new ObjectManager.NewAttachmentCallback(this.NewAttachmentHandler);

            // Note: We only do OnObjectTerseUpdate because OnObjectUpdate
            // is redundant and less informative.
            mParent.Client.Objects.OnObjectTerseUpdate +=
            new ObjectManager.ObjectUpdatedTerseCallback(this.ObjectUpdatedTerseHandler);

            mParent.Client.Objects.OnObjectKilled +=
            new ObjectManager.KillObjectCallback(this.ObjectKilledHandler);

            mParent.Client.Objects.OnObjectProperties +=
            new ObjectManager.ObjectPropertiesCallback(this.ObjectPropertiesHandler);

            mParent.Client.Self.Movement.Camera.Far = 512.0f;

            // We output JSON, one giant list of events
            System.IO.TextWriter streamWriter =
            new System.IO.StreamWriter(mTraceFilename);
            mJSON = new JSON(streamWriter);
            mJSON.BeginArray();

            mStartTime = DateTime.Now;
        }