Ejemplo n.º 1
0
        public override void Render(AreaVisualizerData data)
        {
            _curData = data;

            var mpos = _curData.MyPos;

            _model.Transform = new TranslateTransform3D(new Vector3D(mpos.X, mpos.Y, 0));

            var cam = View.Camera as PerspectiveCamera;

            // While we're here, lets lock the camera. :)
            if (LockCamera)
            {
                cam.Position      = new Point3D(mpos.X, mpos.Y, cam.Position.Z);
                cam.LookDirection = new Vector3D(0, 0, -cam.Position.Z);
            }

            _playerLocationText.Dispatcher.BeginInvoke(new System.Action(() =>
            {
                _playerLocationText.Text = "Player Location: " + mpos.X + ", " + mpos.Y;
            }));

            _cameraPositionText.Dispatcher.BeginInvoke(new System.Action(() =>
            {
                _cameraPositionText.Text = "Camera Position: " + cam.Position.X.ToString("0.00") + ", " + cam.Position.Y.ToString("0.00") + ", " + cam.Position.Z.ToString("0.00");
            }));

            _cameraLookDirectionText.Dispatcher.BeginInvoke(new System.Action(() =>
            {
                _cameraLookDirectionText.Text = "Camera Look Direction: " + cam.LookDirection.X.ToString("0.00") + ", " + cam.LookDirection.Y.ToString("0.00") + ", " + cam.LookDirection.Z.ToString("0.00");
            }));
        }
Ejemplo n.º 2
0
        public override void Render(AreaVisualizerData data)
        {
            var polyPathfinder = ExilePather.PolyPathfinder;

            if (polyPathfinder == null)
            {
                return;
            }

            _curData = data;

            // Detect mesh updates by checking if the mesh is generated, and the seed it was generated on.
            if (polyPathfinder.AreaGenerated && polyPathfinder.GeneratedAreaHash == _curData.Seed)
            {
                if ((Visual as MeshVisual3D).Content == null || _initialSeed != _curData.Seed)
                {
                    CreateVisual();
                    //AddChild(Visual);
                }
            }
        }
Ejemplo n.º 3
0
        public override void Render(AreaVisualizerData data)
        {
            var polyPathfinder = ExilePather.PolyPathfinder;

            if (polyPathfinder == null)
            {
                return;
            }

            _curData = data;

            // Detect mesh updates by checking if the mesh is generated, and the seed it was generated on.
            if (polyPathfinder.AreaGenerated)
            {
                if (polyPathfinder.GeneratedAreaHash == _curData.Seed || _curData.ForceReload)
                {
                    if ((Visual as MeshVisual3D).Content == null || _initialSeed != _curData.Seed || _curData.ForceReload)
                    {
                        _curData.ForceReload = false;
                        CreateNavMeshOverlay();
                    }
                }
            }
        }
Ejemplo n.º 4
0
 public abstract void Render(AreaVisualizerData data);