示例#1
0
 public static Point operator /(Point p, float s)
 {
     return(new Point(_mm_mul_ps(p.P3, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
示例#2
0
 public static Line operator ^(Plane a, Plane b)
 {
     Detail.ext00(a.P0, b.P0, out var p1, out var p2);
     return(new Line(p1, p2));
 }
示例#3
0
 public static Dual operator ^(Plane a, Point b)
 {
     return(new Dual(0, _mm_store_ss(Detail.ext03(false, a.P0, b.P3))));
 }
示例#4
0
 public Plane Reflect(Plane p)
 {
     Detail.sw00(P0, p.P0, out var p0);
     return(new Plane(p0));
 }
示例#5
0
 public Point Reflect(Point p) => new Point(Detail.sw30(P0, p.P3));
示例#6
0
 internal Motor(float angRad, float d, Line l)
 {
     Detail.gpDL(-angRad * 0.5f, d * 0.5f, l.P1, l.P2, out var p1, out var p2);
     Detail.exp(p1, p2, out P1, out P2);
 }
示例#7
0
        public Direction Normalized()
        {
            __m128 tmp = Detail.rsqrt_nr1(Detail.hi_dp_bc(P3, P3));

            return(new Direction(_mm_mul_ps(P3, tmp)));
        }
示例#8
0
文件: Line.cs 项目: Ziriax/KleinSharp
        public float SquaredNorm()
        {
            __m128 dp = Detail.hi_dp(P1, P1);

            return(_mm_store_ss(dp));
        }
示例#9
0
文件: Math.cs 项目: Ziriax/KleinSharp
 public static Line Log(Motor m)
 {
     Detail.log(m.P1, m.P2, out var p1, out var p2);
     return(new Line(p1, p2));
 }
示例#10
0
 public static float operator |(Point a, Point b)
 {
     return(Detail.dot33(a.P3, b.P3).GetElement(0));
 }
示例#11
0
        public static Dual operator ^(Point b, Plane a)
        {
            __m128 tmp = Detail.ext03(true, a.P0, b.P3);

            return(new Dual(0, _mm_store_ss(tmp)));
        }
示例#12
0
 public static Plane operator |(Point a, Line b)
 {
     return(new Plane(Detail.dotPTL(a.P3, b.P1)));
 }
示例#13
0
 public static Motor operator *(Point b, Plane a)
 {
     Detail.gp03(true, a.P0, b.P3, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
示例#14
0
 public static Translator operator *(Point a, Point b)
 {
     return(new Translator(Detail.gp33(a.P3, b.P3)));
 }
示例#15
0
 public Line Conjugate(Line input)
 {
     var(p1, p2) = Detail.swMM(input.P1, input.P2, P1, P2);
     return(new Line(p1, p2));
 }
示例#16
0
文件: Math.cs 项目: Ziriax/KleinSharp
 public static Motor Exp(Line l)
 {
     Detail.exp(l.P1, l.P2, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
示例#17
0
 public unsafe void Conjugate(Direction *input, Direction *output, int count)
 {
     Detail.sw312(false, &input->P3, P1, default, &output->P3, count);
示例#18
0
 public static Motor operator *(Motor a, Motor b)
 {
     Detail.gpMM(a.P1, a.P2, b.P1, b.P2, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
示例#19
0
 public static Direction operator /(Direction a, float s)
 {
     return(new Direction(_mm_mul_ps(a.P3, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
示例#20
0
 public unsafe void Conjugate(Plane *input, Plane *output, int count)
 {
     Detail.sw012(true, &input->P0, P1, P2, &output->P0, count);
 }
示例#21
0
 public float Norm()
 {
     return(_mm_store_ss(Detail.sqrt_nr1(Detail.hi_dp(P0, P0))));
 }
示例#22
0
 public Plane Conjugate(Plane input)
 {
     return(new Plane(Detail.sw012(true, input.P0, P1, P2)));
 }
示例#23
0
 public Line Reflect(Line l)
 {
     Detail.sw10(P0, l.P1, out var p1, out var p2);
     p2 = _mm_add_ps(p2, Detail.sw20(P0, l.P2));
     return(new Line(p1, p2));
 }
示例#24
0
 public unsafe void Conjugate(Point *input, Point *output, int count)
 {
     Detail.sw312(true, &input->P3, P1, P2, &output->P3, count);
 }
示例#25
0
 public static Plane operator /(Plane p, float s)
 {
     return(new Plane(_mm_mul_ps(p.P0, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
示例#26
0
 public Point Conjugate(Point input)
 {
     return(new Point(Detail.sw312(true, input.P3, P1, P2)));
 }
示例#27
0
 public static Point operator ^(Plane a, Branch b)
 {
     return(new Point(Detail.extPB(a.P0, b.P1)));
 }
示例#28
0
 public unsafe void Conjugate(Line *input, Line *output, int count)
 {
     Detail.swMM(true, true, &input->P1, P1, P2, &output->P1, count);
 }
示例#29
0
 public static Point operator ^(Plane a, IdealLine b)
 {
     return(new Point(Detail.ext02(a.P0, b.P2)));
 }
示例#30
0
        public Point Normalized()
        {
            __m128 tmp = Detail.rcp_nr1(_mm_swizzle_ps(P3, 0 /* 0, 0, 0, 0 */));

            return(new Point(_mm_mul_ps(P3, tmp)));
        }