Beispiel #1
0
 public static void Clamp(BHVector2f v, BHVector2f min, BHVector2f max)
 {
     v.SetValues();
     min.SetValues();
     max.SetValues();
     ClampVector2f(v.mVector, min.mVector, max.mVector);
     v.CopyValues();
 }
Beispiel #2
0
        public static BHVector2f operator /(BHVector2f v, float s)
        {
            v.SetValues();
            BHVector2f r = new BHVector2f();

            DivVector2f(r.mVector, v.mVector, s);
            r.CopyValues();
            return(r);
        }
Beispiel #3
0
        public static BHVector2f operator *(float s, BHVector2f v)
        {
            v.SetValues();
            BHVector2f r = new BHVector2f();

            ScaleVector2f(r.mVector, v.mVector, s);
            r.CopyValues();
            return(r);
        }
Beispiel #4
0
        public static BHVector2f operator -(BHVector2f v)
        {
            v.SetValues();
            BHVector2f r = new BHVector2f();

            UnaryVector2f(r.mVector, v.mVector);
            r.CopyValues();
            return(r);
        }
Beispiel #5
0
        public static BHVector2f Refract(BHVector2f ivec, BHVector2f nvec, float refractionIndex)
        {
            ivec.SetValues();
            nvec.SetValues();
            BHVector2f r = new BHVector2f();

            RefractVector2f(r.mVector, ivec.mVector, nvec.mVector, refractionIndex);
            r.CopyValues();
            return(r);
        }
Beispiel #6
0
        public static BHVector2f Reflect(BHVector2f ivec, BHVector2f nvec)
        {
            ivec.SetValues();
            nvec.SetValues();
            BHVector2f r = new BHVector2f();

            ReflectVector2f(r.mVector, ivec.mVector, nvec.mVector);
            r.CopyValues();
            return(r);
        }
Beispiel #7
0
        public static BHVector2f SmoothStep(BHVector2f v1, BHVector2f v2, float t)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector2f r = new BHVector2f();

            SmoothStepVector2f(r.mVector, v1.mVector, v2.mVector, t);
            r.CopyValues();
            return(r);
        }
Beispiel #8
0
        public static BHVector2f Max(BHVector2f v1, BHVector2f v2)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector2f r = new BHVector2f();

            MaxVector2f(r.mVector, v1.mVector, v2.mVector);
            r.CopyValues();
            return(r);
        }
Beispiel #9
0
        public static BHVector2f operator -(BHVector2f v1, BHVector2f v2)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector2f r = new BHVector2f();

            MinusVector2f(r.mVector, v1.mVector, v2.mVector);
            r.CopyValues();
            return(r);
        }
Beispiel #10
0
        public static BHVector2f Barycentric(BHVector2f v1, BHVector2f v2, BHVector2f v3, float f, float g)
        {
            v1.SetValues();
            v2.SetValues();
            v3.SetValues();
            BHVector2f r = new BHVector2f();

            BarycentricVector2f(r.mVector, v1.mVector, v2.mVector, v3.mVector, f, g);
            r.CopyValues();
            return(r);
        }
Beispiel #11
0
        public static BHVector2f Hermite(BHVector2f v1, BHVector2f t1, BHVector2f v2, BHVector2f t2, float t)
        {
            v1.SetValues();
            v2.SetValues();
            t1.SetValues();
            t2.SetValues();
            BHVector2f r = new BHVector2f();

            HermiteVector2f(r.mVector, v1.mVector, t1.mVector, v2.mVector, t2.mVector, t);
            r.CopyValues();
            return(r);
        }
Beispiel #12
0
        public static BHVector2f CatmullRom(BHVector2f v1, BHVector2f v2, BHVector2f v3, BHVector2f v4, float t)
        {
            v1.SetValues();
            v2.SetValues();
            v3.SetValues();
            v4.SetValues();
            BHVector2f r = new BHVector2f();

            CatmullRomVector2f(r.mVector, v1.mVector, v2.mVector, v3.mVector, v4.mVector, t);
            r.CopyValues();
            return(r);
        }
Beispiel #13
0
 public static float DistanceSquared(BHVector2f v1, BHVector2f v2)
 {
     v1.SetValues();
     v2.SetValues();
     return(DistanceSquaredVector2f(v1.mVector, v2.mVector));
 }
Beispiel #14
0
 public float Dot(BHVector2f v)
 {
     v.SetValues();
     return(DotVector2f(mVector, v.mVector));
 }
Beispiel #15
0
 public bool InBounds(BHVector2f bounds)
 {
     SetValues();
     return(InBoundsVector2f(mVector, bounds.mVector));
 }
Beispiel #16
0
 public float ScalarTripleProduct(BHVector2f v)
 {
     v.SetValues();
     SetValues();
     return(ScalarTripleProductVector2f(mVector, v.mVector));
 }