/////////////////////////////////////////

        void ProcessVertex(float multiplier, float invMultiplier, ref Vector3F position, out Vector3F result)
        {
            var random = new Random(position.GetHashCode());

            result = new Vector3F(
                position.X * random.Next(invMultiplier, multiplier),
                position.Y * random.Next(invMultiplier, multiplier),
                position.Z * random.Next(invMultiplier, multiplier));
        }
Exemplo n.º 2
0
        /////////////////////////////////////////

        void ProcessVertex(float multiplier, float multiplier1, float invMultiplier, ref Vector3F position, out Vector3F result)
        {
            var random = new Random(position.GetHashCode());

            if (position.X < 0 && position.Z < 0)
            {
                result = new Vector3F(
                    position.X - Math.Sign(position.X) * random.Next(invMultiplier, multiplier / 10) - position.Z * multiplier1,
                    position.Y,                //* random.Next( invMultiplier, multiplier ),
                    position.Z);               // * random.Next( invMultiplier, multiplier ) );
            }
            else
            {
                result = position;
            }
        }
Exemplo n.º 3
0
        /////////////////////////////////////////

        void ProcessVertex(float multiplier, float multiplier1, float invMultiplier, int n, ref Vector3F position, out Vector3F result)
        {
            var   random = new Random(position.GetHashCode());
            float nposx  = 0;
            float Ax     = 0;
            float nposy  = 0;
            float Ay     = 0;
            float nposz  = 0;
            float Az     = 0;
            float ofs1   = off1;
            float ofs2   = off2;
            float mul    = 0;

            result = position;
            //if(n % 2 == 0) {
            //	return;
            //}
            if (posN == 2)
            {
                if (position.Z > (float)Multiplier2 && position.Z < (float)Multiplier3 && multiplier1 != 0)
                {
                    Vector2F xz = new Vector2F(position.X, position.Z - (float)Multiplier2);
                    float    a1 = NeoAxis.MathEx.Acos(xz.GetNormalize().X);
                    mul   = ((multiplier) * (MathEx.Sin(position.Z) * position.Z - (float)Multiplier2)) / multiplier1;
                    nposx = NeoAxis.MathEx.Cos(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xz.Length();
                    nposz = (float)Multiplier2 + NeoAxis.MathEx.Sin(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xz.Length();

                    result = new Vector3F(
                        nposx,
                        position.Y,
                        nposz);
                }
                else if (position.Z >= (float)Multiplier3 && multiplier1 != 0)
                {
                    Vector2F xz = new Vector2F(position.X, position.Z - (float)Multiplier2);
                    float    a1 = NeoAxis.MathEx.Acos(xz.GetNormalize().X);
                    mul   = ((multiplier) * (MathEx.Sin((float)Multiplier3) * (float)Multiplier3 - (float)Multiplier2)) / multiplier1;
                    nposx = NeoAxis.MathEx.Cos(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xz.Length();
                    nposz = (float)Multiplier2 + NeoAxis.MathEx.Sin(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xz.Length();

                    result = new Vector3F(
                        nposx,
                        position.Y,
                        nposz);
                }
            }
            else if (posN == 1)
            {
                //z - y
                //x
                //y - z
                if (position.Y <= (float)Multiplier2 && multiplier1 != 0)
                {
                    Vector2F xy = new Vector2F(position.X, position.Y + (float)Multiplier2);
                    float    a1 = NeoAxis.MathEx.Acos(xy.GetNormalize().X);
                    mul   = ((multiplier) * (position.Y - (float)Multiplier2)) / multiplier1;
                    nposx = NeoAxis.MathEx.Cos(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xy.Length();
                    nposy = (float)Multiplier2 - NeoAxis.MathEx.Sin(a1 + (mul * NeoAxis.MathEx.PI) / 180) * xy.Length();

                    result = new Vector3F(
                        nposx,
                        nposy,
                        position.Z);
                }
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance.</returns>
 public override int GetHashCode()
 {
     return(Origin.GetHashCode() ^ Axis.GetHashCode() ^ Angle.GetHashCode());
 }
        /////////////////////////////////////////

        void ProcessVertex(float multiplier, float multiplier1, float invMultiplier, ref Vector3F position, out Vector3F result)
        {
            var   random = new Random(position.GetHashCode());
            float nposx  = 0;
            float Ax     = 0;
            float nposy  = 0;
            float Ay     = 0;
            float nposz  = 0;
            float Az     = 0;
            float ofs1   = off1;
            float ofs2   = off2;

            result = position;


            if (posN == 1)
            {
                if (sigN == 1 && position.X <= (float)Multiplier2)
                {
                    Ax    = multiplier * (float)Math.Exp(-position.Z * position.Z * multiplier1);
                    nposx = position.X + Math.Sign(position.X) * (Ax * ((float)Math.Exp(-position.Y * position.Y * multiplier1)));
                    if (nposx > (float)Multiplier2)
                    {
                        nposx = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        nposx,
                        position.Y,
                        position.Z);
                }
                if (sigN == -1 && position.X > (float)Multiplier2)
                {
                    Ax    = multiplier * (float)Math.Exp(-position.Z * position.Z * multiplier1);
                    nposx = position.X + Math.Sign(position.X) * (Ax * ((float)Math.Exp(-position.Y * position.Y * multiplier1)));
                    if (nposx < (float)Multiplier2)
                    {
                        nposx = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        nposx,
                        position.Y,
                        position.Z);
                }
            }
            else if (posN == 2)
            {
                if (sigN == 1 && position.Y <= (float)Multiplier2)
                {
                    Ay    = multiplier * (float)Math.Exp(-position.Z * position.Z * multiplier1);
                    nposy = position.Y + Math.Sign(position.Y) * (Ay * ((float)Math.Exp(-position.X * position.X * multiplier1)));
                    if (nposy > (float)Multiplier2)
                    {
                        nposy = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        position.X,
                        nposy,
                        position.Z);
                }
                if (sigN == -1 && position.Y > (float)Multiplier2)
                {
                    Ay    = multiplier * (float)Math.Exp(-position.Z * position.Z * multiplier1);
                    nposy = position.Y + Math.Sign(position.Y) * (Ay * ((float)Math.Exp(-position.X * position.X * multiplier1)));
                    if (nposy < (float)Multiplier2)
                    {
                        nposy = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        position.X,
                        nposy,
                        position.Z);
                }
            }
            else if (posN == 3)
            {
                if (sigN == 1 && position.Z <= (float)Multiplier2)
                {
                    Az    = multiplier * (float)Math.Exp(-(position.X - ofs2) * (position.X - ofs2) * multiplier1);
                    nposz = position.Z + Math.Sign(position.Z) * (Az * ((float)Math.Exp(-(position.Y - ofs1) * (position.Y - ofs1) * multiplier1)));
                    if (nposz > (float)Multiplier2)
                    {
                        nposz = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        position.X,
                        position.Y,
                        nposz);
                }
                if (sigN == -1 && position.Z > (float)Multiplier2)
                {
                    Az    = multiplier * (float)Math.Exp(-(position.X - ofs2) * (position.X - ofs2) * multiplier1);
                    nposz = position.Z + Math.Sign(position.Z) * (Az * ((float)Math.Exp(-(position.Y - ofs1) * (position.Y - ofs1) * multiplier1)));
                    if (nposz < (float)Multiplier2)
                    {
                        nposz = (float)Multiplier2;
                    }

                    result = new Vector3F(
                        position.X,
                        position.Y,
                        nposz);
                }
            }
        }
Exemplo n.º 6
0
 public override int GetHashCode()
 {
     return(Minimum.GetHashCode() ^ Maximum.GetHashCode());
 }
Exemplo n.º 7
0
 public override int GetHashCode()
 {
     return(Point1.GetHashCode() ^ Point2.GetHashCode() ^ Radius.GetHashCode());
 }
Exemplo n.º 8
0
 public override int GetHashCode()
 {
     return(Position.GetHashCode() ^ Normal.GetHashCode() ^ Tangent.GetHashCode() ^ Color.GetHashCode() ^ TexCoord0.GetHashCode() ^ TexCoord1.GetHashCode() ^ TexCoord2.GetHashCode() ^ TexCoord3.GetHashCode() ^ BlendIndices.GetHashCode() ^ BlendWeights.GetHashCode());
 }
Exemplo n.º 9
0
 public override int GetHashCode()
 {
     return(Origin.GetHashCode() ^ Direction.GetHashCode());
 }
Exemplo n.º 10
0
 public override int GetHashCode()
 {
     return(Origin.GetHashCode() ^ Radius.GetHashCode());
 }
Exemplo n.º 11
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance.</returns>
 public override int GetHashCode()
 {
     return(A.GetHashCode() ^ B.GetHashCode() ^ C.GetHashCode());
 }
Exemplo n.º 12
0
		public override int GetHashCode()
		{
			return ( Start.GetHashCode() ^ End.GetHashCode() );
		}