Example #1
0
        public void CreateHotSpots()
        {
            if (_hotSpotX == null)
            {
                _hotSpotX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
                _hotSpotX.StartDistance  = this.Size.X;
                _hotSpotX.DisplayScaling = 0.5f;
                _hotSpotX.Axis           = this.XAxis;
                _hotSpotX.ToolTipText    = "size in x direction";
                EditorManager.ActiveView.HotSpots.Add(_hotSpotX);
            }

            if (_hotSpotY == null)
            {
                _hotSpotY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
                _hotSpotY.StartDistance  = this.Size.Y;
                _hotSpotY.DisplayScaling = 0.5f;
                _hotSpotY.Axis           = this.YAxis;
                _hotSpotY.ToolTipText    = "size in y direction";
                EditorManager.ActiveView.HotSpots.Add(_hotSpotY);
            }

            if (_hotSpotXY == null)
            {
                _hotSpotXY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
                _hotSpotXY.StartDistance  = this.Size.GetLength();
                _hotSpotXY.DisplayScaling = 0.5f;
                Vector3F axis = (this.YAxis * Size.Y + this.XAxis * Size.X);
                axis.Normalize();
                _hotSpotXY.Axis        = axis;
                _hotSpotXY.ToolTipText = "size";
                EditorManager.ActiveView.HotSpots.Add(_hotSpotXY);
            }
        }
        public override void OnSelected()
        {
            base.OnSelected();
            System.Diagnostics.Debug.Assert(_hotSpotSizeX == null);
            System.Diagnostics.Debug.Assert(_hotSpotSizeY == null);
            System.Diagnostics.Debug.Assert(_hotSpotSizeZ == null);

            // hotspot for size X
            _hotSpotSizeX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeX.StartDistance  = this.BoxSizeX;
            _hotSpotSizeX.DisplayScaling = 0.5f * ScaleX;
            _hotSpotSizeX.Axis           = this.XAxis;
            _hotSpotSizeX.ToolTipText    = "size x direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeX);

            // hotspot for size Y
            _hotSpotSizeY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeY.StartDistance  = this.BoxSizeY;
            _hotSpotSizeY.DisplayScaling = 0.5f * ScaleY;
            _hotSpotSizeY.Axis           = this.YAxis;
            _hotSpotSizeY.ToolTipText    = "size y direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeY);

            // hotspot for size Z
            _hotSpotSizeZ = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeZ.StartDistance  = this.BoxSizeZ;
            _hotSpotSizeZ.DisplayScaling = 0.5f * ScaleZ;
            _hotSpotSizeZ.Axis           = this.ZAxis;
            _hotSpotSizeZ.ToolTipText    = "size z direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeZ);
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotReverbMin); _hotSpotReverbMin = null;
            SafeRemoveHotSpot(_hotSpotReverbMax); _hotSpotReverbMax = null;

            base.OnUnSelected();
        }
Example #4
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotGravity);  _hotSpotGravity           = null;
            SafeRemoveHotSpot(_hotSpotLightGridOfs);  _hotSpotLightGridOfs = null;

            base.OnUnSelected();
        }
Example #5
0
        /// <summary>
        /// Called when the shape is unselected
        /// </summary>
        public override void OnUnSelected()
        {
            SafeRemoveHotSpot(_hotSpotSizeX); _hotSpotSizeX = null;
            SafeRemoveHotSpot(_hotSpotSizeY); _hotSpotSizeY = null;
            SafeRemoveHotSpot(_hotSpotSizeZ); _hotSpotSizeZ = null;

            base.OnUnSelected();
        }
Example #6
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotSizeX);  _hotSpotSizeX = null;
            SafeRemoveHotSpot(_hotSpotSizeY);  _hotSpotSizeY = null;

            base.OnUnSelected();
        }
 public void RemoveHeightHotSpot()
 {
     if (_hotSpotHeight != null)
     {
         EditorManager.ActiveView.HotSpots.Remove(_hotSpotHeight);
         _hotSpotHeight.Remove();
         _hotSpotHeight = null;
     }
 }
Example #8
0
    /// <summary>
    /// Called when the shape is unselected
    /// </summary>
    public override void OnUnSelected()
    {
 #if (MESHGROUP_USE_LINKING)
        SafeRemoveHotSpot(_hotSpotSizeX); _hotSpotSizeX = null;
        SafeRemoveHotSpot(_hotSpotSizeY); _hotSpotSizeY = null;
        SafeRemoveHotSpot(_hotSpotSizeZ); _hotSpotSizeZ = null;
 #endif
        base.OnUnSelected();
    }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotConeAngleX);  _hotSpotConeAngleX = null;
            SafeRemoveHotSpot(_hotSpotConeAngleY);  _hotSpotConeAngleY = null;
            SafeRemoveHotSpot(_hotSpotNearClip); _hotSpotNearClip      = null;
            SafeRemoveHotSpot(_hotSpotFarClip); _hotSpotFarClip        = null;

            base.OnUnSelected();
        }
Example #10
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotVolume); _hotSpotVolume       = null;
            SafeRemoveHotSpot(_hotSpotFadeMin); _hotSpotFadeMin     = null;
            SafeRemoveHotSpot(_hotSpotFadeMax); _hotSpotFadeMax     = null;
            SafeRemoveHotSpot(_hotSpotPlaySound); _hotSpotPlaySound = null;
            SafeRemoveHotSpot(_hotSpotOuterCone); _hotSpotOuterCone = null;
            SafeRemoveHotSpot(_hotSpotInnerCone); _hotSpotInnerCone = null;

            base.OnUnSelected();
        }
Example #11
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotConeAngleX);  _hotSpotConeAngleX    = null;
            SafeRemoveHotSpot(_hotSpotConeAngleY);  _hotSpotConeAngleY    = null;
            SafeRemoveHotSpot(_hotSpotLength);      _hotSpotLength        = null;
            SafeRemoveHotSpot(_hotSpotFadeOutDist1); _hotSpotFadeOutDist1 = null;
            SafeRemoveHotSpot(_hotSpotFadeOutDist2); _hotSpotFadeOutDist2 = null;


            base.OnUnSelected();
        }
 public void CreateHeightHotSpot()
 {
     // Create hotspot for height (but only if we have any vertices and scaling allows changing the height)
     if (_hotSpotHeight == null && ChildCollection.Count > 0 && ScaleZ != 0)
     {
         _hotSpotHeight = new HotSpotDistance(this, @"textures\Hotspot_H.tga", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
         _hotSpotHeight.StartDistance  = this.Height;
         _hotSpotHeight.DisplayScaling = ScaleZ;
         _hotSpotHeight.Axis           = this.ZAxis;
         _hotSpotHeight.ToolTipText    = "Volume height";
         EditorManager.ActiveView.HotSpots.Add(_hotSpotHeight);
     }
 }
Example #13
0
        HotSpotDistance _hotSpotFadeOutDist2; // a hotspot for the cone fade-out-dist

        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            System.Diagnostics.Debug.Assert(_hotSpotConeAngleX == null);
            System.Diagnostics.Debug.Assert(_hotSpotConeAngleY == null);
            System.Diagnostics.Debug.Assert(_hotSpotLength == null);
            System.Diagnostics.Debug.Assert(_hotSpotFadeOutDist1 == null);
            System.Diagnostics.Debug.Assert(_hotSpotFadeOutDist2 == null);

            // create the hotspots:

            // hotspot for cone angle x
            _hotSpotConeAngleX             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotConeAngleX.Distance    = 50.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotConeAngleX.StartAngle  = this.ConeAngleX;
            _hotSpotConeAngleX.ToolTipText = "cone angle x";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleX);

            // hotspot for cone angle y
            _hotSpotConeAngleY                     = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotConeAngleY.Distance            = 50.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotConeAngleY.UseOwnerUpDirection = true;
            _hotSpotConeAngleY.StartAngle          = this.ConeAngleY;
            _hotSpotConeAngleY.ToolTipText         = "cone angle y";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleY);

            // hotspot for cone length
            _hotSpotLength = new HotSpotDistance(this, @"textures\Hotspot_L.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotLength.StartDistance  = this.Length;
            _hotSpotLength.DisplayScaling = UniformScaling;
            _hotSpotLength.Axis           = this.XAxis;
            _hotSpotLength.ToolTipText    = "length";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotLength);

            // hotspot for fade out distance
            _hotSpotFadeOutDist1 = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeOutDist1.StartDistance  = this.Length + this.FadeOutDistance;
            _hotSpotFadeOutDist1.Axis           = this.XAxis;
            _hotSpotFadeOutDist1.DisplayScaling = UniformScaling;
            _hotSpotFadeOutDist1.ToolTipText    = "fade out distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeOutDist1);

            // hotspot for fade out distance
            _hotSpotFadeOutDist2 = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeOutDist2.StartDistance  = this.Length - this.FadeOutDistance;
            _hotSpotFadeOutDist2.Axis           = this.XAxis;
            _hotSpotFadeOutDist2.DisplayScaling = UniformScaling;
            _hotSpotFadeOutDist2.ToolTipText    = "fade out distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeOutDist2);
        }
Example #14
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            System.Diagnostics.Debug.Assert(_hotSpotVolume == null);

            // hotspot for sound volume
            _hotSpotVolume = new HotSpotDistance(this, @"textures\Hotspot_V.tga", VisionColors.Cyan, HotSpotBase.PickType.Square, 10.0f);
            _hotSpotVolume.DisplayScaling = 100.0f;
            _hotSpotVolume.StartDistance  = Volume;
            _hotSpotVolume.Axis           = this.ZAxis;
            _hotSpotVolume.ToolTipText    = "Volume";
            _hotSpotVolume.SetRange(0.0f, 1.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotVolume);

            // hotspots for distance fading
            _hotSpotFadeMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeMin.StartDistance  = MinDistance;
            _hotSpotFadeMin.Axis           = this.XAxis;
            _hotSpotFadeMin.DisplayScaling = UniformScaling;
            _hotSpotFadeMin.ToolTipText    = "min distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMin);
            _hotSpotFadeMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeMax.StartDistance  = MaxDistance;
            _hotSpotFadeMax.Axis           = this.XAxis;
            _hotSpotFadeMax.DisplayScaling = UniformScaling;
            _hotSpotFadeMax.ToolTipText    = "max distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMax);

            // hotspots for cone angles
            _hotSpotOuterCone             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotOuterCone.Distance    = 120.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotOuterCone.StartAngle  = this.ConeOutside;
            _hotSpotOuterCone.ToolTipText = "Outer cone angle";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotOuterCone);
            _hotSpotInnerCone             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotInnerCone.Distance    = 100.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotInnerCone.StartAngle  = this.ConeInside;
            _hotSpotInnerCone.ToolTipText = "Inner cone angle";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotInnerCone);

            // hotspot for playing sound
            _hotSpotPlaySound             = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200, 200, 200, 255), VisionColors.White, 15.0f);
            _hotSpotPlaySound.ToolTipText = "Play sound";
            _hotSpotPlaySound.Set2DOffset(0.0f, 30.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotPlaySound);

            UpdateHotspotVisibility();
        }
Example #15
0
        void CreateAllHotspots()
        {
            if (_hotspotMinX != null) // hotspots are there already
            {
                return;
            }
            _hotspotMinX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
            _hotspotMinX.StartDistance = _fMinX;
            _hotspotMinX.Axis          = -Vector3F.XAxis;
            _hotspotMinX.ToolTipText   = "Selection Range";
            EditorManager.ActiveView.HotSpots.Add(_hotspotMinX);

            _hotspotMinY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
            _hotspotMinY.StartDistance = _fMinY;
            _hotspotMinY.Axis          = -Vector3F.YAxis;
            _hotspotMinY.ToolTipText   = "Selection Range";
            EditorManager.ActiveView.HotSpots.Add(_hotspotMinY);

            _hotspotMaxX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
            _hotspotMaxX.StartDistance = _fMaxX;
            _hotspotMaxX.Axis          = Vector3F.XAxis;
            _hotspotMaxX.ToolTipText   = "Selection Range";
            EditorManager.ActiveView.HotSpots.Add(_hotspotMaxX);

            _hotspotMaxY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
            _hotspotMaxY.StartDistance = _fMaxY;
            _hotspotMaxY.Axis          = Vector3F.YAxis;
            _hotspotMaxY.ToolTipText   = "Selection Range";
            EditorManager.ActiveView.HotSpots.Add(_hotspotMaxY);

            _hotspotMinX.DisplayScaling = ScaleX;
            _hotspotMaxX.DisplayScaling = ScaleX;
            _hotspotMinY.DisplayScaling = ScaleY;
            _hotspotMaxY.DisplayScaling = ScaleY;

            _hotspotCopy = new CopySelectionHotspot(this);
            _hotspotCopy.Set2DOffset(-16.0f, 20.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotspotCopy);

            _hotspotPaste = new PasteSelectionHotspot(this);
            _hotspotPaste.Set2DOffset(-16.0f, 56.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotspotPaste);

            _hotspotAdjustSize = new AdjustPasteSizeHotspot(this);
            _hotspotAdjustSize.Set2DOffset(20.0f, 56.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotspotAdjustSize);

            UpdateHotspotVisibility();
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            // hotspots for reverb distances
            _hotSpotReverbMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.White, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotReverbMin.StartDistance  = MinDistance;
            _hotSpotReverbMin.Axis           = this.XAxis;
            _hotSpotReverbMin.DisplayScaling = UniformScaling;
            _hotSpotReverbMin.ToolTipText    = "min distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotReverbMin);
            _hotSpotReverbMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.White, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotReverbMax.StartDistance  = MaxDistance;
            _hotSpotReverbMax.Axis           = this.XAxis;
            _hotSpotReverbMax.DisplayScaling = UniformScaling;
            _hotSpotReverbMax.ToolTipText    = "max distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotReverbMax);
        }
        HotSpotDistance _hotSpotFarClip;     // a hotspot for the cone fade-out-dist

        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            System.Diagnostics.Debug.Assert(_hotSpotConeAngleX == null);
            System.Diagnostics.Debug.Assert(_hotSpotConeAngleY == null);
            System.Diagnostics.Debug.Assert(_hotSpotNearClip == null);
            System.Diagnostics.Debug.Assert(_hotSpotFarClip == null);

            // create the hotspots:

            // hotspot for cone angle x
            _hotSpotConeAngleX             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotConeAngleX.Distance    = 50.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotConeAngleX.StartAngle  = this.CameraAngleX;
            _hotSpotConeAngleX.ToolTipText = "FOV x";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleX);

            // hotspot for cone angle y
            _hotSpotConeAngleY                     = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotConeAngleY.Distance            = 50.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotConeAngleY.UseOwnerUpDirection = true;
            _hotSpotConeAngleY.StartAngle          = this.CameraAngleY;
            _hotSpotConeAngleY.ToolTipText         = "FOV y";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleY);

            // hotspot for fade out distance
            _hotSpotNearClip = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotNearClip.StartDistance = this.NearClipDistance;
            _hotSpotNearClip.Axis          = this.XAxis;
            _hotSpotNearClip.ToolTipText   = "Near clip distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotNearClip);

            // hotspot for fade out distance
            _hotSpotFarClip = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFarClip.StartDistance = this.FarClipDistance;
            _hotSpotFarClip.Axis          = this.XAxis;
            _hotSpotFarClip.ToolTipText   = "Far clip distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFarClip);
        }
Example #18
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);
        }
Example #19
0
        public void RemoveHotSpots()
        {
            if (_hotSpotX != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotX);
                _hotSpotX.Remove();
                _hotSpotX = null;
            }

            if (_hotSpotY != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotY);
                _hotSpotY.Remove();
                _hotSpotY = null;
            }

            if (_hotSpotXY != null)
            {
                EditorManager.ActiveView.HotSpots.Remove(_hotSpotXY);
                _hotSpotXY.Remove();
                _hotSpotXY = null;
            }
        }
Example #20
0
        HotSpotDistance _hotSpotSizeZ;    // a hotspot for the BoxSize Z
  #endif

        /// <summary>
        /// Called when the shape is selected
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();
     #if (MESHGROUP_USE_LINKING)
            System.Diagnostics.Debug.Assert(_hotSpotSizeX == null);
            System.Diagnostics.Debug.Assert(_hotSpotSizeY == null);
            System.Diagnostics.Debug.Assert(_hotSpotSizeZ == null);

            // create the hotspots:

            // hotspot for size X
            _hotSpotSizeX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeX.StartDistance  = this.BoxSizeX;
            _hotSpotSizeX.DisplayScaling = 0.5f;
            _hotSpotSizeX.Axis           = Vector3F.XAxis;
            _hotSpotSizeX.ToolTipText    = "size x direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeX);

            // hotspot for size Y
            _hotSpotSizeY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeY.StartDistance  = this.BoxSizeY;
            _hotSpotSizeY.DisplayScaling = 0.5f;
            _hotSpotSizeY.Axis           = Vector3F.YAxis;
            _hotSpotSizeY.ToolTipText    = "size y direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeY);

            // hotspot for size Z
            _hotSpotSizeZ = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotSizeZ.StartDistance  = this.BoxSizeZ;
            _hotSpotSizeZ.DisplayScaling = 0.5f;
            _hotSpotSizeZ.Axis           = Vector3F.ZAxis;
            _hotSpotSizeZ.ToolTipText    = "size z direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeZ);
    #endif

            // add more hotspots here...
        }
        public void CreateHotSpots()
        {
            if (_hotSpotX == null)
              {
            _hotSpotX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
            _hotSpotX.StartDistance = this.Size.X;
            _hotSpotX.DisplayScaling = 0.5f;
            _hotSpotX.Axis = this.XAxis;
            _hotSpotX.ToolTipText = "size in x direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotX);
              }

              if (_hotSpotY == null)
              {
            _hotSpotY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
            _hotSpotY.StartDistance = this.Size.Y;
            _hotSpotY.DisplayScaling = 0.5f;
            _hotSpotY.Axis = this.YAxis;
            _hotSpotY.ToolTipText = "size in y direction";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotY);
              }

              if (_hotSpotXY == null)
              {
            _hotSpotXY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
            _hotSpotXY.StartDistance = this.Size.GetLength();
            _hotSpotXY.DisplayScaling = 0.5f;
            Vector3F axis = (this.YAxis * Size.Y + this.XAxis * Size.X);
            axis.Normalize();
            _hotSpotXY.Axis = axis;
            _hotSpotXY.ToolTipText = "size";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotXY);
              }
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotConeAngleX);  _hotSpotConeAngleX = null;
              SafeRemoveHotSpot(_hotSpotConeAngleY);  _hotSpotConeAngleY = null;
              SafeRemoveHotSpot(_hotSpotNearClip); _hotSpotNearClip = null;
              SafeRemoveHotSpot(_hotSpotFarClip); _hotSpotFarClip = null;

              base.OnUnSelected ();
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              System.Diagnostics.Debug.Assert(_hotSpotConeAngleX==null);
              System.Diagnostics.Debug.Assert(_hotSpotConeAngleY==null);
              System.Diagnostics.Debug.Assert(_hotSpotNearClip==null);
              System.Diagnostics.Debug.Assert(_hotSpotFarClip==null);

              // create the hotspots:

              // hotspot for cone angle x
              _hotSpotConeAngleX = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotConeAngleX.Distance = 50.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotConeAngleX.StartAngle = this.CameraAngleX;
              _hotSpotConeAngleX.ToolTipText = "FOV x";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleX);

              // hotspot for cone angle y
              _hotSpotConeAngleY = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotConeAngleY.Distance = 50.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotConeAngleY.UseOwnerUpDirection = true;
              _hotSpotConeAngleY.StartAngle = this.CameraAngleY;
              _hotSpotConeAngleY.ToolTipText = "FOV y";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleY);

              // hotspot for fade out distance
              _hotSpotNearClip = new HotSpotDistance(this,@"textures\Hotspot_D.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotNearClip.StartDistance = this.NearClipDistance;
              _hotSpotNearClip.Axis = this.XAxis;
              _hotSpotNearClip.ToolTipText = "Near clip distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotNearClip);

              // hotspot for fade out distance
              _hotSpotFarClip = new HotSpotDistance(this,@"textures\Hotspot_D.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotFarClip.StartDistance = this.FarClipDistance;
              _hotSpotFarClip.Axis = this.XAxis;
              _hotSpotFarClip.ToolTipText = "Far clip distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFarClip);
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotReverbMin); _hotSpotReverbMin = null;
              SafeRemoveHotSpot(_hotSpotReverbMax); _hotSpotReverbMax = null;

              base.OnUnSelected();
        }
        /// <summary>
        /// Called when the shape is unselected
        /// </summary>
        public override void OnUnSelected()
        {
            SafeRemoveHotSpot(_hotSpotSizeX);_hotSpotSizeX=null;
              SafeRemoveHotSpot(_hotSpotSizeY);_hotSpotSizeY=null;
              SafeRemoveHotSpot(_hotSpotSizeZ);_hotSpotSizeZ=null;

              base.OnUnSelected ();
        }
Example #26
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotSizeX);  _hotSpotSizeX = null;
              SafeRemoveHotSpot(_hotSpotSizeY);  _hotSpotSizeY = null;

              base.OnUnSelected ();
        }
Example #27
0
        /// <summary>
        /// Called when the shape is selected
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();
              System.Diagnostics.Debug.Assert(_hotSpotFanAngle==null);
              System.Diagnostics.Debug.Assert(_hotSpotFanIntensity==null);
              System.Diagnostics.Debug.Assert(_hotSpotRadius==null);
              System.Diagnostics.Debug.Assert(_hotSpotLength==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeX==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeY==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeZ==null);

              // create the hotspots:

              // hotspot for fan cone angle
              _hotSpotFanAngle = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotFanAngle.Distance = 50.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotFanAngle.StartAngle = this.ConeAngle;
              _hotSpotFanAngle.ToolTipText = "cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFanAngle);

              // hotspot for fan intensity
              _hotSpotFanIntensity = new HotSpotDistance(this,@"textures\Hotspot_I.tga",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotFanIntensity.StartDistance = this.Intensity;
              _hotSpotFanIntensity.Axis = this.XAxis;
              _hotSpotFanIntensity.DisplayScaling = EditorManager.Settings.GlobalUnitScaling * UniformScaling;
              _hotSpotFanIntensity.ToolTipText = "intensity";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFanIntensity);

              // hotspot for radius
              _hotSpotRadius = new HotSpotDistance(this,@"textures\Hotspot_R.tga",VisionColors.Green,HotSpotBase.PickType.Square,4.0f);
              _hotSpotRadius.StartDistance = this.Radius;
              _hotSpotRadius.Axis = this.ZAxis;
              _hotSpotRadius.DisplayScaling = UniformScaling;
              _hotSpotRadius.ToolTipText = "radius";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotRadius);

              // hotspot for length
              _hotSpotLength = new HotSpotDistance(this,@"textures\Hotspot_L.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotLength.StartDistance = this.Length;
              _hotSpotLength.Axis = this.XAxis;
              _hotSpotLength.DisplayScaling = UniformScaling;
              _hotSpotLength.ToolTipText = "length";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotLength);

              float fBoxScaleXY = ConstraintType == EngineInstanceConstraint.ConstraintType_e.Plane ? 1.0f : 0.5f;
              // hotspot for size X
              _hotSpotSizeX = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeX.StartDistance = this.BoxSizeX;
              _hotSpotSizeX.DisplayScaling = fBoxScaleXY * ScaleX;
              _hotSpotSizeX.Axis = this.XAxis;
              _hotSpotSizeX.ToolTipText = "size x direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeX);

              // hotspot for size Y
              _hotSpotSizeY = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeY.StartDistance = this.BoxSizeY;
              _hotSpotSizeY.DisplayScaling = fBoxScaleXY * ScaleY;
              _hotSpotSizeY.Axis = this.YAxis;
              _hotSpotSizeY.ToolTipText = "size y direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeY);

              // hotspot for size Z
              _hotSpotSizeZ = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeZ.StartDistance = this.BoxSizeZ;
              _hotSpotSizeZ.DisplayScaling = 0.5f * ScaleZ;
              _hotSpotSizeZ.Axis = this.ZAxis;
              _hotSpotSizeZ.ToolTipText = "size z direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeZ);

              // add more hotspots here...
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              System.Diagnostics.Debug.Assert(_hotSpotConeAngleX==null);
              System.Diagnostics.Debug.Assert(_hotSpotConeAngleY==null);
              System.Diagnostics.Debug.Assert(_hotSpotLength==null);
              System.Diagnostics.Debug.Assert(_hotSpotFadeOutDist1==null);
              System.Diagnostics.Debug.Assert(_hotSpotFadeOutDist2==null);

              // create the hotspots:

              // hotspot for cone angle x
              _hotSpotConeAngleX = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotConeAngleX.Distance = 50.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotConeAngleX.StartAngle = this.ConeAngleX;
              _hotSpotConeAngleX.ToolTipText = "cone angle x";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleX);

              // hotspot for cone angle y
              _hotSpotConeAngleY = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotConeAngleY.Distance = 50.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotConeAngleY.UseOwnerUpDirection = true;
              _hotSpotConeAngleY.StartAngle = this.ConeAngleY;
              _hotSpotConeAngleY.ToolTipText = "cone angle y";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotConeAngleY);

              // hotspot for cone length
              _hotSpotLength = new HotSpotDistance(this,@"textures\Hotspot_L.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotLength.StartDistance = this.Length;
              _hotSpotLength.DisplayScaling = UniformScaling;
              _hotSpotLength.Axis = this.XAxis;
              _hotSpotLength.ToolTipText = "length";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotLength);

              // hotspot for fade out distance
              _hotSpotFadeOutDist1 = new HotSpotDistance(this,@"textures\Hotspot_D.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotFadeOutDist1.StartDistance = this.Length + this.FadeOutDistance;
              _hotSpotFadeOutDist1.Axis = this.XAxis;
              _hotSpotFadeOutDist1.DisplayScaling = UniformScaling;
              _hotSpotFadeOutDist1.ToolTipText = "fade out distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeOutDist1);

              // hotspot for fade out distance
              _hotSpotFadeOutDist2 = new HotSpotDistance(this,@"textures\Hotspot_D.tga",VisionColors.Blue,HotSpotBase.PickType.Square,4.0f);
              _hotSpotFadeOutDist2.StartDistance = this.Length - this.FadeOutDistance;
              _hotSpotFadeOutDist2.Axis = this.XAxis;
              _hotSpotFadeOutDist2.DisplayScaling = UniformScaling;
              _hotSpotFadeOutDist2.ToolTipText = "fade out distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeOutDist2);
        }
 public void CreateHeightHotSpot()
 {
     // Create hotspot for height (but only if we have any vertices and scaling allows changing the height)
       if (_hotSpotHeight == null && ChildCollection.Count > 0 && ScaleZ != 0)
       {
     _hotSpotHeight = new HotSpotDistance(this, @"textures\Hotspot_H.tga", VisionColors.Yellow, HotSpotBase.PickType.Square, 10.0f);
     _hotSpotHeight.StartDistance = this.Height;
     _hotSpotHeight.DisplayScaling = ScaleZ;
     _hotSpotHeight.Axis = this.ZAxis;
     _hotSpotHeight.ToolTipText = "Volume height";
     EditorManager.ActiveView.HotSpots.Add(_hotSpotHeight);
       }
 }
 public void RemoveHeightHotSpot()
 {
     if (_hotSpotHeight != null)
       {
     EditorManager.ActiveView.HotSpots.Remove(_hotSpotHeight);
     _hotSpotHeight.Remove();
     _hotSpotHeight = null;
       }
 }
        /// <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 CreateAllHotspots()
        {
            if (_hotspotMinX != null) // hotspots are there already
            return;
              _hotspotMinX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
              _hotspotMinX.StartDistance = _fMinX;
              _hotspotMinX.Axis = -Vector3F.XAxis;
              _hotspotMinX.ToolTipText = "Selection Range";
              EditorManager.ActiveView.HotSpots.Add(_hotspotMinX);

              _hotspotMinY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
              _hotspotMinY.StartDistance = _fMinY;
              _hotspotMinY.Axis = -Vector3F.YAxis;
              _hotspotMinY.ToolTipText = "Selection Range";
              EditorManager.ActiveView.HotSpots.Add(_hotspotMinY);

              _hotspotMaxX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
              _hotspotMaxX.StartDistance = _fMaxX;
              _hotspotMaxX.Axis = Vector3F.XAxis;
              _hotspotMaxX.ToolTipText = "Selection Range";
              EditorManager.ActiveView.HotSpots.Add(_hotspotMaxX);

              _hotspotMaxY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f);
              _hotspotMaxY.StartDistance = _fMaxY;
              _hotspotMaxY.Axis = Vector3F.YAxis;
              _hotspotMaxY.ToolTipText = "Selection Range";
              EditorManager.ActiveView.HotSpots.Add(_hotspotMaxY);

              _hotspotMinX.DisplayScaling = ScaleX;
              _hotspotMaxX.DisplayScaling = ScaleX;
              _hotspotMinY.DisplayScaling = ScaleY;
              _hotspotMaxY.DisplayScaling = ScaleY;

              _hotspotCopy = new CopySelectionHotspot(this);
              _hotspotCopy.Set2DOffset(-16.0f, 20.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotspotCopy);

              _hotspotPaste = new PasteSelectionHotspot(this);
              _hotspotPaste.Set2DOffset(-16.0f, 56.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotspotPaste);

              _hotspotAdjustSize = new AdjustPasteSizeHotspot(this);
              _hotspotAdjustSize.Set2DOffset(20.0f, 56.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotspotAdjustSize);

              UpdateHotspotVisibility();
        }
        void RemoveAllHotspots()
        {
            SafeRemoveHotSpot(_hotspotMinX); _hotspotMinX = null;
              SafeRemoveHotSpot(_hotspotMinY); _hotspotMinY = null;
              SafeRemoveHotSpot(_hotspotMaxX); _hotspotMaxX = null;
              SafeRemoveHotSpot(_hotspotMaxY); _hotspotMaxY = null;

              SafeRemoveHotSpot(_hotspotCopy); _hotspotCopy = null;
              SafeRemoveHotSpot(_hotspotPaste); _hotspotPaste = null;
              SafeRemoveHotSpot(_hotspotAdjustSize); _hotspotAdjustSize = null;
        }
Example #34
0
        /// <summary>
        /// Called when the shape is unselected
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotFanAngle);_hotSpotFanAngle=null;
              SafeRemoveHotSpot(_hotSpotFanIntensity);_hotSpotFanIntensity=null;
              SafeRemoveHotSpot(_hotSpotRadius);_hotSpotRadius=null;
              SafeRemoveHotSpot(_hotSpotLength);_hotSpotLength=null;
              SafeRemoveHotSpot(_hotSpotSizeX);_hotSpotSizeX=null;
              SafeRemoveHotSpot(_hotSpotSizeY);_hotSpotSizeY=null;
              SafeRemoveHotSpot(_hotSpotSizeZ);_hotSpotSizeZ=null;

              base.OnUnSelected ();
        }
        public void RemoveHotSpots()
        {
            if (_hotSpotX != null)
              {
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotX);
            _hotSpotX.Remove();
            _hotSpotX = null;
              }

              if (_hotSpotY != null)
              {
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotY);
            _hotSpotY.Remove();
            _hotSpotY = null;
              }

              if (_hotSpotXY != null)
              {
            EditorManager.ActiveView.HotSpots.Remove(_hotSpotXY);
            _hotSpotXY.Remove();
            _hotSpotXY = null;
              }
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotConeAngleX);  _hotSpotConeAngleX = null;
              SafeRemoveHotSpot(_hotSpotConeAngleY);  _hotSpotConeAngleY = null;
              SafeRemoveHotSpot(_hotSpotLength);      _hotSpotLength = null;
              SafeRemoveHotSpot(_hotSpotFadeOutDist1); _hotSpotFadeOutDist1 = null;
              SafeRemoveHotSpot(_hotSpotFadeOutDist2); _hotSpotFadeOutDist2 = null;

              base.OnUnSelected ();
        }
 /// <summary>
 /// Called when the shape is unselected
 /// </summary>
 public override void OnUnSelected()
 {
  #if (MESHGROUP_USE_LINKING)
   SafeRemoveHotSpot(_hotSpotSizeX);_hotSpotSizeX=null;
   SafeRemoveHotSpot(_hotSpotSizeY);_hotSpotSizeY=null;
   SafeRemoveHotSpot(_hotSpotSizeZ);_hotSpotSizeZ=null;
  #endif
   base.OnUnSelected ();
 }
Example #38
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();
              System.Diagnostics.Debug.Assert(_hotSpotSizeX==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeY==null);

              // hotspot for x-size
              _hotSpotSizeX = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeX.StartDistance = this.SizeX;
              _hotSpotSizeX.Axis = this.XAxis;
              _hotSpotSizeX.ToolTipText = "Size X";
              _hotSpotSizeX.DisplayScaling = 0.5f * ScaleX;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeX);
              // hotspot for y-size
              _hotSpotSizeY = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeY.StartDistance = this.SizeY;
              _hotSpotSizeY.Axis = this.YAxis;
              _hotSpotSizeY.ToolTipText = "Size Y";
              _hotSpotSizeY.DisplayScaling = 0.5f * ScaleY;
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeY);
        }
Example #39
0
 /// <summary>
 /// Called when the shape is unselected
 /// </summary>
 public override void OnUnSelected()
 {
     // release the hotspots again:
     EditorManager.ActiveView.HotSpots.Remove(_hotSpotAngle);
       EditorManager.ActiveView.HotSpots.Remove(_hotSpotIntensity);
       EditorManager.ActiveView.HotSpots.Remove(_hotSpotColor);
       _hotSpotAngle.Remove();
       _hotSpotIntensity.Remove();
       _hotSpotColor.Remove();
     _hotSpotAngle = null;
     _hotSpotIntensity = null;
       _hotSpotColor = null;
     base.OnUnSelected ();
 }
        /// <summary>
        /// Called when the shape is selected
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();
              System.Diagnostics.Debug.Assert(_hotSpotSizeX==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeY==null);
              System.Diagnostics.Debug.Assert(_hotSpotSizeZ==null);

              // create the hotspots:

              // hotspot for size X
              _hotSpotSizeX = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeX.StartDistance = this.BoxSizeX;
              _hotSpotSizeX.DisplayScaling = 0.5f * ScaleX;
              _hotSpotSizeX.Axis = XAxis;
              _hotSpotSizeX.ToolTipText = "size x direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeX);

              // hotspot for size Y
              _hotSpotSizeY = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeY.StartDistance = this.BoxSizeY;
              _hotSpotSizeY.DisplayScaling = 0.5f * ScaleY;
              _hotSpotSizeY.Axis = YAxis;
              _hotSpotSizeY.ToolTipText = "size y direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeY);

              // hotspot for size Z
              _hotSpotSizeZ = new HotSpotDistance(this,@"textures\Hotspot_Rect.dds",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
              _hotSpotSizeZ.StartDistance = this.BoxSizeZ;
              _hotSpotSizeZ.DisplayScaling = 0.5f * ScaleZ;
              _hotSpotSizeZ.Axis = ZAxis;
              _hotSpotSizeZ.ToolTipText = "size z direction";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotSizeZ);

              UpdateHotspotVisibility();

              // add more hotspots here...
        }
Example #41
0
        /// <summary>
        /// Called when the shape is selected
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

            // create the hotspots:

            // hotspot for spotangle
            _hotSpotAngle = new HotSpotConeAngle(this,@"textures\Hotspot_A.tga",VisionColors.Red,HotSpotBase.PickType.Square,4.0f);
              _hotSpotAngle.Distance = 200.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotAngle.StartAngle = SpotAngle;
              _hotSpotAngle.ToolTipText = "cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotAngle);

            // hotspot for intensity
            _hotSpotIntensity = new HotSpotDistance(this,@"textures\Hotspot_R.tga",VisionColors.Yellow,HotSpotBase.PickType.Square,4.0f);
            _hotSpotIntensity.StartDistance = this.Intensity;
              _hotSpotIntensity.DisplayScaling = UniformScaling;
            _hotSpotIntensity.Axis = this.XAxis;
              _hotSpotIntensity.ToolTipText = "light influence radius";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotIntensity);

              //color
              _hotSpotColor = new HotSpotColorButton(this,"LightColor");
              _hotSpotColor.ToolTipText = "Change the light's color";
              _hotSpotColor.Set2DOffset(10.0f,10.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotColor);

            // add more hotspots here...
        }
Example #42
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              System.Diagnostics.Debug.Assert(_hotSpotVolume==null);

              // hotspot for sound volume
              _hotSpotVolume = new HotSpotDistance(this, @"textures\Hotspot_V.tga", VisionColors.Cyan, HotSpotBase.PickType.Square, 10.0f);
              _hotSpotVolume.DisplayScaling = 100.0f;
              _hotSpotVolume.StartDistance = Volume;
              _hotSpotVolume.Axis = this.ZAxis;
              _hotSpotVolume.ToolTipText = "Volume";
              _hotSpotVolume.SetRange(0.0f, 1.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotVolume);

              // hotspots for distance fading
              _hotSpotFadeMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotFadeMin.StartDistance = MinDistance;
              _hotSpotFadeMin.Axis = this.XAxis;
              _hotSpotFadeMin.DisplayScaling = UniformScaling;
              _hotSpotFadeMin.ToolTipText = "min distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMin);
              _hotSpotFadeMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotFadeMax.StartDistance = MaxDistance;
              _hotSpotFadeMax.Axis = this.XAxis;
              _hotSpotFadeMax.DisplayScaling = UniformScaling;
              _hotSpotFadeMax.ToolTipText = "max distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMax);

              // hotspots for cone angles
              _hotSpotOuterCone = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotOuterCone.Distance = 120.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotOuterCone.StartAngle = this.ConeOutside;
              _hotSpotOuterCone.ToolTipText = "Outer cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotOuterCone);
              _hotSpotInnerCone = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotInnerCone.Distance = 100.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotInnerCone.StartAngle = this.ConeInside;
              _hotSpotInnerCone.ToolTipText = "Inner cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotInnerCone);

              // hotspot for playing sound
              _hotSpotPlaySound = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200,200,200,255), VisionColors.White, 15.0f);
              _hotSpotPlaySound.ToolTipText = "Play sound";
              _hotSpotPlaySound.Set2DOffset(0.0f, 30.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotPlaySound);

              UpdateHotspotVisibility();
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              // hotspots for reverb distances
              _hotSpotReverbMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.White, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotReverbMin.StartDistance = MinDistance;
              _hotSpotReverbMin.Axis = this.XAxis;
              _hotSpotReverbMin.DisplayScaling = UniformScaling;
              _hotSpotReverbMin.ToolTipText = "min distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotReverbMin);
              _hotSpotReverbMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.White, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotReverbMax.StartDistance = MaxDistance;
              _hotSpotReverbMax.Axis = this.XAxis;
              _hotSpotReverbMax.DisplayScaling = UniformScaling;
              _hotSpotReverbMax.ToolTipText = "max distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotReverbMax);
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotGravity);  _hotSpotGravity = null;
              SafeRemoveHotSpot(_hotSpotLightGridOfs);  _hotSpotLightGridOfs = null;

              base.OnUnSelected ();
        }
Example #45
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotVolume); _hotSpotVolume = null;
              SafeRemoveHotSpot(_hotSpotFadeMin); _hotSpotFadeMin = null;
              SafeRemoveHotSpot(_hotSpotFadeMax); _hotSpotFadeMax = null;
              SafeRemoveHotSpot(_hotSpotPlaySound); _hotSpotPlaySound = null;
              SafeRemoveHotSpot(_hotSpotOuterCone); _hotSpotOuterCone = null;
              SafeRemoveHotSpot(_hotSpotInnerCone); _hotSpotInnerCone = null;

              base.OnUnSelected();
        }