Exemple #1
0
    void LoadGlobalUniforms(OpenGL gl, uint shaderProgram)
    {
        int KaUniformLocation = gl.GetUniformLocation(shaderProgram, "Ka");
        int KdUniformLocation = gl.GetUniformLocation(shaderProgram, "Kd");
        int KsUniformLocation = gl.GetUniformLocation(shaderProgram, "Ks");
        int IaUniformLocation = gl.GetUniformLocation(shaderProgram, "Ia");
        int IlUniformLocation = gl.GetUniformLocation(shaderProgram, "Il");
        int IpUniformLocation = gl.GetUniformLocation(shaderProgram, "Ip");
        int KUniformLocation  = gl.GetUniformLocation(shaderProgram, "K");

        gl.Uniform3(KaUniformLocation, 1, Ka.ToFloatArray());
        gl.Uniform3(KdUniformLocation, 1, Kd.ToFloatArray());
        gl.Uniform3(KsUniformLocation, 1, Ks.ToFloatArray());
        gl.Uniform3(IaUniformLocation, 1, Ia.ToFloatArray());
        gl.Uniform3(IlUniformLocation, 1, Il.ToFloatArray());
        gl.Uniform1(IpUniformLocation, (float)Ip);
        gl.Uniform1(KUniformLocation, (float)K);

        int CameraPositionUniformLocation = gl.GetUniformLocation(shaderProgram, "CameraPosition");
        int LightPositionUniformLocation  = gl.GetUniformLocation(shaderProgram, "LightPosition");

        gl.Uniform1(CameraPositionUniformLocation, (float)CameraPosition);
        gl.Uniform3(LightPositionUniformLocation, 1, LightPosition.ToFloatArray());

        int objectColorUniformLocation = gl.GetUniformLocation(shaderProgram, "objectColor");

        gl.Uniform3(objectColorUniformLocation, 1, ObjectColor.ToFloatArray());
    }
Exemple #2
0
    void LoadGlobalUniforms(OpenGL gl, uint shaderProgram)
    {
        int KaUniformLocation = gl.GetUniformLocation(shaderProgram, "Ka");
        int KdUniformLocation = gl.GetUniformLocation(shaderProgram, "Kd");
        int KsUniformLocation = gl.GetUniformLocation(shaderProgram, "Ks");
        int IaUniformLocation = gl.GetUniformLocation(shaderProgram, "Ia");
        int IlUniformLocation = gl.GetUniformLocation(shaderProgram, "Il");
        int IpUniformLocation = gl.GetUniformLocation(shaderProgram, "Ip");
        int KUniformLocation  = gl.GetUniformLocation(shaderProgram, "K");

        gl.Uniform3(KaUniformLocation, 1, Ka.ToFloatArray());
        gl.Uniform3(KdUniformLocation, 1, Kd.ToFloatArray());
        gl.Uniform3(KsUniformLocation, 1, Ks.ToFloatArray());
        gl.Uniform3(IaUniformLocation, 1, Ia.ToFloatArray());
        gl.Uniform3(IlUniformLocation, 1, Il.ToFloatArray());
        gl.Uniform1(IpUniformLocation, (float)Ip);
        gl.Uniform1(KUniformLocation, (float)K);


        int MagicCoefUniformLocation  = gl.GetUniformLocation(shaderProgram, "magicCoef");
        int DistToFragUniformLocation = gl.GetUniformLocation(shaderProgram, "distToFrag");

        gl.Uniform1(MagicCoefUniformLocation, MagicCoef);

        if (EffectMode == Mode.FRAG)
        {
            gl.Uniform1(DistToFragUniformLocation, 1);
        }
        else
        {
            gl.Uniform1(DistToFragUniformLocation, 0);
        }

        int CameraPositionUniformLocation     = gl.GetUniformLocation(shaderProgram, "CameraPosition");
        int LightPositionUniformLocation      = gl.GetUniformLocation(shaderProgram, "LightPosition");
        int magicPointPositionUniformLocation = gl.GetUniformLocation(shaderProgram, "magicPointPosition");

        gl.Uniform1(CameraPositionUniformLocation, (float)CameraPosition);
        gl.Uniform3(LightPositionUniformLocation, 1, LightPosition.ToFloatArray());
        gl.Uniform3(magicPointPositionUniformLocation, 1, magicPointPosition.ToFloatArray());


        int objectColorUniformLocation = gl.GetUniformLocation(shaderProgram, "objectColor");

        gl.Uniform3(objectColorUniformLocation, 1, ObjectColor.ToFloatArray());
    }
Exemple #3
0
        private Matrix SetModelVisualizationProjection(int leg)
        {
            Vector3 cameraPosition = Distance * new Vector3(
                (float)(Math.Cos(HorizantalAngle) * Math.Cos(VerticalAngle)),
                (float)(Math.Sin(HorizantalAngle) * Math.Cos(VerticalAngle)),
                (float)(Math.Sin(VerticalAngle)));
            Matrix Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(20f), XDevice.DisplayMode.AspectRatio, 0.001f, 5);
            Matrix View       = Matrix.CreateLookAt(
                cameraPosition,
                Vector3.Zero,
                Vector3.UnitZ);
            Matrix World     = Matrix.CreateRotationX(-MathHelper.PiOver2) * Matrix.CreateRotationZ(-MathHelper.PiOver2) * Matrix.CreateScale(-1f, 1f, 1f);
            Matrix MainWorld = World;

            World *= (leg == 2 ? Matrix.CreateTranslation(0f, 0f, -(ProjectionYMax + ProjectionYMin) / 2f) : Matrix.CreateTranslation(CoreX * (leg == 0 ? -1f : 1f), CoreY, -(ProjectionYMax + ProjectionYMin) / 2f));

            LightPosition.SetValue(cameraPosition);
            CameraPosition.SetValue(cameraPosition);
            WorldTransform.SetValue(World);
            ModelTransform.SetValue(World * View * Projection);
            NormalTransform.SetValue(Matrix.Transpose(Matrix.Invert(World)));
            return(MainWorld * View * Projection);
        }
Exemple #4
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Visible != null)
         {
             hashCode = hashCode * 59 + Visible.GetHashCode();
         }
         if (LegendGroup != null)
         {
             hashCode = hashCode * 59 + LegendGroup.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (UId != null)
         {
             hashCode = hashCode * 59 + UId.GetHashCode();
         }
         if (Ids != null)
         {
             hashCode = hashCode * 59 + Ids.GetHashCode();
         }
         if (CustomData != null)
         {
             hashCode = hashCode * 59 + CustomData.GetHashCode();
         }
         if (Meta != null)
         {
             hashCode = hashCode * 59 + Meta.GetHashCode();
         }
         if (MetaArray != null)
         {
             hashCode = hashCode * 59 + MetaArray.GetHashCode();
         }
         if (HoverLabel != null)
         {
             hashCode = hashCode * 59 + HoverLabel.GetHashCode();
         }
         if (Stream != null)
         {
             hashCode = hashCode * 59 + Stream.GetHashCode();
         }
         if (UiRevision != null)
         {
             hashCode = hashCode * 59 + UiRevision.GetHashCode();
         }
         if (X != null)
         {
             hashCode = hashCode * 59 + X.GetHashCode();
         }
         if (Y != null)
         {
             hashCode = hashCode * 59 + Y.GetHashCode();
         }
         if (Z != null)
         {
             hashCode = hashCode * 59 + Z.GetHashCode();
         }
         if (U != null)
         {
             hashCode = hashCode * 59 + U.GetHashCode();
         }
         if (V != null)
         {
             hashCode = hashCode * 59 + V.GetHashCode();
         }
         if (W != null)
         {
             hashCode = hashCode * 59 + W.GetHashCode();
         }
         if (Starts != null)
         {
             hashCode = hashCode * 59 + Starts.GetHashCode();
         }
         if (MaxDisplayed != null)
         {
             hashCode = hashCode * 59 + MaxDisplayed.GetHashCode();
         }
         if (SizeRef != null)
         {
             hashCode = hashCode * 59 + SizeRef.GetHashCode();
         }
         if (Text != null)
         {
             hashCode = hashCode * 59 + Text.GetHashCode();
         }
         if (HoverText != null)
         {
             hashCode = hashCode * 59 + HoverText.GetHashCode();
         }
         if (HoverTemplate != null)
         {
             hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
         }
         if (HoverTemplateArray != null)
         {
             hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
         }
         if (ShowLegend != null)
         {
             hashCode = hashCode * 59 + ShowLegend.GetHashCode();
         }
         if (CAuto != null)
         {
             hashCode = hashCode * 59 + CAuto.GetHashCode();
         }
         if (CMin != null)
         {
             hashCode = hashCode * 59 + CMin.GetHashCode();
         }
         if (CMax != null)
         {
             hashCode = hashCode * 59 + CMax.GetHashCode();
         }
         if (CMid != null)
         {
             hashCode = hashCode * 59 + CMid.GetHashCode();
         }
         if (ColorScale != null)
         {
             hashCode = hashCode * 59 + ColorScale.GetHashCode();
         }
         if (AutoColorScale != null)
         {
             hashCode = hashCode * 59 + AutoColorScale.GetHashCode();
         }
         if (ReverseScale != null)
         {
             hashCode = hashCode * 59 + ReverseScale.GetHashCode();
         }
         if (ShowScale != null)
         {
             hashCode = hashCode * 59 + ShowScale.GetHashCode();
         }
         if (ColorBar != null)
         {
             hashCode = hashCode * 59 + ColorBar.GetHashCode();
         }
         if (ColorAxis != null)
         {
             hashCode = hashCode * 59 + ColorAxis.GetHashCode();
         }
         if (Opacity != null)
         {
             hashCode = hashCode * 59 + Opacity.GetHashCode();
         }
         if (LightPosition != null)
         {
             hashCode = hashCode * 59 + LightPosition.GetHashCode();
         }
         if (Lighting != null)
         {
             hashCode = hashCode * 59 + Lighting.GetHashCode();
         }
         if (HoverInfo != null)
         {
             hashCode = hashCode * 59 + HoverInfo.GetHashCode();
         }
         if (HoverInfoArray != null)
         {
             hashCode = hashCode * 59 + HoverInfoArray.GetHashCode();
         }
         if (Scene != null)
         {
             hashCode = hashCode * 59 + Scene.GetHashCode();
         }
         if (IdsSrc != null)
         {
             hashCode = hashCode * 59 + IdsSrc.GetHashCode();
         }
         if (CustomDataSrc != null)
         {
             hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
         }
         if (MetaSrc != null)
         {
             hashCode = hashCode * 59 + MetaSrc.GetHashCode();
         }
         if (XSrc != null)
         {
             hashCode = hashCode * 59 + XSrc.GetHashCode();
         }
         if (YSrc != null)
         {
             hashCode = hashCode * 59 + YSrc.GetHashCode();
         }
         if (ZSrc != null)
         {
             hashCode = hashCode * 59 + ZSrc.GetHashCode();
         }
         if (USrc != null)
         {
             hashCode = hashCode * 59 + USrc.GetHashCode();
         }
         if (VSrc != null)
         {
             hashCode = hashCode * 59 + VSrc.GetHashCode();
         }
         if (WSrc != null)
         {
             hashCode = hashCode * 59 + WSrc.GetHashCode();
         }
         if (HoverTemplateSrc != null)
         {
             hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
         }
         if (HoverInfoSrc != null)
         {
             hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #5
0
        /// <inheritdoc />
        public bool Equals([AllowNull] StreamTube other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                     ) &&
                 (
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                 ) &&
                 (
                     LegendGroup == other.LegendGroup ||
                     LegendGroup != null &&
                     LegendGroup.Equals(other.LegendGroup)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     UId == other.UId ||
                     UId != null &&
                     UId.Equals(other.UId)
                 ) &&
                 (
                     Equals(Ids, other.Ids) ||
                     Ids != null && other.Ids != null &&
                     Ids.SequenceEqual(other.Ids)
                 ) &&
                 (
                     Equals(CustomData, other.CustomData) ||
                     CustomData != null && other.CustomData != null &&
                     CustomData.SequenceEqual(other.CustomData)
                 ) &&
                 (
                     Meta == other.Meta ||
                     Meta != null &&
                     Meta.Equals(other.Meta)
                 ) &&
                 (
                     Equals(MetaArray, other.MetaArray) ||
                     MetaArray != null && other.MetaArray != null &&
                     MetaArray.SequenceEqual(other.MetaArray)
                 ) &&
                 (
                     HoverLabel == other.HoverLabel ||
                     HoverLabel != null &&
                     HoverLabel.Equals(other.HoverLabel)
                 ) &&
                 (
                     Stream == other.Stream ||
                     Stream != null &&
                     Stream.Equals(other.Stream)
                 ) &&
                 (
                     UiRevision == other.UiRevision ||
                     UiRevision != null &&
                     UiRevision.Equals(other.UiRevision)
                 ) &&
                 (
                     Equals(X, other.X) ||
                     X != null && other.X != null &&
                     X.SequenceEqual(other.X)
                 ) &&
                 (
                     Equals(Y, other.Y) ||
                     Y != null && other.Y != null &&
                     Y.SequenceEqual(other.Y)
                 ) &&
                 (
                     Equals(Z, other.Z) ||
                     Z != null && other.Z != null &&
                     Z.SequenceEqual(other.Z)
                 ) &&
                 (
                     Equals(U, other.U) ||
                     U != null && other.U != null &&
                     U.SequenceEqual(other.U)
                 ) &&
                 (
                     Equals(V, other.V) ||
                     V != null && other.V != null &&
                     V.SequenceEqual(other.V)
                 ) &&
                 (
                     Equals(W, other.W) ||
                     W != null && other.W != null &&
                     W.SequenceEqual(other.W)
                 ) &&
                 (
                     Starts == other.Starts ||
                     Starts != null &&
                     Starts.Equals(other.Starts)
                 ) &&
                 (
                     MaxDisplayed == other.MaxDisplayed ||
                     MaxDisplayed != null &&
                     MaxDisplayed.Equals(other.MaxDisplayed)
                 ) &&
                 (
                     SizeRef == other.SizeRef ||
                     SizeRef != null &&
                     SizeRef.Equals(other.SizeRef)
                 ) &&
                 (
                     Text == other.Text ||
                     Text != null &&
                     Text.Equals(other.Text)
                 ) &&
                 (
                     HoverText == other.HoverText ||
                     HoverText != null &&
                     HoverText.Equals(other.HoverText)
                 ) &&
                 (
                     HoverTemplate == other.HoverTemplate ||
                     HoverTemplate != null &&
                     HoverTemplate.Equals(other.HoverTemplate)
                 ) &&
                 (
                     Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                     HoverTemplateArray != null && other.HoverTemplateArray != null &&
                     HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)
                 ) &&
                 (
                     ShowLegend == other.ShowLegend ||
                     ShowLegend != null &&
                     ShowLegend.Equals(other.ShowLegend)
                 ) &&
                 (
                     CAuto == other.CAuto ||
                     CAuto != null &&
                     CAuto.Equals(other.CAuto)
                 ) &&
                 (
                     CMin == other.CMin ||
                     CMin != null &&
                     CMin.Equals(other.CMin)
                 ) &&
                 (
                     CMax == other.CMax ||
                     CMax != null &&
                     CMax.Equals(other.CMax)
                 ) &&
                 (
                     CMid == other.CMid ||
                     CMid != null &&
                     CMid.Equals(other.CMid)
                 ) &&
                 (
                     ColorScale == other.ColorScale ||
                     ColorScale != null &&
                     ColorScale.Equals(other.ColorScale)
                 ) &&
                 (
                     AutoColorScale == other.AutoColorScale ||
                     AutoColorScale != null &&
                     AutoColorScale.Equals(other.AutoColorScale)
                 ) &&
                 (
                     ReverseScale == other.ReverseScale ||
                     ReverseScale != null &&
                     ReverseScale.Equals(other.ReverseScale)
                 ) &&
                 (
                     ShowScale == other.ShowScale ||
                     ShowScale != null &&
                     ShowScale.Equals(other.ShowScale)
                 ) &&
                 (
                     ColorBar == other.ColorBar ||
                     ColorBar != null &&
                     ColorBar.Equals(other.ColorBar)
                 ) &&
                 (
                     ColorAxis == other.ColorAxis ||
                     ColorAxis != null &&
                     ColorAxis.Equals(other.ColorAxis)
                 ) &&
                 (
                     Opacity == other.Opacity ||
                     Opacity != null &&
                     Opacity.Equals(other.Opacity)
                 ) &&
                 (
                     LightPosition == other.LightPosition ||
                     LightPosition != null &&
                     LightPosition.Equals(other.LightPosition)
                 ) &&
                 (
                     Lighting == other.Lighting ||
                     Lighting != null &&
                     Lighting.Equals(other.Lighting)
                 ) &&
                 (
                     HoverInfo == other.HoverInfo ||
                     HoverInfo != null &&
                     HoverInfo.Equals(other.HoverInfo)
                 ) &&
                 (
                     Equals(HoverInfoArray, other.HoverInfoArray) ||
                     HoverInfoArray != null && other.HoverInfoArray != null &&
                     HoverInfoArray.SequenceEqual(other.HoverInfoArray)
                 ) &&
                 (
                     Scene == other.Scene ||
                     Scene != null &&
                     Scene.Equals(other.Scene)
                 ) &&
                 (
                     IdsSrc == other.IdsSrc ||
                     IdsSrc != null &&
                     IdsSrc.Equals(other.IdsSrc)
                 ) &&
                 (
                     CustomDataSrc == other.CustomDataSrc ||
                     CustomDataSrc != null &&
                     CustomDataSrc.Equals(other.CustomDataSrc)
                 ) &&
                 (
                     MetaSrc == other.MetaSrc ||
                     MetaSrc != null &&
                     MetaSrc.Equals(other.MetaSrc)
                 ) &&
                 (
                     XSrc == other.XSrc ||
                     XSrc != null &&
                     XSrc.Equals(other.XSrc)
                 ) &&
                 (
                     YSrc == other.YSrc ||
                     YSrc != null &&
                     YSrc.Equals(other.YSrc)
                 ) &&
                 (
                     ZSrc == other.ZSrc ||
                     ZSrc != null &&
                     ZSrc.Equals(other.ZSrc)
                 ) &&
                 (
                     USrc == other.USrc ||
                     USrc != null &&
                     USrc.Equals(other.USrc)
                 ) &&
                 (
                     VSrc == other.VSrc ||
                     VSrc != null &&
                     VSrc.Equals(other.VSrc)
                 ) &&
                 (
                     WSrc == other.WSrc ||
                     WSrc != null &&
                     WSrc.Equals(other.WSrc)
                 ) &&
                 (
                     HoverTemplateSrc == other.HoverTemplateSrc ||
                     HoverTemplateSrc != null &&
                     HoverTemplateSrc.Equals(other.HoverTemplateSrc)
                 ) &&
                 (
                     HoverInfoSrc == other.HoverInfoSrc ||
                     HoverInfoSrc != null &&
                     HoverInfoSrc.Equals(other.HoverInfoSrc)
                 ));
        }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Visible != null)
         {
             hashCode = hashCode * 59 + Visible.GetHashCode();
         }
         if (LegendGroup != null)
         {
             hashCode = hashCode * 59 + LegendGroup.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (UId != null)
         {
             hashCode = hashCode * 59 + UId.GetHashCode();
         }
         if (Ids != null)
         {
             hashCode = hashCode * 59 + Ids.GetHashCode();
         }
         if (CustomData != null)
         {
             hashCode = hashCode * 59 + CustomData.GetHashCode();
         }
         if (Meta != null)
         {
             hashCode = hashCode * 59 + Meta.GetHashCode();
         }
         if (MetaArray != null)
         {
             hashCode = hashCode * 59 + MetaArray.GetHashCode();
         }
         if (HoverLabel != null)
         {
             hashCode = hashCode * 59 + HoverLabel.GetHashCode();
         }
         if (Stream != null)
         {
             hashCode = hashCode * 59 + Stream.GetHashCode();
         }
         if (UiRevision != null)
         {
             hashCode = hashCode * 59 + UiRevision.GetHashCode();
         }
         if (X != null)
         {
             hashCode = hashCode * 59 + X.GetHashCode();
         }
         if (Y != null)
         {
             hashCode = hashCode * 59 + Y.GetHashCode();
         }
         if (Z != null)
         {
             hashCode = hashCode * 59 + Z.GetHashCode();
         }
         if (Value != null)
         {
             hashCode = hashCode * 59 + Value.GetHashCode();
         }
         if (IsoMin != null)
         {
             hashCode = hashCode * 59 + IsoMin.GetHashCode();
         }
         if (IsoMax != null)
         {
             hashCode = hashCode * 59 + IsoMax.GetHashCode();
         }
         if (Surface != null)
         {
             hashCode = hashCode * 59 + Surface.GetHashCode();
         }
         if (SpaceFrame != null)
         {
             hashCode = hashCode * 59 + SpaceFrame.GetHashCode();
         }
         if (Slices != null)
         {
             hashCode = hashCode * 59 + Slices.GetHashCode();
         }
         if (Caps != null)
         {
             hashCode = hashCode * 59 + Caps.GetHashCode();
         }
         if (Text != null)
         {
             hashCode = hashCode * 59 + Text.GetHashCode();
         }
         if (TextArray != null)
         {
             hashCode = hashCode * 59 + TextArray.GetHashCode();
         }
         if (HoverText != null)
         {
             hashCode = hashCode * 59 + HoverText.GetHashCode();
         }
         if (HoverTextArray != null)
         {
             hashCode = hashCode * 59 + HoverTextArray.GetHashCode();
         }
         if (HoverTemplate != null)
         {
             hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
         }
         if (HoverTemplateArray != null)
         {
             hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
         }
         if (ShowLegend != null)
         {
             hashCode = hashCode * 59 + ShowLegend.GetHashCode();
         }
         if (CAuto != null)
         {
             hashCode = hashCode * 59 + CAuto.GetHashCode();
         }
         if (CMin != null)
         {
             hashCode = hashCode * 59 + CMin.GetHashCode();
         }
         if (CMax != null)
         {
             hashCode = hashCode * 59 + CMax.GetHashCode();
         }
         if (CMid != null)
         {
             hashCode = hashCode * 59 + CMid.GetHashCode();
         }
         if (ColorScale != null)
         {
             hashCode = hashCode * 59 + ColorScale.GetHashCode();
         }
         if (AutoColorScale != null)
         {
             hashCode = hashCode * 59 + AutoColorScale.GetHashCode();
         }
         if (ReverseScale != null)
         {
             hashCode = hashCode * 59 + ReverseScale.GetHashCode();
         }
         if (ShowScale != null)
         {
             hashCode = hashCode * 59 + ShowScale.GetHashCode();
         }
         if (ColorBar != null)
         {
             hashCode = hashCode * 59 + ColorBar.GetHashCode();
         }
         if (ColorAxis != null)
         {
             hashCode = hashCode * 59 + ColorAxis.GetHashCode();
         }
         if (Opacity != null)
         {
             hashCode = hashCode * 59 + Opacity.GetHashCode();
         }
         if (LightPosition != null)
         {
             hashCode = hashCode * 59 + LightPosition.GetHashCode();
         }
         if (Lighting != null)
         {
             hashCode = hashCode * 59 + Lighting.GetHashCode();
         }
         if (FlatShading != null)
         {
             hashCode = hashCode * 59 + FlatShading.GetHashCode();
         }
         if (Contour != null)
         {
             hashCode = hashCode * 59 + Contour.GetHashCode();
         }
         if (HoverInfo != null)
         {
             hashCode = hashCode * 59 + HoverInfo.GetHashCode();
         }
         if (HoverInfoArray != null)
         {
             hashCode = hashCode * 59 + HoverInfoArray.GetHashCode();
         }
         if (Scene != null)
         {
             hashCode = hashCode * 59 + Scene.GetHashCode();
         }
         if (IdsSrc != null)
         {
             hashCode = hashCode * 59 + IdsSrc.GetHashCode();
         }
         if (CustomDataSrc != null)
         {
             hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
         }
         if (MetaSrc != null)
         {
             hashCode = hashCode * 59 + MetaSrc.GetHashCode();
         }
         if (XSrc != null)
         {
             hashCode = hashCode * 59 + XSrc.GetHashCode();
         }
         if (YSrc != null)
         {
             hashCode = hashCode * 59 + YSrc.GetHashCode();
         }
         if (ZSrc != null)
         {
             hashCode = hashCode * 59 + ZSrc.GetHashCode();
         }
         if (ValueSrc != null)
         {
             hashCode = hashCode * 59 + ValueSrc.GetHashCode();
         }
         if (TextSrc != null)
         {
             hashCode = hashCode * 59 + TextSrc.GetHashCode();
         }
         if (HoverTextSrc != null)
         {
             hashCode = hashCode * 59 + HoverTextSrc.GetHashCode();
         }
         if (HoverTemplateSrc != null)
         {
             hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
         }
         if (HoverInfoSrc != null)
         {
             hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode();
         }
         return(hashCode);
     }
 }
        /// <inheritdoc />
        public bool Equals([AllowNull] IsoSurface other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                     ) &&
                 (
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                 ) &&
                 (
                     LegendGroup == other.LegendGroup ||
                     LegendGroup != null &&
                     LegendGroup.Equals(other.LegendGroup)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     UId == other.UId ||
                     UId != null &&
                     UId.Equals(other.UId)
                 ) &&
                 (
                     Equals(Ids, other.Ids) ||
                     Ids != null && other.Ids != null &&
                     Ids.SequenceEqual(other.Ids)
                 ) &&
                 (
                     Equals(CustomData, other.CustomData) ||
                     CustomData != null && other.CustomData != null &&
                     CustomData.SequenceEqual(other.CustomData)
                 ) &&
                 (
                     Meta == other.Meta ||
                     Meta != null &&
                     Meta.Equals(other.Meta)
                 ) &&
                 (
                     Equals(MetaArray, other.MetaArray) ||
                     MetaArray != null && other.MetaArray != null &&
                     MetaArray.SequenceEqual(other.MetaArray)
                 ) &&
                 (
                     HoverLabel == other.HoverLabel ||
                     HoverLabel != null &&
                     HoverLabel.Equals(other.HoverLabel)
                 ) &&
                 (
                     Stream == other.Stream ||
                     Stream != null &&
                     Stream.Equals(other.Stream)
                 ) &&
                 (
                     UiRevision == other.UiRevision ||
                     UiRevision != null &&
                     UiRevision.Equals(other.UiRevision)
                 ) &&
                 (
                     Equals(X, other.X) ||
                     X != null && other.X != null &&
                     X.SequenceEqual(other.X)
                 ) &&
                 (
                     Equals(Y, other.Y) ||
                     Y != null && other.Y != null &&
                     Y.SequenceEqual(other.Y)
                 ) &&
                 (
                     Equals(Z, other.Z) ||
                     Z != null && other.Z != null &&
                     Z.SequenceEqual(other.Z)
                 ) &&
                 (
                     Equals(Value, other.Value) ||
                     Value != null && other.Value != null &&
                     Value.SequenceEqual(other.Value)
                 ) &&
                 (
                     IsoMin == other.IsoMin ||
                     IsoMin != null &&
                     IsoMin.Equals(other.IsoMin)
                 ) &&
                 (
                     IsoMax == other.IsoMax ||
                     IsoMax != null &&
                     IsoMax.Equals(other.IsoMax)
                 ) &&
                 (
                     Surface == other.Surface ||
                     Surface != null &&
                     Surface.Equals(other.Surface)
                 ) &&
                 (
                     SpaceFrame == other.SpaceFrame ||
                     SpaceFrame != null &&
                     SpaceFrame.Equals(other.SpaceFrame)
                 ) &&
                 (
                     Slices == other.Slices ||
                     Slices != null &&
                     Slices.Equals(other.Slices)
                 ) &&
                 (
                     Caps == other.Caps ||
                     Caps != null &&
                     Caps.Equals(other.Caps)
                 ) &&
                 (
                     Text == other.Text ||
                     Text != null &&
                     Text.Equals(other.Text)
                 ) &&
                 (
                     Equals(TextArray, other.TextArray) ||
                     TextArray != null && other.TextArray != null &&
                     TextArray.SequenceEqual(other.TextArray)
                 ) &&
                 (
                     HoverText == other.HoverText ||
                     HoverText != null &&
                     HoverText.Equals(other.HoverText)
                 ) &&
                 (
                     Equals(HoverTextArray, other.HoverTextArray) ||
                     HoverTextArray != null && other.HoverTextArray != null &&
                     HoverTextArray.SequenceEqual(other.HoverTextArray)
                 ) &&
                 (
                     HoverTemplate == other.HoverTemplate ||
                     HoverTemplate != null &&
                     HoverTemplate.Equals(other.HoverTemplate)
                 ) &&
                 (
                     Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                     HoverTemplateArray != null && other.HoverTemplateArray != null &&
                     HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)
                 ) &&
                 (
                     ShowLegend == other.ShowLegend ||
                     ShowLegend != null &&
                     ShowLegend.Equals(other.ShowLegend)
                 ) &&
                 (
                     CAuto == other.CAuto ||
                     CAuto != null &&
                     CAuto.Equals(other.CAuto)
                 ) &&
                 (
                     CMin == other.CMin ||
                     CMin != null &&
                     CMin.Equals(other.CMin)
                 ) &&
                 (
                     CMax == other.CMax ||
                     CMax != null &&
                     CMax.Equals(other.CMax)
                 ) &&
                 (
                     CMid == other.CMid ||
                     CMid != null &&
                     CMid.Equals(other.CMid)
                 ) &&
                 (
                     ColorScale == other.ColorScale ||
                     ColorScale != null &&
                     ColorScale.Equals(other.ColorScale)
                 ) &&
                 (
                     AutoColorScale == other.AutoColorScale ||
                     AutoColorScale != null &&
                     AutoColorScale.Equals(other.AutoColorScale)
                 ) &&
                 (
                     ReverseScale == other.ReverseScale ||
                     ReverseScale != null &&
                     ReverseScale.Equals(other.ReverseScale)
                 ) &&
                 (
                     ShowScale == other.ShowScale ||
                     ShowScale != null &&
                     ShowScale.Equals(other.ShowScale)
                 ) &&
                 (
                     ColorBar == other.ColorBar ||
                     ColorBar != null &&
                     ColorBar.Equals(other.ColorBar)
                 ) &&
                 (
                     ColorAxis == other.ColorAxis ||
                     ColorAxis != null &&
                     ColorAxis.Equals(other.ColorAxis)
                 ) &&
                 (
                     Opacity == other.Opacity ||
                     Opacity != null &&
                     Opacity.Equals(other.Opacity)
                 ) &&
                 (
                     LightPosition == other.LightPosition ||
                     LightPosition != null &&
                     LightPosition.Equals(other.LightPosition)
                 ) &&
                 (
                     Lighting == other.Lighting ||
                     Lighting != null &&
                     Lighting.Equals(other.Lighting)
                 ) &&
                 (
                     FlatShading == other.FlatShading ||
                     FlatShading != null &&
                     FlatShading.Equals(other.FlatShading)
                 ) &&
                 (
                     Contour == other.Contour ||
                     Contour != null &&
                     Contour.Equals(other.Contour)
                 ) &&
                 (
                     HoverInfo == other.HoverInfo ||
                     HoverInfo != null &&
                     HoverInfo.Equals(other.HoverInfo)
                 ) &&
                 (
                     Equals(HoverInfoArray, other.HoverInfoArray) ||
                     HoverInfoArray != null && other.HoverInfoArray != null &&
                     HoverInfoArray.SequenceEqual(other.HoverInfoArray)
                 ) &&
                 (
                     Scene == other.Scene ||
                     Scene != null &&
                     Scene.Equals(other.Scene)
                 ) &&
                 (
                     IdsSrc == other.IdsSrc ||
                     IdsSrc != null &&
                     IdsSrc.Equals(other.IdsSrc)
                 ) &&
                 (
                     CustomDataSrc == other.CustomDataSrc ||
                     CustomDataSrc != null &&
                     CustomDataSrc.Equals(other.CustomDataSrc)
                 ) &&
                 (
                     MetaSrc == other.MetaSrc ||
                     MetaSrc != null &&
                     MetaSrc.Equals(other.MetaSrc)
                 ) &&
                 (
                     XSrc == other.XSrc ||
                     XSrc != null &&
                     XSrc.Equals(other.XSrc)
                 ) &&
                 (
                     YSrc == other.YSrc ||
                     YSrc != null &&
                     YSrc.Equals(other.YSrc)
                 ) &&
                 (
                     ZSrc == other.ZSrc ||
                     ZSrc != null &&
                     ZSrc.Equals(other.ZSrc)
                 ) &&
                 (
                     ValueSrc == other.ValueSrc ||
                     ValueSrc != null &&
                     ValueSrc.Equals(other.ValueSrc)
                 ) &&
                 (
                     TextSrc == other.TextSrc ||
                     TextSrc != null &&
                     TextSrc.Equals(other.TextSrc)
                 ) &&
                 (
                     HoverTextSrc == other.HoverTextSrc ||
                     HoverTextSrc != null &&
                     HoverTextSrc.Equals(other.HoverTextSrc)
                 ) &&
                 (
                     HoverTemplateSrc == other.HoverTemplateSrc ||
                     HoverTemplateSrc != null &&
                     HoverTemplateSrc.Equals(other.HoverTemplateSrc)
                 ) &&
                 (
                     HoverInfoSrc == other.HoverInfoSrc ||
                     HoverInfoSrc != null &&
                     HoverInfoSrc.Equals(other.HoverInfoSrc)
                 ));
        }
Exemple #8
0
        public bool Equals([AllowNull] Surface other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) &&
                   (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) &&
                   (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) &&
                   (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) &&
                   (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) &&
                   (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) &&
                   (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) &&
                   (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) &&
                   (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) &&
                   (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) &&
                   (Equals(Z, other.Z) || Z != null && other.Z != null && Z.SequenceEqual(other.Z)) &&
                   (Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X)) &&
                   (Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y)) &&
                   (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) &&
                   (Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray)) &&
                   (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) &&
                   (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) &&
                   (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) &&
                   (Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                    HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) &&
                   (ConnectGaps == other.ConnectGaps && ConnectGaps != null && other.ConnectGaps != null && ConnectGaps.Equals(other.ConnectGaps)) &&
                   (Equals(SurfaceColor, other.SurfaceColor) || SurfaceColor != null && other.SurfaceColor != null && SurfaceColor.SequenceEqual(other.SurfaceColor)) &&
                   (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) &&
                   (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) &&
                   (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) &&
                   (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) &&
                   (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) &&
                   (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) &&
                   (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) &&
                   (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) &&
                   (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) &&
                   (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) &&
                   (Contours == other.Contours && Contours != null && other.Contours != null && Contours.Equals(other.Contours)) &&
                   (HideSurface == other.HideSurface && HideSurface != null && other.HideSurface != null && HideSurface.Equals(other.HideSurface)) &&
                   (LightPosition == other.LightPosition && LightPosition != null && other.LightPosition != null && LightPosition.Equals(other.LightPosition)) &&
                   (Lighting == other.Lighting && Lighting != null && other.Lighting != null && Lighting.Equals(other.Lighting)) &&
                   (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) &&
                   (OpacityScale == other.OpacityScale && OpacityScale != null && other.OpacityScale != null && OpacityScale.Equals(other.OpacityScale)) &&
                   (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) &&
                   (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) &&
                   (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) &&
                   (XCalendar == other.XCalendar && XCalendar != null && other.XCalendar != null && XCalendar.Equals(other.XCalendar)) &&
                   (YCalendar == other.YCalendar && YCalendar != null && other.YCalendar != null && YCalendar.Equals(other.YCalendar)) &&
                   (ZCalendar == other.ZCalendar && ZCalendar != null && other.ZCalendar != null && ZCalendar.Equals(other.ZCalendar)) &&
                   (Scene == other.Scene && Scene != null && other.Scene != null && Scene.Equals(other.Scene)) &&
                   (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) &&
                   (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) &&
                   (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) &&
                   (ZSrc == other.ZSrc && ZSrc != null && other.ZSrc != null && ZSrc.Equals(other.ZSrc)) &&
                   (XSrc == other.XSrc && XSrc != null && other.XSrc != null && XSrc.Equals(other.XSrc)) &&
                   (YSrc == other.YSrc && YSrc != null && other.YSrc != null && YSrc.Equals(other.YSrc)) &&
                   (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) &&
                   (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) &&
                   (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc)) &&
                   (SurfaceColorSrc == other.SurfaceColorSrc && SurfaceColorSrc != null && other.SurfaceColorSrc != null && SurfaceColorSrc.Equals(other.SurfaceColorSrc)) &&
                   (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)));
        }
Exemple #9
0
        public bool Equals([AllowNull] Cone other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) &&
                   (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) &&
                   (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) &&
                   (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) &&
                   (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) &&
                   (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) &&
                   (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) &&
                   (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) &&
                   (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) &&
                   (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) &&
                   (Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X)) &&
                   (Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y)) &&
                   (Equals(Z, other.Z) || Z != null && other.Z != null && Z.SequenceEqual(other.Z)) &&
                   (Equals(U, other.U) || U != null && other.U != null && U.SequenceEqual(other.U)) &&
                   (Equals(V, other.V) || V != null && other.V != null && V.SequenceEqual(other.V)) &&
                   (Equals(W, other.W) || W != null && other.W != null && W.SequenceEqual(other.W)) &&
                   (SizeMode == other.SizeMode && SizeMode != null && other.SizeMode != null && SizeMode.Equals(other.SizeMode)) &&
                   (SizeRef == other.SizeRef && SizeRef != null && other.SizeRef != null && SizeRef.Equals(other.SizeRef)) &&
                   (Anchor == other.Anchor && Anchor != null && other.Anchor != null && Anchor.Equals(other.Anchor)) &&
                   (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) &&
                   (Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray)) &&
                   (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) &&
                   (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) &&
                   (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) &&
                   (Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                    HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) &&
                   (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) &&
                   (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) &&
                   (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) &&
                   (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) &&
                   (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) &&
                   (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) &&
                   (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) &&
                   (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) &&
                   (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) &&
                   (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) &&
                   (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) &&
                   (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) &&
                   (LightPosition == other.LightPosition && LightPosition != null && other.LightPosition != null && LightPosition.Equals(other.LightPosition)) &&
                   (Lighting == other.Lighting && Lighting != null && other.Lighting != null && Lighting.Equals(other.Lighting)) &&
                   (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) &&
                   (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) &&
                   (Scene == other.Scene && Scene != null && other.Scene != null && Scene.Equals(other.Scene)) &&
                   (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) &&
                   (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) &&
                   (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) &&
                   (XSrc == other.XSrc && XSrc != null && other.XSrc != null && XSrc.Equals(other.XSrc)) &&
                   (YSrc == other.YSrc && YSrc != null && other.YSrc != null && YSrc.Equals(other.YSrc)) &&
                   (ZSrc == other.ZSrc && ZSrc != null && other.ZSrc != null && ZSrc.Equals(other.ZSrc)) &&
                   (USrc == other.USrc && USrc != null && other.USrc != null && USrc.Equals(other.USrc)) &&
                   (VSrc == other.VSrc && VSrc != null && other.VSrc != null && VSrc.Equals(other.VSrc)) &&
                   (WSrc == other.WSrc && WSrc != null && other.WSrc != null && WSrc.Equals(other.WSrc)) &&
                   (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) &&
                   (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) &&
                   (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc)) &&
                   (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)));
        }
    private GameObject process(ObjectPosition op)
    {
        if (op is LightPosition)
        {
            GameObject lgo = new GameObject();

//#if UNITY_EDITOR
            addCDR(op, lgo);
//#endif
            LightPosition lp = (LightPosition)op;
            lgo.transform.SetParent(meshRoot.transform);
            lgo.transform.localScale    = new Vector3(op.scale, op.scale, op.scale);
            lgo.transform.localPosition = op.min;
            lgo.transform.localRotation = op.qut;

            Light light = lgo.AddComponent <Light>();
            light.type      = LightType.Point;
            light.color     = new Color(lp.r, lp.g, lp.b);
            light.intensity = lp.range;
            light.shadows   = LightShadows.Hard;
            return(lgo);
        }

        GameObject go = GameObject.Instantiate(telaraObjectPrefab, meshRoot.transform);

#if UNITY_EDITOR
        addCDR(op, go);
#endif
        if (!op.visible || (op.nifFile != null && op.nifFile.Contains("30meter.nif")))
        {
            go.tag = "invisible";
            go.SetActive(false);
            invisibleObjects.Add(go);
        }


        string name = op.nifFile;
        Assets.RiftAssets.AssetDatabase.RequestCategory category = Assets.RiftAssets.AssetDatabase.RequestCategory.NONE;
        if (name.Contains("_terrain_") || name.Contains("ocean_chunk"))
        {
            if (name.Contains("_terrain_"))
            {
                category = Assets.RiftAssets.AssetDatabase.RequestCategory.GEOMETRY;
            }
        }

        telara_obj tobj = go.GetComponent <telara_obj>();
        tobj.setProps(category);

        //go.transform.SetParent(meshRoot.transform);

        tobj.setFile(name);
        go.name = name;
        go.transform.localScale    = new Vector3(op.scale, op.scale, op.scale);
        go.transform.localPosition = op.min;
        go.transform.localRotation = op.qut;


        triggerLoad(tobj);
        return(go);
    }
Exemple #11
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Type != null)
                {
                    hashCode = hashCode * 59 + Type.GetHashCode();
                }

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                if (LegendGroup != null)
                {
                    hashCode = hashCode * 59 + LegendGroup.GetHashCode();
                }

                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }

                if (UId != null)
                {
                    hashCode = hashCode * 59 + UId.GetHashCode();
                }

                if (Ids != null)
                {
                    hashCode = hashCode * 59 + Ids.GetHashCode();
                }

                if (CustomData != null)
                {
                    hashCode = hashCode * 59 + CustomData.GetHashCode();
                }

                if (Meta != null)
                {
                    hashCode = hashCode * 59 + Meta.GetHashCode();
                }

                if (MetaArray != null)
                {
                    hashCode = hashCode * 59 + MetaArray.GetHashCode();
                }

                if (HoverLabel != null)
                {
                    hashCode = hashCode * 59 + HoverLabel.GetHashCode();
                }

                if (Stream != null)
                {
                    hashCode = hashCode * 59 + Stream.GetHashCode();
                }

                if (UiRevision != null)
                {
                    hashCode = hashCode * 59 + UiRevision.GetHashCode();
                }

                if (X != null)
                {
                    hashCode = hashCode * 59 + X.GetHashCode();
                }

                if (Y != null)
                {
                    hashCode = hashCode * 59 + Y.GetHashCode();
                }

                if (Z != null)
                {
                    hashCode = hashCode * 59 + Z.GetHashCode();
                }

                if (I != null)
                {
                    hashCode = hashCode * 59 + I.GetHashCode();
                }

                if (J != null)
                {
                    hashCode = hashCode * 59 + J.GetHashCode();
                }

                if (K != null)
                {
                    hashCode = hashCode * 59 + K.GetHashCode();
                }

                if (Text != null)
                {
                    hashCode = hashCode * 59 + Text.GetHashCode();
                }

                if (TextArray != null)
                {
                    hashCode = hashCode * 59 + TextArray.GetHashCode();
                }

                if (HoverText != null)
                {
                    hashCode = hashCode * 59 + HoverText.GetHashCode();
                }

                if (HoverTextArray != null)
                {
                    hashCode = hashCode * 59 + HoverTextArray.GetHashCode();
                }

                if (HoverTemplate != null)
                {
                    hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
                }

                if (HoverTemplateArray != null)
                {
                    hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
                }

                if (DelaunaYAxis != null)
                {
                    hashCode = hashCode * 59 + DelaunaYAxis.GetHashCode();
                }

                if (AlphaHull != null)
                {
                    hashCode = hashCode * 59 + AlphaHull.GetHashCode();
                }

                if (Intensity != null)
                {
                    hashCode = hashCode * 59 + Intensity.GetHashCode();
                }

                if (IntensityMode != null)
                {
                    hashCode = hashCode * 59 + IntensityMode.GetHashCode();
                }

                if (Color != null)
                {
                    hashCode = hashCode * 59 + Color.GetHashCode();
                }

                if (VertexColor != null)
                {
                    hashCode = hashCode * 59 + VertexColor.GetHashCode();
                }

                if (FaceColor != null)
                {
                    hashCode = hashCode * 59 + FaceColor.GetHashCode();
                }

                if (CAuto != null)
                {
                    hashCode = hashCode * 59 + CAuto.GetHashCode();
                }

                if (CMin != null)
                {
                    hashCode = hashCode * 59 + CMin.GetHashCode();
                }

                if (CMax != null)
                {
                    hashCode = hashCode * 59 + CMax.GetHashCode();
                }

                if (CMid != null)
                {
                    hashCode = hashCode * 59 + CMid.GetHashCode();
                }

                if (ColorScale != null)
                {
                    hashCode = hashCode * 59 + ColorScale.GetHashCode();
                }

                if (AutoColorScale != null)
                {
                    hashCode = hashCode * 59 + AutoColorScale.GetHashCode();
                }

                if (ReverseScale != null)
                {
                    hashCode = hashCode * 59 + ReverseScale.GetHashCode();
                }

                if (ShowScale != null)
                {
                    hashCode = hashCode * 59 + ShowScale.GetHashCode();
                }

                if (ColorBar != null)
                {
                    hashCode = hashCode * 59 + ColorBar.GetHashCode();
                }

                if (ColorAxis != null)
                {
                    hashCode = hashCode * 59 + ColorAxis.GetHashCode();
                }

                if (Opacity != null)
                {
                    hashCode = hashCode * 59 + Opacity.GetHashCode();
                }

                if (FlatShading != null)
                {
                    hashCode = hashCode * 59 + FlatShading.GetHashCode();
                }

                if (Contour != null)
                {
                    hashCode = hashCode * 59 + Contour.GetHashCode();
                }

                if (LightPosition != null)
                {
                    hashCode = hashCode * 59 + LightPosition.GetHashCode();
                }

                if (Lighting != null)
                {
                    hashCode = hashCode * 59 + Lighting.GetHashCode();
                }

                if (HoverInfo != null)
                {
                    hashCode = hashCode * 59 + HoverInfo.GetHashCode();
                }

                if (HoverInfoArray != null)
                {
                    hashCode = hashCode * 59 + HoverInfoArray.GetHashCode();
                }

                if (ShowLegend != null)
                {
                    hashCode = hashCode * 59 + ShowLegend.GetHashCode();
                }

                if (XCalendar != null)
                {
                    hashCode = hashCode * 59 + XCalendar.GetHashCode();
                }

                if (YCalendar != null)
                {
                    hashCode = hashCode * 59 + YCalendar.GetHashCode();
                }

                if (ZCalendar != null)
                {
                    hashCode = hashCode * 59 + ZCalendar.GetHashCode();
                }

                if (Scene != null)
                {
                    hashCode = hashCode * 59 + Scene.GetHashCode();
                }

                if (IdsSrc != null)
                {
                    hashCode = hashCode * 59 + IdsSrc.GetHashCode();
                }

                if (CustomDataSrc != null)
                {
                    hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
                }

                if (MetaSrc != null)
                {
                    hashCode = hashCode * 59 + MetaSrc.GetHashCode();
                }

                if (XSrc != null)
                {
                    hashCode = hashCode * 59 + XSrc.GetHashCode();
                }

                if (YSrc != null)
                {
                    hashCode = hashCode * 59 + YSrc.GetHashCode();
                }

                if (ZSrc != null)
                {
                    hashCode = hashCode * 59 + ZSrc.GetHashCode();
                }

                if (ISrc != null)
                {
                    hashCode = hashCode * 59 + ISrc.GetHashCode();
                }

                if (JSrc != null)
                {
                    hashCode = hashCode * 59 + JSrc.GetHashCode();
                }

                if (KSrc != null)
                {
                    hashCode = hashCode * 59 + KSrc.GetHashCode();
                }

                if (TextSrc != null)
                {
                    hashCode = hashCode * 59 + TextSrc.GetHashCode();
                }

                if (HoverTextSrc != null)
                {
                    hashCode = hashCode * 59 + HoverTextSrc.GetHashCode();
                }

                if (HoverTemplateSrc != null)
                {
                    hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
                }

                if (IntensitySrc != null)
                {
                    hashCode = hashCode * 59 + IntensitySrc.GetHashCode();
                }

                if (VertexColorSrc != null)
                {
                    hashCode = hashCode * 59 + VertexColorSrc.GetHashCode();
                }

                if (FaceColorSrc != null)
                {
                    hashCode = hashCode * 59 + FaceColorSrc.GetHashCode();
                }

                if (HoverInfoSrc != null)
                {
                    hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode();
                }

                return(hashCode);
            }
        }
Exemple #12
0
        public bool Equals([AllowNull] Mesh3D other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) &&
                   (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) &&
                   (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) &&
                   (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) &&
                   (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) &&
                   (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) &&
                   (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) &&
                   (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) &&
                   (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) &&
                   (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) &&
                   (Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X)) &&
                   (Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y)) &&
                   (Equals(Z, other.Z) || Z != null && other.Z != null && Z.SequenceEqual(other.Z)) &&
                   (Equals(I, other.I) || I != null && other.I != null && I.SequenceEqual(other.I)) &&
                   (Equals(J, other.J) || J != null && other.J != null && J.SequenceEqual(other.J)) &&
                   (Equals(K, other.K) || K != null && other.K != null && K.SequenceEqual(other.K)) &&
                   (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) &&
                   (Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray)) &&
                   (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) &&
                   (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) &&
                   (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) &&
                   (Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                    HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) &&
                   (DelaunaYAxis == other.DelaunaYAxis && DelaunaYAxis != null && other.DelaunaYAxis != null && DelaunaYAxis.Equals(other.DelaunaYAxis)) &&
                   (AlphaHull == other.AlphaHull && AlphaHull != null && other.AlphaHull != null && AlphaHull.Equals(other.AlphaHull)) &&
                   (Equals(Intensity, other.Intensity) || Intensity != null && other.Intensity != null && Intensity.SequenceEqual(other.Intensity)) &&
                   (IntensityMode == other.IntensityMode && IntensityMode != null && other.IntensityMode != null && IntensityMode.Equals(other.IntensityMode)) &&
                   (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) &&
                   (Equals(VertexColor, other.VertexColor) || VertexColor != null && other.VertexColor != null && VertexColor.SequenceEqual(other.VertexColor)) &&
                   (Equals(FaceColor, other.FaceColor) || FaceColor != null && other.FaceColor != null && FaceColor.SequenceEqual(other.FaceColor)) &&
                   (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) &&
                   (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) &&
                   (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) &&
                   (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) &&
                   (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) &&
                   (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) &&
                   (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) &&
                   (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) &&
                   (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) &&
                   (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) &&
                   (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) &&
                   (FlatShading == other.FlatShading && FlatShading != null && other.FlatShading != null && FlatShading.Equals(other.FlatShading)) &&
                   (Contour == other.Contour && Contour != null && other.Contour != null && Contour.Equals(other.Contour)) &&
                   (LightPosition == other.LightPosition && LightPosition != null && other.LightPosition != null && LightPosition.Equals(other.LightPosition)) &&
                   (Lighting == other.Lighting && Lighting != null && other.Lighting != null && Lighting.Equals(other.Lighting)) &&
                   (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) &&
                   (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) &&
                   (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) &&
                   (XCalendar == other.XCalendar && XCalendar != null && other.XCalendar != null && XCalendar.Equals(other.XCalendar)) &&
                   (YCalendar == other.YCalendar && YCalendar != null && other.YCalendar != null && YCalendar.Equals(other.YCalendar)) &&
                   (ZCalendar == other.ZCalendar && ZCalendar != null && other.ZCalendar != null && ZCalendar.Equals(other.ZCalendar)) &&
                   (Scene == other.Scene && Scene != null && other.Scene != null && Scene.Equals(other.Scene)) &&
                   (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) &&
                   (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) &&
                   (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) &&
                   (XSrc == other.XSrc && XSrc != null && other.XSrc != null && XSrc.Equals(other.XSrc)) &&
                   (YSrc == other.YSrc && YSrc != null && other.YSrc != null && YSrc.Equals(other.YSrc)) &&
                   (ZSrc == other.ZSrc && ZSrc != null && other.ZSrc != null && ZSrc.Equals(other.ZSrc)) &&
                   (ISrc == other.ISrc && ISrc != null && other.ISrc != null && ISrc.Equals(other.ISrc)) &&
                   (JSrc == other.JSrc && JSrc != null && other.JSrc != null && JSrc.Equals(other.JSrc)) &&
                   (KSrc == other.KSrc && KSrc != null && other.KSrc != null && KSrc.Equals(other.KSrc)) &&
                   (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) &&
                   (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) &&
                   (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc)) &&
                   (IntensitySrc == other.IntensitySrc && IntensitySrc != null && other.IntensitySrc != null && IntensitySrc.Equals(other.IntensitySrc)) &&
                   (VertexColorSrc == other.VertexColorSrc && VertexColorSrc != null && other.VertexColorSrc != null && VertexColorSrc.Equals(other.VertexColorSrc)) &&
                   (FaceColorSrc == other.FaceColorSrc && FaceColorSrc != null && other.FaceColorSrc != null && FaceColorSrc.Equals(other.FaceColorSrc)) &&
                   (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)));
        }