예제 #1
0
        public override void OnUnSelected()
        {
            base.OnUnSelected();

            Debug.Assert(_hotSpotWindSpeed != null);
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotWindSpeed);
            _hotSpotWindSpeed = null;
        }
예제 #2
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotGravity);  _hotSpotGravity           = null;
            SafeRemoveHotSpot(_hotSpotLightGridOfs);  _hotSpotLightGridOfs = null;

            base.OnUnSelected();
        }
예제 #3
0
        public override void OnSelected()
        {
            base.OnSelected();

            Debug.Assert(_hotSpotWindSpeed == null);
            _hotSpotWindSpeed               = new HotSpot3D(this, 16.0f);
            _hotSpotWindSpeed.ToolTipText   = "Wind speed vector";
            _hotSpotWindSpeed.StartPosition = WindSpeed;
            EditorManager.ActiveView.HotSpots.Add(_hotSpotWindSpeed);
        }
예제 #4
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            System.Diagnostics.Debug.Assert(_hotSpotGravity == null);
            System.Diagnostics.Debug.Assert(_hotSpotLightGridOfs == null);

            // hotspot for gravity
            _hotSpotGravity = new HotSpotDistance(this, @"textures\Hotspot_G.tga", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotGravity.StartDistance  = this.Gravity;
            _hotSpotGravity.Axis           = -Vector3F.ZAxis; // always point down in world space
            _hotSpotGravity.ToolTipText    = "Gravity";
            _hotSpotGravity.DisplayScaling = EditorManager.Settings.GlobalUnitScaling;
            EditorManager.ActiveView.HotSpots.Add(_hotSpotGravity);

            // light grid ofs
            Debug.Assert(_hotSpotLightGridOfs == null);
            _hotSpotLightGridOfs               = new HotSpot3D(this, 16.0f);
            _hotSpotLightGridOfs.ToolTipText   = "light grid offset";
            _hotSpotLightGridOfs.StartPosition = LightGridSampleOfs;
            EditorManager.ActiveView.HotSpots.Add(_hotSpotLightGridOfs);
        }
        void UpdateTangentHotSpots()
        {
            bool bRemoveIn  = true;
            bool bRemoveOut = true;

            if (Selected)
            {
                bRemoveIn  = false;
                bRemoveOut = false;
            }

            if (bRemoveIn && _hotSpotStartPoint != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotStartPoint);
                _hotSpotStartPoint = null;
            }
            else if (!bRemoveIn && _hotSpotStartPoint == null)
            {
                _hotSpotStartPoint               = new HotSpot3D(this, 32.0f);
                _hotSpotStartPoint.ToolTipText   = "Start point";
                _hotSpotStartPoint.StartPosition = _vStartPoint - Position;
                EditorManager.ActiveView.HotSpots.Add(_hotSpotStartPoint);
            }

            if (bRemoveOut && _hotSpotEndPoint != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotEndPoint);
                _hotSpotEndPoint = null;
            }
            else if (!bRemoveOut && _hotSpotEndPoint == null)
            {
                _hotSpotEndPoint               = new HotSpot3D(this, 32.0f);
                _hotSpotEndPoint.ToolTipText   = "End point";
                _hotSpotEndPoint.StartPosition = _vEndPoint - Position;
                EditorManager.ActiveView.HotSpots.Add(_hotSpotEndPoint);
            }
        }
예제 #6
0
        public override void OnSelected()
        {
            base.OnSelected();

              Debug.Assert(_hotSpotWindSpeed == null);
              _hotSpotWindSpeed = new HotSpot3D(this, 16.0f);
              _hotSpotWindSpeed.ToolTipText = "Wind speed vector";
              _hotSpotWindSpeed.StartPosition = WindSpeed;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotWindSpeed);

              Debug.Assert(_hotSpotLightSamplingOffset == null);
              _hotSpotLightSamplingOffset = new HotSpot3D(this, 16.0f);
              _hotSpotLightSamplingOffset.ToolTipText = "Light Sampling Offset";
              _hotSpotLightSamplingOffset.StartPosition = LightSamplingOffset;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotLightSamplingOffset);
        }
예제 #7
0
        public override void OnUnSelected()
        {
            base.OnUnSelected();

              Debug.Assert(_hotSpotWindSpeed != null);
              EditorManager.ActiveView.HotSpots.Remove(_hotSpotWindSpeed);
              _hotSpotWindSpeed = null;

              Debug.Assert(_hotSpotLightSamplingOffset != null);
              EditorManager.ActiveView.HotSpots.Remove(_hotSpotLightSamplingOffset);
              _hotSpotLightSamplingOffset = null;
        }
예제 #8
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotGravity);  _hotSpotGravity = null;
              SafeRemoveHotSpot(_hotSpotLightGridOfs);  _hotSpotLightGridOfs = null;

              base.OnUnSelected ();
        }
예제 #9
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              System.Diagnostics.Debug.Assert(_hotSpotGravity==null);
              System.Diagnostics.Debug.Assert(_hotSpotLightGridOfs==null);

              // hotspot for gravity
              _hotSpotGravity = new HotSpotDistance(this,@"textures\Hotspot_G.tga",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotGravity.StartDistance = this.Gravity;
              _hotSpotGravity.Axis = -Vector3F.ZAxis; // always point down in world space
              _hotSpotGravity.ToolTipText = "Gravity";
              _hotSpotGravity.DisplayScaling = EditorManager.Settings.GlobalUnitScaling;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotGravity);

              // light grid ofs
              Debug.Assert(_hotSpotLightGridOfs==null);
              _hotSpotLightGridOfs = new HotSpot3D(this,16.0f);
              _hotSpotLightGridOfs.ToolTipText = "light grid offset";
              _hotSpotLightGridOfs.StartPosition = LightGridSampleOfs;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotLightGridOfs);
        }
예제 #10
0
 /// <summary>
 /// Overridden un-selection function. Removes the hotspots
 /// </summary>
 public override void OnUnSelected()
 {
     base.OnUnSelected ();
       Debug.Assert(_hotSpotLightGridOfs!=null);
       EditorManager.ActiveView.HotSpots.Remove(_hotSpotLightGridOfs);
       _hotSpotLightGridOfs = null;
       WantsNativeRenderHookCallback = false;
 }
예제 #11
0
 /// <summary>
 /// Overridden selection function. Adds the hotspots
 /// </summary>
 public override void OnSelected()
 {
     base.OnSelected ();
       Debug.Assert(_hotSpotLightGridOfs==null);
       _hotSpotLightGridOfs = new HotSpot3D(this,16.0f);
       _hotSpotLightGridOfs.ToolTipText = "light grid offset";
       _hotSpotLightGridOfs.StartPosition = LightGridSampleOfs;
       EditorManager.ActiveView.HotSpots.Add(_hotSpotLightGridOfs);
       WantsNativeRenderHookCallback = true;
 }
        void UpdateTangentHotSpots()
        {
            bool bRemoveIn = true;
            bool bRemoveOut = true;
            if (Selected)
            {
                bRemoveIn = false;
                bRemoveOut = false;
            }

            if (bRemoveIn && _hotSpotStartPoint != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotStartPoint);
                _hotSpotStartPoint = null;
            }
            else if (!bRemoveIn && _hotSpotStartPoint == null)
            {
               _hotSpotStartPoint = new HotSpot3D(this, 32.0f);
               _hotSpotStartPoint.ToolTipText = "Start point";
               _hotSpotStartPoint.StartPosition = _vStartPoint - Position;
               EditorManager.ActiveView.HotSpots.Add(_hotSpotStartPoint);
            }

            if (bRemoveOut && _hotSpotEndPoint != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotEndPoint);
                _hotSpotEndPoint = null;
            }
            else if (!bRemoveOut && _hotSpotEndPoint == null)
            {
                _hotSpotEndPoint = new HotSpot3D(this, 32.0f);
                _hotSpotEndPoint.ToolTipText = "End point";
                _hotSpotEndPoint.StartPosition = _vEndPoint - Position;
                EditorManager.ActiveView.HotSpots.Add(_hotSpotEndPoint);
            }
        }
예제 #13
0
        /// <summary>
        /// Creates or removes the hotspots. Important when mode changes
        /// </summary>
        void UpdateTangentHotSpots()
        {
            bool bRemoveIn = true;
              bool bRemoveOut = true;
              if (Selected)
              {
            // custom is the only type that allows to edit the tangents via the hotspots
            bRemoveIn = (_inType!=PathNodeInOutType.Custom);
            bRemoveOut = (_outType!=PathNodeInOutType.Custom);
              }

              if (bRemoveIn && _hotSpotTangentIn!=null)
              {
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotTangentIn);
            _hotSpotTangentIn = null;
              }
              else
            if (!bRemoveIn && _hotSpotTangentIn==null)
              {
            _hotSpotTangentIn = new HotSpot3D(this,16.0f);
            _hotSpotTangentIn.ToolTipText = "tangent in";
            _hotSpotTangentIn.StartPosition = TransformToWorldSpace(_tangentIn, false);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotTangentIn);
              }

              if (bRemoveOut && _hotSpotTangentOut!=null)
              {
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotTangentOut);
            _hotSpotTangentOut = null;
              }
              else
            if (!bRemoveOut && _hotSpotTangentOut==null)
              {
            _hotSpotTangentOut = new HotSpot3D(this,16.0f);
            _hotSpotTangentOut.ToolTipText = "tangent out";
            _hotSpotTangentOut.StartPosition = TransformToWorldSpace(_tangentOut, false);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotTangentOut);
              }
        }