Example #1
0
 public static void Clamp(BHVector4f v, BHVector4f min, BHVector4f max)
 {
     v.SetValues();
     min.SetValues();
     max.SetValues();
     ClampVector4f(v.mVector, min.mVector, max.mVector);
     v.CopyValues();
 }
Example #2
0
        public static BHVector4f operator -(BHVector4f v)
        {
            v.SetValues();
            BHVector4f r = new BHVector4f();

            UnaryVector4f(r.mVector, v.mVector);
            r.CopyValues();
            return(r);
        }
Example #3
0
        public static BHVector4f operator /(BHVector4f v, float s)
        {
            v.SetValues();
            BHVector4f r = new BHVector4f();

            DivVector4f(r.mVector, v.mVector, s);
            r.CopyValues();
            return(r);
        }
Example #4
0
        public static BHVector4f operator *(float s, BHVector4f v)
        {
            v.SetValues();
            BHVector4f r = new BHVector4f();

            ScaleVector4f(r.mVector, v.mVector, s);
            r.CopyValues();
            return(r);
        }
Example #5
0
        public static BHVector4f operator -(BHVector4f v1, BHVector4f v2)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector4f r = new BHVector4f();

            MinusVector4f(r.mVector, v1.mVector, v2.mVector);
            r.CopyValues();
            return(r);
        }
Example #6
0
        public static BHVector4f Refract(BHVector4f ivec, BHVector4f nvec, float refractionIndex)
        {
            ivec.SetValues();
            nvec.SetValues();
            BHVector4f r = new BHVector4f();

            RefractVector4f(r.mVector, ivec.mVector, nvec.mVector, refractionIndex);
            r.CopyValues();
            return(r);
        }
Example #7
0
        public static BHVector4f Max(BHVector4f v1, BHVector4f v2)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector4f r = new BHVector4f();

            MaxVector4f(r.mVector, v1.mVector, v2.mVector);
            r.CopyValues();
            return(r);
        }
Example #8
0
        public static BHVector4f Reflect(BHVector4f ivec, BHVector4f nvec)
        {
            ivec.SetValues();
            nvec.SetValues();
            BHVector4f r = new BHVector4f();

            ReflectVector4f(r.mVector, ivec.mVector, nvec.mVector);
            r.CopyValues();
            return(r);
        }
Example #9
0
        public static BHVector4f SmoothStep(BHVector4f v1, BHVector4f v2, float t)
        {
            v1.SetValues();
            v2.SetValues();
            BHVector4f r = new BHVector4f();

            SmoothStepVector4f(r.mVector, v1.mVector, v2.mVector, t);
            r.CopyValues();
            return(r);
        }
Example #10
0
 public static void DrawLight(BHVector3f position,
                              BHVector4f color)
 {
     DrawGlobalLight(position.x,
                     position.y,
                     position.z,
                     color.x,
                     color.y,
                     color.z,
                     color.w);
 }
Example #11
0
        public static BHVector4f Barycentric(BHVector4f v1, BHVector4f v2, BHVector4f v3, float f, float g)
        {
            v1.SetValues();
            v2.SetValues();
            v3.SetValues();
            BHVector4f r = new BHVector4f();

            BarycentricVector4f(r.mVector, v1.mVector, v2.mVector, v3.mVector, f, g);
            r.CopyValues();
            return(r);
        }
Example #12
0
        public static BHVector4f Hermite(BHVector4f v1, BHVector4f t1, BHVector4f v2, BHVector4f t2, float t)
        {
            v1.SetValues();
            v2.SetValues();
            t1.SetValues();
            t2.SetValues();
            BHVector4f r = new BHVector4f();

            HermiteVector4f(r.mVector, v1.mVector, t1.mVector, v2.mVector, t2.mVector, t);
            r.CopyValues();
            return(r);
        }
Example #13
0
        public static BHVector4f CatmullRom(BHVector4f v1, BHVector4f v2, BHVector4f v3, BHVector4f v4, float t)
        {
            v1.SetValues();
            v2.SetValues();
            v3.SetValues();
            v4.SetValues();
            BHVector4f r = new BHVector4f();

            CatmullRomVector4f(r.mVector, v1.mVector, v2.mVector, v3.mVector, v4.mVector, t);
            r.CopyValues();
            return(r);
        }
Example #14
0
 public static void DrawLight(BHVector3f position,
                              BHVector4f color,
                              float radius)
 {
     DrawLocalLight(position.x,
                    position.y,
                    position.z,
                    color.x,
                    color.y,
                    color.z,
                    color.w,
                    radius);
 }
Example #15
0
 public static void DrawLight(BHVector3f position,
                              BHVector4f color,
                              BHVector3f directional,
                              BHVector3f dimension)
 {
     DrawDirectionalLight(position.x,
                          position.y,
                          position.z,
                          color.x,
                          color.y,
                          color.z,
                          color.w,
                          directional.x,
                          directional.y,
                          directional.z,
                          dimension.x,
                          dimension.y,
                          dimension.z);
 }
Example #16
0
 public static float DistanceSquared(BHVector4f v1, BHVector4f v2)
 {
     v1.SetValues();
     v2.SetValues();
     return(DistanceSquaredVector4f(v1.mVector, v2.mVector));
 }
Example #17
0
 public float Dot(BHVector4f v)
 {
     v.SetValues();
     return(DotVector4f(mVector, v.mVector));
 }
Example #18
0
 public bool InBounds(BHVector4f bounds)
 {
     SetValues();
     return(InBoundsVector4f(mVector, bounds.mVector));
 }