/// <summary> /// Clone this instance and return clone /// </summary> /// <returns>clone</returns> public ILClippingData Clone() { ILClippingData ret = new ILClippingData(); ret.Update(this); return(ret); }
public ILDXAxis (AxisNames name, ILClippingData clippingView, ILLayoutData layoutData,ILDXPanel panel) : base (name,clippingView, layoutData) { m_dxPanel = panel; m_dxPanel.GraphicsDeviceReset += new ILGraphicsDeviceResetEvent(recreateVertexBuffer); m_dxPanel.GraphicsDeviceCreated += new ILGraphicsDeviceCreatedEvent(initialize); }
/// <summary> /// construct ILAxis object. This contructor is not to be called directly. /// </summary> /// <param name="name">type of the axis: XAxis,YAxis,ZAxis</param> /// <param name="clippingView">Clipping data to be registered into the axis.</param> /// <param name="layoutData">additional layout data, does currently only contain the camera [depricated]</param> /// <param name="panel">panel hosting the scene</param> /// <remarks>ILAxis objects are created GL-device dependend by use of a device dependend ILPanel instance's /// member ILPanel.CreateAxis(). This acts like a factory pattern. The specific axis derivate will be /// created by the derived ILPanel object (ILDXPanel or ILOGLPanel).</remarks> public ILAxis(AxisNames name, ILClippingData clippingView, ILLayoutData layoutData, ILPanel panel) { m_panel = panel; m_axisName = name; m_labeledTicks = new ILTickCollection(panel, m_axisName); m_layoutData = layoutData; m_labelProvider = null; m_labeledTicks.Changed += new AxisChangedEventHandler(m_labeledTicks_Changed); m_unLabeledTicks = new List <UnlabeledTick>(10); m_grid = new ILLineProperties(); m_grid.Style = LineStyle.Dashed; m_grid.Changed += new EventHandler(m_grid_Changed); m_clipping = clippingView; m_axisType = AxisType.Linear; m_nearLines = new ILLineProperties(); m_nearLines.Color = Color.DarkBlue; m_nearLines.Width = 1; m_nearLines.Antialiasing = true; m_nearLines.Changed += new EventHandler(m_grid_Changed); m_farLines = new ILLineProperties(); m_farLines.Color = Color.DarkBlue; m_farLines.Width = 1; m_farLines.Antialiasing = true; m_farLines.Changed += new EventHandler(m_grid_Changed); m_label = new ILLabel(panel); m_label.Changed += new EventHandler(m_label_Changed); m_clipping.Changed += new ILClippingDataChangedEvent(m_clipping_Changed); m_invalidated = true; }
/// <summary> /// copy this from other clipping data /// </summary> /// <param name="m_clippingData"></param> internal void CopyFrom(ILClippingData m_clippingData) { m_xMin = m_clippingData.XMin; m_yMin = m_clippingData.YMin; m_zMin = m_clippingData.ZMin; m_xMax = m_clippingData.XMax; m_yMax = m_clippingData.YMax; m_zMax = m_clippingData.ZMax; if (!m_allowZeroVolume) { ensureVolumeNotZero(); } m_sphereRadius = getSphereRadius(); m_isDirty = true; if (m_eventingActive && Changed != null) { OnChange(); } }
/// <summary> /// update ranges for this object with union of both ranges. /// </summary> /// <param name="clipData">clipping ranges to create union with</param> public void Update(ILClippingData clipData) { if (clipData.XMin < XMin) { m_isDirty = true; m_xMin = clipData.XMin; } if (clipData.YMin < YMin) { m_isDirty = true; m_yMin = clipData.YMin; } if (clipData.ZMin < ZMin) { m_isDirty = true; m_zMin = clipData.ZMin; } if (clipData.XMax > XMax) { m_isDirty = true; m_xMax = clipData.XMax; } if (clipData.YMax > YMax) { m_isDirty = true; m_yMax = clipData.YMax; } if (clipData.ZMax > ZMax) { m_isDirty = true; m_zMax = clipData.ZMax; } if (!m_allowZeroVolume) { ensureVolumeNotZero(); } m_sphereRadius = getSphereRadius(); if (m_isDirty && m_eventingActive && Changed != null) { OnChange(); } }
/// <summary> /// creates a new ClippingChangedEventArgs object /// </summary> /// <param name="clippingData"></param> public ClippingChangedEventArgs(ILClippingData clippingData) { ClippingData = clippingData; }
/// <summary> /// Clone this instance and return clone /// </summary> /// <returns>clone</returns> public ILClippingData Clone() { ILClippingData ret = new ILClippingData(); ret.Update(this); return ret; }
/// <summary> /// copy this from other clipping data /// </summary> /// <param name="m_clippingData"></param> internal void CopyFrom(ILClippingData m_clippingData) { m_xMin = m_clippingData.XMin; m_yMin = m_clippingData.YMin; m_zMin = m_clippingData.ZMin; m_xMax = m_clippingData.XMax; m_yMax = m_clippingData.YMax; m_zMax = m_clippingData.ZMax; if (!m_allowZeroVolume) ensureVolumeNotZero(); m_sphereRadius = getSphereRadius(); m_isDirty = true; if (m_eventingActive && Changed != null) OnChange(); }
/// <summary> /// update ranges for this object with union of both ranges. /// </summary> /// <param name="clipData">clipping ranges to create union with</param> public void Update (ILClippingData clipData) { if (clipData.XMin < XMin) { m_isDirty = true; m_xMin = clipData.XMin; } if (clipData.YMin < YMin) { m_isDirty = true; m_yMin = clipData.YMin; } if (clipData.ZMin < ZMin) { m_isDirty = true; m_zMin = clipData.ZMin; } if (clipData.XMax > XMax) { m_isDirty = true; m_xMax = clipData.XMax; } if (clipData.YMax > YMax) { m_isDirty = true; m_yMax = clipData.YMax; } if (clipData.ZMax > ZMax) { m_isDirty = true; m_zMax = clipData.ZMax; } if (!m_allowZeroVolume) ensureVolumeNotZero(); m_sphereRadius = getSphereRadius(); if (m_isDirty && m_eventingActive && Changed != null) OnChange(); }